-
Notifications
You must be signed in to change notification settings - Fork 5
/
letter.tex
96 lines (75 loc) · 2.25 KB
/
letter.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\documentclass[11pt]{article}
%%%%%%%%%%%%%%
\usepackage{geometry} % page geometry
\usepackage{tabularx} % improved tables
\usepackage{lipsum} % for sample filling
\usepackage{multirow} % multiple row cells in tabulars
\usepackage{ifthen} % conditionals
\usepackage[export]{adjustbox} % required by tabularx
\usepackage{datetime} % date formats
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
\geometry{paper=letterpaper, margin=3cm} % set paper and marings
\setlength{\parindent}{0pt} % remove paragraph indentation
\setlength{\parskip}{0.7\baselineskip} % set paragraph spacing
\renewcommand{\tabularxcolumn}[1]{m{#1}} % vertical centering for X columns in tabularx
\pagestyle{plain}
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
\def\usefrench{false} % french if true, otherwise english
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
\def\name{\small Jonathan Viquerat}
\def\positionfr{Ingénieur de recherche}
\def\positioneng{Research engineer}
\def\position{\small \ifthenelse{\equal{\usefrench}{true}}{\positionfr}{\positioneng}}
\def\teamfr{\'Equipe CFL, CEMEF}
\def\teameng{CFL team, CEMEF}
\def\team{\small\bfseries \ifthenelse{\equal{\usefrench}{true}}{\teamfr}{\teameng}}
\def\web{https://jviquerat.github.io}
\def\mail{\small [email protected]}
\def\logo{\centering \includegraphics[width=.45\textwidth]{mines_psl_logo.png}}
\def\datefr{\ddmmyyyydate Le \today}
\def\dateeng{\today}
\def\date{\ifthenelse{\equal{\usefrench}{true}}{\datefr}{\dateeng}}
\def\subjectfr{\textbf{Objet : }}
\def\subjecteng{\textbf{Subject: }}
\def\subject{\ifthenelse{\equal{\usefrench}{true}}{\subjectfr}{\subjecteng}}
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
\begin{document}
% remove page numbering
\pagestyle{empty}
% letterhead
\begin{tabularx}{\textwidth}{X | @{\hspace{2.2em}} l}
\centering \multirow{6}{*}{\logo} & \\
& \name\\
& \position\\
& \team\\
& \mail\\
&
\end{tabularx}%
% vertically center the content
\vfill
% date on the right
\hfill \date
% subject
\bigskip
\subject A formal letter topic
\bigskip
% body
Dear Sir,
\lipsum[1]
\lipsum[2]
% Regards
\bigskip
\hfill
\begin{tabular}{p{.4\linewidth}}
Best regards, \\[2\medskipamount]
J. Viquerat
\end{tabular}
% vertically center the content
\vfill
\end{document}