-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathletter.tex
135 lines (121 loc) · 4.75 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
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
\documentclass[12pt]{UIUCletter}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{themecolor}{RGB}{228,105,71}
\usepackage{lipsum}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{eso-pic}
\usepackage[base]{babel}
\usepackage[pdftex,colorlinks=true,linkcolor=themecolor,urlcolor=themecolor]{hyperref}
%
% This section is just a bunch of busywork so that the second and following pages read ``Page X of Y''
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\rhead{Page \thepage{} \hspace{1pt} of~\pageref{LastPage}}
%
%
% Set custom font here. Comment this line out if you do not have a Cambria font (originally included with this template) installed; computer modern (or whatever your current default font is) will be substituted.
%
%\setmainfont{[Cambria.ttf]}[BoldFont = [CambriaBold.ttf], ItalicFont = [CambriaItalic.ttf], BoldItalicFont = [CambriaBoldItalic.ttf] ]
\newcommand{\watermark}[3]{\AddToShipoutPictureBG{
\parbox[b][\paperheight]{\paperwidth}{
\vfill%
\centering%
\begin{tikzpicture}
\path (0,0) -- (\paperwidth,\paperheight);
\node[opacity=.07] at (current page.center)
{\includegraphics[width=0.6\textwidth]{./Figures/background.png}};
\end{tikzpicture}
\vfill}}}
% The material below is a whole big dang thing whose purpose is just to set up a fixed coordinate system for \tikz so that you can put the Department or School address in the upper right-hand side without it moving all around every time you change something in the page. I think it works.
% Defining a new coordinate system for the page:
%
% --------------------------
% |(-1,1) (0,1) (1,1)|
% | |
% |(-1,0) (0,0) (1,0)|
% | |
% |(-1,-1) (0,-1) (1,-1)|
% --------------------------
\makeatletter
\def\parsecomma#1,#2\endparsecomma{\def\page@x{#1}\def\page@y{#2}}
\tikzdeclarecoordinatesystem{page}{
\parsecomma#1\endparsecomma
\pgfpointanchor{current page}{north east}
% Save the upper right corner
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
% save the lower left corner
\pgfpointanchor{current page}{south west}
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
% Transform to the correct placement
\pgfmathparse{(\pgf@xc-\pgf@xb)/2.*\page@x+(\pgf@xc+\pgf@xb)/2.}
\expandafter\pgf@x\expandafter=\pgfmathresult pt
\pgfmathparse{(\pgf@yc-\pgf@yb)/2.*\page@y+(\pgf@yc+\pgf@yb)/2.}
\expandafter\pgf@y\expandafter=\pgfmathresult pt
}
\makeatother
%
%
%%%%%%%%%%% Put Personal Information Here %%%%%%%%%%%
%
\def\name{Pingbang Hu,\\
Information Science,\\
University of Illinois Urbana-Champaign
}
%
%\def\What{, Your degrees, etc.}
%
% Set the name of your Department or School here
%%%%%%%%%%%%%%%%%% School or Department %%%%%%%%%%%%%%%
\def\Where{\hspace{-1.2mm}Information Science,\\University of Illinois Urbana-Champaign}
\def\Address{Your address}
\def\CityZip{Champaign, Illinois, 61820}
\def\Email{\textbf{E-mail}: \href{mailto:mail@gmail.com}{mail@gmail.com}}
\def\TEL{\textbf{Phone}: (+1) 123-456-7890}
\def\school{University of Illinois Urbana-Champaign\\610 East John Street,\\Champaign, Illinois, 61820}
%%%%%%%%%%%%%%%%%%%%% Signature line %%%%%%%%%%%%%%%%%%%%%
%
% Set your signature line here.
% One can add a signature image in a PDF file using the following code; this requires a file called "signature_block.pdf" to be installed in the same folder as the .tex file. The vertical spacing (\vspace) and the scaling will have to be adjusted to get things to look correct for your particular signature image. Alternatively, comment out the following line in favor of the one labeled "[[Alternate]]" if you want to sign a paper copy of the letter.
%
\signature{
\vspace{-2em} {\centering \includegraphics[width=.6\linewidth]{Figures/signature.png}}\\
\name{}
}
% This block sets up the address on the right-hand side of the header.
%
% The following lines just compile the information you set up into the LaTex letter variable "address" for later use.
%
%The following command "clears out" the default address so that it can be better set using \tikz
\address{}
\def\newaddress{
\Where{}\\
\Address{}\\
\CityZip{}\\
\TEL{}\\
\Email{}\\
}
%%%%%%%%%%% DATE %%%%%%%%%%%%%%%%%%%%%%%%%
\date{\vspace{10mm} \today} %\date{\vspace{10mm} 20 September 2020}
%%%%%%%%%%% Set the subject here if there is one %%%%
%\subject{Stuff} % optional subject line
\begin{document}
%%%%%%%% The "To" address goes here.
\begin{letter}{
\school{}
}
\begin{tikzpicture}[remember picture,overlay,,every node/.style={anchor=center}]
\node[text width=7cm] at (page cs:0.45,0.73){\small \newaddress};
\end{tikzpicture}
\opening{Dear Review Committee,}
%%%%%%%%%% Body of letter %%%%%%%%%%%%%%
\watermark{}{}{}
\lipsum[1-5]
\closing{Sincerely,}
\end{letter}
\end{document}