UESTC Recommendation Letter Template
Forfatter
Ian Dx
Sidst opdateret
2 år siden
Licens
Creative Commons CC BY 4.0
Resumé
UESTC Recommendation Letter Template
% 调用UESTCLetter.cls捏
\documentclass{UESTCLetter}
\usepackage{fontspec}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{uestcblue}{rgb}{0.0549, 0.208, 0.545}
\usepackage{lipsum}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{eso-pic}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\rhead{Page \thepage \hspace{1pt} of \pageref{LastPage}}
% 字体捏
\setmainfont[ExternalLocation=fonts/]{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=.1] at (current page.center)
{\includegraphics[width=0.55\textwidth]{images/background.png}};
\end{tikzpicture}
\vfill}}}
\makeatletter
\def\parsecomma#1,#2\endparsecomma{\def\page@x{#1}\def\page@y{#2}}
\tikzdeclarecoordinatesystem{page}{
\parsecomma#1\endparsecomma
\pgfpointanchor{current page}{north east}
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgfpointanchor{current page}{south west}
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
\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
% 要填的信息捏
\input{info.tex}
\def\newSchoolName{\hspace{-1.2mm}\textbf{\color{uestcblue}\schoolName}}
\def\newEmail{\textbf{\color{uestcblue}E-mail}: \email}
\def\newTel{\textbf{\color{uestcblue}Phone}: \tel}
\def\newUrl{\textbf{\color{uestcblue}URL}: \url}
% 右边的地址
\def\newaddress{
\newSchoolName\\
\address\\
\newTel\\
\newEmail\\
\newUrl
}
% 推荐人签名和备注捏
\signature{
\includegraphics[scale=0.40]{images/signature.png}
\recommender
}
% 日期捏
\date{\letterDate}
\begin{document}
\begin{letter}{}
% 上面的东西捏
\begin{tikzpicture}[remember picture,overlay,,every node/.style={anchor=center}]
\node[text width=7cm] at (page cs:0.62,0.73){\small \newaddress};
\end{tikzpicture}
% hello
\opening{\greeting}
% 背景捏
\watermark{}{}{}
% 正文捏
\letterBody
% b-bye
\closing{\goodbye}
\end{letter}
\end{document}