forked from tfrank1971/LaTeX_Tutorial_CPT_PSP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
#report#-preamble.tex
250 lines (204 loc) · 9.14 KB
/
#report#-preamble.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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
%==========================================================================
% definitions to be loaded just before the document environment
%==========================================================================
\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\usepackage[times]{fontsetup} %Loads the FreeSerifb fonts, a Times font and stix2 for Mathematics with letters replaced from FreeSerif
\setsansfont{Arial} %The main font-selecting command, which selects the standard fonts used in a document
\setmonofont{Courier New} %The main font-selecting command, which selects the standard fonts used in a document
\usepackage{datetime2}
\usepackage{setspace}
\usepackage{ifthen}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{calc}
\usepackage{units}
\usepackage{array,ragged2e,longtable}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{capt-of}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{lastpage}
\usepackage[multidot]{grffile}
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{verbatim}
\usepackage{moreverb}
\usepackage[labelfont=bf,font=small]{caption}
\usepackage{rotating}
\usepackage{threeparttable, threeparttablex} % enables footnotes under tables
\usepackage{pdflscape} % rotating pages in landscape format
\usepackage[addtotoc]{abstract} % include summary in ToC, http://www.tug.org/texlive/Contents/live/texmf-dist/doc/latex/abstract/abstract.pdf
\usepackage{textcomp} % kile special characters
\usepackage{xcolor} % colored text
\usepackage{listings} % for listings in Appendix
\usepackage{listingsutf8} % extension in case there are umlauts
\usepackage{appendix} % prints APPENDIX heading in ToC
\usepackage{subcaption} % replaces subfig and subfigure
%\usepackage{cite} % correct refs for multiple citation, incompatible with biblatex
\usepackage{enumitem}
\usepackage{makeidx}
\usepackage[autostyle=true]{csquotes}
\usepackage[backend=biber,style=nejm, maxbibnames=6, minbibnames=6]{biblatex} %biblatex numeric style based on the design of the New England Journal of Medicine (NEJM).
\addbibresource{#report#.bib} % replaces old \bibliography command
%\bibliography{publications} % name of bib-file without .bib
%\setlength{\bibitemsep}{1em} % distance between items
%\setlength{\bibhang}{2em} % indentation after first line
\usepackage{microtype} % better typography, {babel} should come before
\usepackage[toc,acronym,nonumberlist,nogroupskip,nopostdot,order=letter]{glossaries}
%\makeindex
\setacronymstyle{long-short}
\makeglossaries
\loadglsentries{myacronyms} % TeX-file containing the acronyms
%-------------------------------------------------------------------------
\setcounter{secnumdepth}{4} % adapt depth of numbering in ToC
\setcounter{tocdepth}{4} % adapt depth of numbering in ToC
%\renewcommand{\abstractname}{SUMMARY} % new name for abstract
% this is for lazy editors
\newcommand{\fs}{\footnotesize}
\newcommand{\scs}{\scriptsize}
% paragraph control #############################################################
\clubpenalty=10000 %prevent orphan line
\widowpenalty=10000 %prevent widow lines
%==========================================================================
% macros used for plotting
%==========================================================================
\newcommand{\scale}{2.5}
\newcommand{\plotscale}{1} %zooms the figure to x% of its original size (default 1 = 100%)
\newcommand{\plot}[4] { %\parskip0pt
\begin{figure}[ht]
\caption[#1]{#4}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\label{#3}
\end{figure}
}
\newcommand{\plotB}[5] { %\parskip0pt
\begin{figure}[ht]
\caption[#1]{#5}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#3}}
\label{#4}
\end{figure}
}
\newcommand{\plotC}[6] { %\parskip0pt
\begin{figure}[ht]
\caption[#1]{#6}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#3}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#4}}
\label{#5}
\end{figure}
}
\newcommand{\lplot}[4] { %\parskip0pt
\begin{sidewaysfigure}[h]
\caption[#1]{#4}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\label{#3}
\end{sidewaysfigure}
}
\newcommand{\lplotB}[5] { %\parskip0pt
\begin{sidewaysfigure}[h]
\caption[#1]{#5}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#3}}
\label{#4}
\end{sidewaysfigure}
}
\newcommand{\lplotC}[6] { %\parskip0pt
\begin{sidewaysfigure}[h]
\caption[#1]{#6}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#3}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#4}}
\label{#5}
\end{sidewaysfigure}
}
\newcommand{\spllistref}[1] {
The code for the S+ function for the call: \input{plots/#1} is found
in Listing \ref{#1} on page \pageref{#1}.
}
% =========== Intext Plots=================================================
\newcommand{\plotIntext}[4] { %\parskip0pt
\begin{figure}[htbp]
\caption[#1]{#4}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\label{#3}
\end{figure}
}
\newcommand{\plotBIntext}[5] { %\parskip0pt
\begin{figure}[htbp]
\caption[#1]{#5}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#3}}
\label{#4}
\end{figure}
}
\newcommand{\plotIntextPNG}[4] { %\parskip0pt
\begin{figure}[!htbp]
\caption[#1]{#4}
\centering{\includegraphics[type=png,read=.png,ext=.png,angle=\angle,width=\plotscale\textwidth]{#2}}
\label{#3}
\end{figure}
}
% =========== Plots continuing on next page ==============================
\newcommand{\plotCont}[4] { %\parskip0pt
\begin{figure}[ht]\ContinuedFloat
\caption[#1]{#4}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\label{#3}
\end{figure}
}
\newcommand{\plotBCont}[5] { %\parskip0pt
\begin{figure}[ht]\ContinuedFloat
\caption[#1]{#5}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#2}}
\centering{\includegraphics[angle=\angle,width=\plotscale\textwidth]{#3}}
\label{#4}
\end{figure}
}
%====== cuts single pages out of a multiple pages pdf ====================
\newcommand{\page}{1}
\newcommand{\cuttedplot}[4] { %\parskip0pt
\begin{figure}[htpb]
\caption[#1]{#4}
\centering{\includegraphics[page=\page, angle=\angle,width=\plotscale\textwidth]{#2}}
\label{#3}
\end{figure}
}
%==========================================================================
% macros used for tables
%==========================================================================
\newcommand{\dtable}[4]{
\begin{table}[!htbp]
\centering
\caption[#1]{#2}
\input{#3}\label{tab:#4}
\end{table}
}
\newcommand{\comptable}[2]{
\begin{threeparttable}
\input{#1}\vspace{-1cm}
\begin{tablenotes}\footnotesize
\item[] #2
\end{tablenotes}%
\end{threeparttable}
}
% control the width of tab within the verbatimtabinput environment
\renewcommand\verbatimtabsize{3\relax}
%==========================================================================
% style definitions
%==========================================================================
%-------------begin-GENERAL LAYOUT-----------
\pagestyle{scrheadings}
\addtokomafont{disposition}{\sffamily}
\addtokomafont{pageheadfoot}{\normalfont \footnotesize \sffamily}
\addtokomafont{pagenumber}{\footnotesize \sffamily}
\clearpairofpagestyles
\lohead{\vbox{\footnotesize{\DOC} \\ {\heada}}}
%\rohead{\vbox{{\headc} \\ \footnotesize{\DOC}}}
\lofoot{\footnotesize{Property of <Institution> -- strictly confidential}}
\rofoot[\pagemark]{\footnotesize{Page} \pagemark} % page number only outer right
%\chead{foobar} % name in the center
\setlength{\headheight}{26.35004pt} % Customize the height of the header
%-------------end-GENERAL LAYOUT-----------
\endinput