From: Sayamindu Dasgupta Date: Sat, 25 Nov 2017 04:09:28 +0000 (-0800) Subject: Initial import X-Git-Url: https://code.communitydata.science/uw_tex_letterhead.git/commitdiff_plain/fd870ead08d8d774cf469a2dc7b681c14a92cad9?ds=inline Initial import --- fd870ead08d8d774cf469a2dc7b681c14a92cad9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3da51ee --- /dev/null +++ b/.gitignore @@ -0,0 +1,225 @@ + +## From: https://github.com/github/gitignore/blob/master/TeX.gitignore +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary + +# listings +*.lol + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlo + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# easy-todo +*.lod + +# xindy +*.xdy + +# xypic precompiled matrices +*.xyc + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# auto folder when using emacs and auctex +/auto/* + +# expex forward references with \gathertags +*-tags.tex + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5dd4d5b --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +.RECIPEPREFIX += +TARGET = letter.pdf +SIGIMAGE = figures/signature.png.gpg + +all: $(TARGET) + + +$(TARGET): update-sig main.pdf + mv main.pdf letter.pdf + + +main.pdf: + rubber -m xelatex main.tex + + +update-sig: + gpg --yes --output figures/signature.png --decrypt $(SIGIMAGE) + + +clean: + rubber -m xelatex --clean main.tex && $(RM) $(TARGET) && $(RM) figures/signature.png + diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..333021f --- /dev/null +++ b/README.txt @@ -0,0 +1,35 @@ +This is an attempt to implement a dynamically configurable version of the +University of Washington (UW) letterhead. It uses fonts provided by the +UW webite, and then uses XeLaTeX to use those fonts to recreate the +letterhead. + + + +Requirements: + +To use this template, you will need XeLaTeX (if you are using the online +ShareLaTeX system, change your compiler to XeLaTeX from the settings menu +of your project). To compile locally you will also need the "rubber" +utility. + +The signature file (a gray image) is GPG encrypted file using a symmetric +cipher. The passphrase is "weakpassword" (without quotes). You will want to +customize this. For this file, you will also need GPG installed in the system. + + + +To compile: + +Type "make", and if you have everything installed, you will get a letter.pdf +file. You will be prompted for password by GPG - see the above section for the +passphrase. + +"make clean" should remove all the non-essential build files. + + + +Note on XeLaTeX: + +A number of the normal LaTeX font packages will not work with XeLaTeX. For more +information, see http://xetex.sourceforge.net/ + diff --git a/figures/signature.png.gpg b/figures/signature.png.gpg new file mode 100644 index 0000000..ad18b06 Binary files /dev/null and b/figures/signature.png.gpg differ diff --git a/figures/uw-header.pdf b/figures/uw-header.pdf new file mode 100644 index 0000000..b524256 Binary files /dev/null and b/figures/uw-header.pdf differ diff --git a/fonts/OpenSans/OpenSans-Bold.ttf b/fonts/OpenSans/OpenSans-Bold.ttf new file mode 100644 index 0000000..7b52945 Binary files /dev/null and b/fonts/OpenSans/OpenSans-Bold.ttf differ diff --git a/fonts/OpenSans/OpenSans-BoldItalic.ttf b/fonts/OpenSans/OpenSans-BoldItalic.ttf new file mode 100644 index 0000000..a670e14 Binary files /dev/null and b/fonts/OpenSans/OpenSans-BoldItalic.ttf differ diff --git a/fonts/OpenSans/OpenSans-ExtraBold.ttf b/fonts/OpenSans/OpenSans-ExtraBold.ttf new file mode 100644 index 0000000..3660681 Binary files /dev/null and b/fonts/OpenSans/OpenSans-ExtraBold.ttf differ diff --git a/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf b/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 0000000..8c4c15d Binary files /dev/null and b/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf differ diff --git a/fonts/OpenSans/OpenSans-Italic.ttf b/fonts/OpenSans/OpenSans-Italic.ttf new file mode 100644 index 0000000..e6c5414 Binary files /dev/null and b/fonts/OpenSans/OpenSans-Italic.ttf differ diff --git a/fonts/OpenSans/OpenSans-Light.ttf b/fonts/OpenSans/OpenSans-Light.ttf new file mode 100644 index 0000000..563872c Binary files /dev/null and b/fonts/OpenSans/OpenSans-Light.ttf differ diff --git a/fonts/OpenSans/OpenSans-LightItalic.ttf b/fonts/OpenSans/OpenSans-LightItalic.ttf new file mode 100644 index 0000000..5ebe2a2 Binary files /dev/null and b/fonts/OpenSans/OpenSans-LightItalic.ttf differ diff --git a/fonts/OpenSans/OpenSans-Regular.ttf b/fonts/OpenSans/OpenSans-Regular.ttf new file mode 100644 index 0000000..2e31d02 Binary files /dev/null and b/fonts/OpenSans/OpenSans-Regular.ttf differ diff --git a/fonts/OpenSans/OpenSans-SemiBold.ttf b/fonts/OpenSans/OpenSans-SemiBold.ttf new file mode 100644 index 0000000..99db86a Binary files /dev/null and b/fonts/OpenSans/OpenSans-SemiBold.ttf differ diff --git a/fonts/OpenSans/OpenSans-SemiBoldItalic.ttf b/fonts/OpenSans/OpenSans-SemiBoldItalic.ttf new file mode 100644 index 0000000..8cad4e3 Binary files /dev/null and b/fonts/OpenSans/OpenSans-SemiBoldItalic.ttf differ diff --git a/main.tex b/main.tex new file mode 100644 index 0000000..3472040 --- /dev/null +++ b/main.tex @@ -0,0 +1,86 @@ +\documentclass[11pt,letterpaper]{article} + +% Metadata -- alter as neded +\def\email{email@uw.edu} +\def\web{https://website.cc} +\def\mobile{XXX.XXX.XXXX} +\def\boxno{35XXXX} +\def\zipcode{98195-XXXX} + +\usepackage[top=1.2in,left=1.3in,bottom=1in,right=1in]{geometry} + +\usepackage{fontspec} +\usepackage{xltxtra} +\usepackage{libertine} +\setsansfont[ +ItalicFont=OpenSans-LightItalic.ttf, +]{OpenSans-Light.ttf}[Scale=MatchLowercase] + +% \usepackage[ +% final, +% stretch=10, +% protrusion=true]{microtype} + +\usepackage{polyglossia} +\setdefaultlanguage{english} + +\usepackage{graphicx} +\usepackage[colorlinks=false, + pdfborder={0 0 0}, + ]{hyperref} +\usepackage{tikz} + +\usepackage{lastpage} +\usepackage{fancyhdr} +\pagestyle{fancy} +\renewcommand{\footrulewidth}{0pt} +\renewcommand{\headrulewidth}{0pt} +\fancyhead{} +\fancyhead[C]{% + \begin{tikzpicture}[remember picture,overlay] + \node at (current page.north west) [yshift=-0.5in,xshift=0.5in,anchor=north west] + {\includegraphics[width=607pt]{figures/uw-header.pdf}}; + \end{tikzpicture}} +\fancyfoot{} +\fancyfoot[L] {\sffamily{ +Box {\boxno}\hspace{0.3cm}Seattle, WA {\zipcode}\\ % If you don't want to include your physical campus address, comment out this line +\href{\email}{\email}\hspace{0.3cm}\href{\web}{\web} +}} +\fancyfoot[R] {\sffamily{\thepage/\pageref*{LastPage}}} + + +% No paragraph indentation +\parindent 0pt + +\setlength{\parskip}{0.5\baselineskip} +\setlength{\headheight}{14pt} +\setlength{\footskip}{35pt} +% \raggedright +\linespread{1.05} + +\begin{document} + +\hfill{\today} + +\bigskip + +To Some Committee,\\ +Some School or Department\\ +Some University\\ + +\vspace{-0.5em} +Dear members of the Committee, + +I am writing to show off this new~\XeLaTeX~thing. + +\XeLaTeX~supports sytem fonts, and also local TTF/OTF fonts. \XeLaTeX~also support Unicode way better, and supports shaping of complex scripts (e.g.~Indic or Arabic). + +Hope you will find this template useful. + +Sincerely, + +\includegraphics[width=1.7in]{figures/signature.png} + +Some Name + +\end{document}