-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.tex
189 lines (154 loc) · 4.46 KB
/
template.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
\documentclass[unnumbered,letter,11pt,article,oneside]{memoir}
%%\documentclass[]{memoir}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{url}
\usepackage{rotating}
%%???\usepackage{memoir-article-styles}
\usepackage[american]{babel}
%\usepackage[german]{babel}
\usepackage[babel]{csquotes}
\usepackage[svgnames]{xcolor}
\usepackage{soul}
\usepackage[xetex, colorlinks=true, urlcolor=DarkSlateBlue,
citecolor=DarkSlateBlue, filecolor=DarkSlateBlue, plainpages=false,
pdfpagelabels, bookmarksnumbered]{hyperref}
\usepackage{etoolbox}
%%%%%%%%%%%\input{vc}
$if(listings)$
\usepackage{listings}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=r,basicstyle=\small\ttfamily}}{}
$endif$
$if(highlighting-macros)$
$highlighting-macros$
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
$if(tables)$
\usepackage{longtable}
$endif$
$if(graphics)$
\usepackage{graphicx}
% We will generate all images so they have a width \maxwidth. This means
% that they will get their normal width if they fit onto the page, but
% are scaled down if they would overflow the margins.
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
$endif$
%% set smaller margins
\setulmarginsandblock{1.5in}{1.0in}{*}
\setlrmarginsandblock{1.3in}{1.3in}{*}
\checkandfixthelayout
%% paragraph layout
\setlength{\parskip}{0.75ex} % 1ex plus 0.5ex minus 0.2ex}
\setlength{\parindent}{0pt}
%% define pagestyle
%% header, footer for my pagestyle qr
\newcommand\AddRevision{%
\setlength\unitlength{1mm}
\begin{picture}(0,0)
\put(-1,-5){\footnotesize\itshape Rev. 1, compiled \today}
\end{picture}
}
\makepagestyle{qr}
\makeheadrule {qr}{\textwidth}{\normalrulethickness}
\makefootrule {qr}{\textwidth}{\normalrulethickness}{\footruleskip}
\makeevenhead {qr}{}{} {\small\itshape\leftmark}
\makeoddhead {qr}{}{}{\small\itshape\rightmark}
\makeevenfoot {qr}{\small Page \thepage} {} {}
\makeoddfoot {qr}{
%%%% \AddRevision
\hspace*{-0.07in}
\small{U.S. CMS Operations Program 20xxQy}
} {} {\small Page \thepage}
\makeatletter
\makepsmarks {qr}{
\nouppercaseheads
\createmark {chapter} {both} {shownumber}{\@chapapp\ }{. \ }
\createmark {section} {right}{shownumber}{} {. \ }
\createmark {subbsection} {right}{shownumber}{} {. \ }
\createmark {subsubsection} {right}{shownumber}{} {. \ }
\createplainmark {toc} {both} {\contentsname}
\createplainmark {lof} {both} {\listfigurename}
\createplainmark {lot} {both} {\listtablename}
\createplainmark {bib} {both} {\bibname}
\createplainmark {index} {both} {\indexname}
\createplainmark {glossary} {both} {\glossaryname}
}
\makeatother
\setsecnumdepth{subsection}
$if(title)$
\title{\bigskip \bigskip $title$}
$endif$
%\author{$for(author)$$author$$sep$\\$endfor$}
\author{$for(author)$\Large $author.name$\vspace{0.05in} \newline\normalsize\emph{$author.affiliation$} \newline\footnotesize \url{$author.email$}\vspace*{0.2in}\newline $sep$ \and $endfor$}
\date{}
%\usepackage[T1]{fontenc}
%\usepackage{tgpagella}
%\usepackage{minionpro}
%
% alternatively
%
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Minion Pro}
%\setmainfont[Ligatures=TeX]{Bergamo Pro}
%\setmainfont[Ligatures=TeX]{Linux Libertine O}
%\setmonofont[Mapping=tex-text,Scale=MatchLowercase]{Consolas}
\setmonofont[Mapping=tex-text,Scale=MatchLowercase]{Courier}
%
% alternatively
%
%\setromanfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro}
%\setsansfont[Mapping=tex-text]{Minion Pro}
%\setmonofont[Mapping=tex-text,Scale=0.8]{Pragmata}
\usepackage{xunicode}
\begin{document}
\setkeys{Gin}{width=1\textwidth}
%% chapterstyle, no chapter and section numbers
%%\chapterstyle{article-4}
\chapterstyle{veelo}
\setsecnumdepth{none}
\maxsecnumdepth{none}
%%???\published{$date$.}
$if(title)$
\maketitle
$endif$
$if(toc)$
{
\hypersetup{linkcolor=black}
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
}
$endif$
$if(abstract)$
\begin{abstract}
\noindent $abstract$
\end{abstract}
$endif$
$body$
$if(natbib)$
$if(biblio-files)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{Bibliography}
$else$
\renewcommand\refname{References}
$endif$
$endif$
\bibliography{$biblio-files$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=References]$endif$
$endif$
$for(include-after)$
$include-after$
$endfor$
\end{document}