Skip to content

Instantly share code, notes, and snippets.

@nidrissi

nidrissi/letter.tex

Last active May 30, 2021
Embed
What would you like to do?
LaTeX letter template. See https://idrissi.eu/post/letter/ for more information.
\documentclass[foldmarks=false, backaddress=false, fromemail, fromlogo, fromrule]{scrlttr2}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage[babel]{microtype}
\usepackage{unicode-math}
% Fonts can be customized here.
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}[Scale=MatchLowercase]
\usepackage{xspace}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
% Your information.
\setkomavar{fromname}{Your Name}
\setkomavar{fromemail}{your@email.com}
\setkomavar{fromaddress}{University of Somewhere\\12345 Main Road\\Pallet Town}
\setkomavar{fromlogo}{\includegraphics[height=2cm]{logo}}
\setkomavar{place}{Your Location} % The city in which you write the letter.
% \setkomavar{date}{...} % default: current date.
% If you wish to sign your letter by hand, remove the following two commands.
\setplength{sigbeforevskip}{0pt} % removes the space reserved for a handwritten signature
\setkomavar{signature}{\includegraphics[height=2cm]{signature}\\Your Name} % inserts the picture of the signature and your name
% The recipient's information.
\begin{letter}{Prof. Recipient\\University of Elsewhere\\...more address info...}
\setkomavar{subject}{Subject of the letter} % optional
\opening{Dear ...,}
This is an extremely interesting letter. Please read it!
\closing{Best regards,}
\end{letter}
% You can include multiple \begin{letter} ... \end{letter} blocks in a single file.
% This will produce multiple letters with the same sender information.
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment