Sort files in folders
This commit is contained in:
79
content/tips/emails-md.md
Normal file
79
content/tips/emails-md.md
Normal file
@ -0,0 +1,79 @@
|
||||
---
|
||||
Title: Write your emails in markdown with vim
|
||||
Date: 2019-04-22 19:00
|
||||
Author: Fabrice
|
||||
Category: tips
|
||||
Slug: vim-md-emails
|
||||
Header_Cover: images/cover_amsterdam.jpg
|
||||
---
|
||||
|
||||
If you are like me and you don't like to spend time using <abbr title="What You See Is What You Get">WYSIWYG</abbr> tools to format your texts, you may be interested in this.
|
||||
|
||||
However, I'm using [thunderbird](https://www.thunderbird.net/) to handle my emails.
|
||||
As you may have noticed, you can copy paste from some web page and paste it in thunderbird (which can cause invisible break in the styling).
|
||||
Exploiting this, one can directly export html into the clipboard to past it in thunderbird.
|
||||
|
||||
The command is as simple as:
|
||||
```sh
|
||||
pandoc -t html5 -s <file> | xclip -selection clipboard
|
||||
```
|
||||
|
||||
Therefore, adding:
|
||||
```vim
|
||||
map <your map> :w !pandoc -t html5 -s \| xclip -selection clipboard<cr>
|
||||
```
|
||||
in your vim `ftplugin/pandoc.vim` configuration file allows you to copy directly the output of [pandoc](https://pandoc.org/) on you opened buffer into your clipboard and thus past it directly into thunderbird.
|
||||
Of course, you can customize this command line as you want. For instance my base-header-level is 4, as I think that first-level titles are a bit too much for emails.
|
||||
|
||||
**Note:** I'm using the [vim-pandoc](https://github.com/vim-pandoc/vim-pandoc) and the [vim-pandoc-syntax](https://github.com/vim-pandoc/vim-pandoc-syntax) plugins for vim.
|
||||
|
||||
Here follows a direct usecase of this: a GDPR death letter inspired from [aeris'](https://gist.github.com/aeris/675ffd5755f7570469448bb8b890f759) one.
|
||||
```md
|
||||
Dear Sir or Madam,
|
||||
|
||||
My personal data, such as my e-mail address, are protected under the
|
||||
GDPR law since May 2016:\
|
||||
<https://www.privacy-regulation.eu/en/>
|
||||
|
||||
As per article 3, all GDPR applies to you as I am an EU citizen, even
|
||||
if you are outside EU:\
|
||||
<https://www.privacy-regulation.eu/en/3.htm>
|
||||
|
||||
As per article 15, I request you to provide me all personal data you
|
||||
have about myself, the purpose of the processing, why and **how** you
|
||||
collect them, if you share my data with others people or countries,
|
||||
and all other informations that are mentioned in the following:\
|
||||
<https://www.privacy-regulation.eu/en/15.htm>
|
||||
|
||||
As per article 7, I request you to **prove** my **explicit** and
|
||||
**positive** consent fr my personnal data to be collected and
|
||||
processed:\
|
||||
<https://www.privacy-regulation.eu/en/7.htm>
|
||||
|
||||
As per article 17, I also request all my personal data to be erased
|
||||
from your databases (including backups), with a proof of erasure,
|
||||
**but only once you provided me with all the aforementioned
|
||||
information**:\
|
||||
<https://www.privacy-regulation.eu/en/17.htm>
|
||||
|
||||
As per article 12, these requests have to be fulfilled within **a
|
||||
month** from Today (April 4th 2019). Should this not be the case,
|
||||
I will open a case with EU regulator:\
|
||||
<https://www.privacy-regulation.eu/en/12.htm>
|
||||
|
||||
As per article 19, I have the same request to **all your partners** to
|
||||
whom my personal data have been transfered to. These have to be
|
||||
accompanied by an attestation of erasure from these partners as
|
||||
well:\
|
||||
<https://www.privacy-regulation.eu/en/19.htm>
|
||||
|
||||
This e-mail is signed under the GPG key
|
||||
[`0x2C5033B228CFE4E7`](https://fmouhart.epheme.re/documents/pubkey.asc)
|
||||
that also appears in the above website, which suffices to prove my
|
||||
identity as the rightful owner of these personal data.
|
||||
|
||||
If you require further information to fulfill my requests, feel free
|
||||
to contact me on this e-mail address.
|
||||
|
||||
Sincerely yours,
|
||||
```
|
41
content/tips/latex-letterhead.md
Normal file
41
content/tips/latex-letterhead.md
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
Title: Use any letterhead in LaTeX
|
||||
Date: 2019-04-22 20:00
|
||||
Author: Fabrice
|
||||
Category: tips
|
||||
Slug: latex-letterhead
|
||||
Header_Cover: images/cover_palace.jpg
|
||||
---
|
||||
|
||||
It sometimes appears that I have to write some official documents from some entities, especially for admin stuff.
|
||||
However, those letterheads are often provided in some [proprietary format](https://en.wikipedia.org/wiki/Office_Open_XML) with which I do my best to make as few interactions as possible.
|
||||
Especially, I feel more comfortable editing some LaTeX instead of writing it in [libreoffice](https://libreoffice.org/) (for instance).
|
||||
|
||||
Thus, thanks to [Nicolas Trotignon](https://perso.ens-lyon.fr/nicolas.trotignon/) who found a simple workaround, here is a small trick to do it.
|
||||
As a preliminary, you have to obtain a pdf version of the letterhead (to do so, I'm using [online office 365](https://en.wikipedia.org/wiki/Office_365) as it works in Linux, yes, shame on me).
|
||||
|
||||
Once this is done, the core of this method is to use the `wallpaper` package to embed the letterhead as a background image, and then play with margins to make it look nice.
|
||||
|
||||
Here follows a minimal example with the [corresponding output](examples/background-latex.pdf). Replace `background.pdf` with your (empty) letterhead of course.
|
||||
This can also be adapted to other classes, such as [`letter.cls`](https://ctan.org/pkg/letter).
|
||||
|
||||
```tex
|
||||
\documentclass[a4paper]{article}
|
||||
% Design and encoding stuff
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[UKenglish]{babel}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{libertine}
|
||||
% The main trick
|
||||
\usepackage{wallpaper}
|
||||
\CenterWallPaper{1}{background.pdf}
|
||||
% margin
|
||||
\usepackage[inner=4.5cm,top=6cm]{geometry}
|
||||
\begin{document}
|
||||
% blabla
|
||||
Hello, World!
|
||||
% …
|
||||
\end{document}
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user