forked from mrzool/letter-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.tex
More file actions
executable file
·148 lines (116 loc) · 3.67 KB
/
template.tex
File metadata and controls
executable file
·148 lines (116 loc) · 3.67 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[$fontsize$, letter]{article}
\usepackage{fontspec}
% LAYOUT
%--------------------------------
\usepackage{geometry}
\geometry{letterpaper, left=35mm, right=35mm, top=50mm, bottom=25mm}
% No page numbers
\pagenumbering{gobble}
% Left align
\usepackage[document]{ragged2e}
% Trim excessive whitespace before lists
\usepackage{enumitem}
\setlist{nolistsep}
\usepackage{wallpaper}
\ThisULCornerWallPaper{1}{letterhead-front.pdf} % Uncomment to include a different letterhead on the first page
\ULCornerWallPaper{1}{letterhead.pdf}
% LANGUAGE
%--------------------------------
\usepackage{polyglossia}
\setmainlanguage{english}
\RequirePackage[english]{isodate}
% TYPOGRAPHY
%--------------------------------
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage[protrusion=true,final]{microtype}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\setsansfont[Numbers=Lowercase,LetterSpace=3]{Hypatia Sans Pro}
\setmonofont{Courier}
\setmathrm[Numbers=Uppercase]{Warnock Pro}
\setmathsf{Hypatia Sans Pro}
\setmathtt{Courier}
\setromanfont[Numbers=Lowercase,Style=Alternate,ItalicFeatures={Style=Swash},Ligatures={Common}]{Warnock Pro}
\newfontfamily\titlefontspec[Numbers=Uppercase,Letters=SmallCaps,Style=Alternate]{Warnock Pro}
\newfontfamily\sectionfontspec[Numbers=Lowercase,Letters=SmallCaps,Style=Alternate]{Warnock Pro}
\newfontfamily\subsectionfontspec[Numbers=Lowercase,Style=Alternate]{Warnock Pro Italic}
\newfontfamily\subsubsectionfontspec[Numbers=Lowercase,Style=Alternate]{Warnock Pro Italic}
\newfontfamily\textarabic{Scheherazade}
\newfontfamily\textipa{Doulos SIL}
\newfontfamily\texthebrew{Lucida Grande}
\newfontfamily\textcyrillic{Warnock Pro}
\newfontfamily\textcyrillicsf{Hypatia Sans Pro}
\newfontfamily\textgreek{Warnock Pro}
\newfontfamily\textgreeksf{Hypatia Sans Pro}
\newfontfamily\textjapanese{Hiragino Mincho Pro}
\newfontfamily\textother{Gentium Plus}
\newfontfamily\textocr[Numbers=Uppercase,Ligatures={Common}]{Hypatia Sans Pro Bold}
% Set paragraph break
\setlength{\parskip}{1em}
% Command required by how Pandoc handles the list conversion
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
% PDF SETUP
%--------------------------------
\usepackage[xetex, bookmarks, colorlinks, breaklinks]{hyperref}
\hypersetup
{
pdfauthor={Chad Michael Eyer},
pdfsubject={$subject$},
pdftitle={$subject$},
colorlinks,breaklinks,
filecolor=black,
urlcolor=[rgb]{0.117,0.682,0.858},
linkcolor=[rgb]{0.117,0.682,0.858},
linkcolor=[rgb]{0.117,0.682,0.858},
citecolor=[rgb]{0.117,0.682,0.858}
}
% To display custom date in the example
% \usepackage[nodayofweek]{datetime}
% \newdate{date}{01}{12}{1867}
% \date{\displaydate{date}}
% Use this instead of \today
% \displaydate{date}
% DOCUMENT
%--------------------------------
\begin{document}
$if(body)$
\small
\vspace{1em}
\normalsize \sffamily
$for(to)$
\textsc{\lowercase{$to$}}\\
$endfor$
\vspace{3em}
\rmfamily
\begin{flushright}
$if(date)$\printdate{$date$}$else$\today$endif$$if(city)$\\$city$$endif$
\end{flushright}
\vspace{1em}
$if(subject)$
\textbf{$subject$}
$endif$
\vspace{1em}
$body$
$if(signature)$
\IfFileExists{signature.pdf}
{
\begin{FlushRight} \parbox[t]{0.6in}{\includegraphics[clip,angle=0,scale=.2]{signature.pdf}}
\vspace*{-3\baselineskip}Chad Michael Eyer
\end{FlushRight}
}
$else$
\begin{FlushRight}
\vspace*{2.875\baselineskip}Chad Michael Eyer
\end{FlushRight}
$endif$
\clearpage
$endif$
\newgeometry{letterpaper, left=1.3in, right=35mm, top=2.125in, bottom=25mm}
\ThisULCornerWallPaper{1}{envelope.pdf}
$for(to)$
\large\textocr\uppercase{$to$}\\
$endfor$
\end{document}