-
Notifications
You must be signed in to change notification settings - Fork 2
/
header-partial.tex
96 lines (88 loc) · 2.72 KB
/
header-partial.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
% Formatting of tables & knitr::kable and kableExtra functionality
\usepackage{float}
\usepackage{colortbl}
\usepackage{pdflscape}
\usepackage{tabu}
\usepackage{threeparttable}
% Line numbering
$if(numberlines)$
\usepackage$if(numberlines-options)$[$numberlines-options[,]$]$endif${lineno}
\linenumbers
$endif$
% endfloat stuff
$if(endfloat)$
\usepackage[$if(endfloatoption)$$for(endfloatoption)$$endfloatoption$$sep$,$endfor$$else$tablesfirst,nomarkers$endif$]{endfloat}
$endif$
% fancyhdr pagestyle
$if(fancyhdr)$
\usepackage{fancyhdr}
$if(fancyhdr.first)$
\fancypagestyle{myfirst}{%
\fancyfoot[C]{\thepage}% Default to just page number
%
$if(fancyhdr.first.headleft)$
\fancyhead[L]{$fancyhdr.first.headleft$}%
$endif$
$if(fancyhdr.first.headcenter)$
\fancyhead[C]{$fancyhdr.first.headcenter$}%
$endif$
$if(fancyhdr.first.headright)$
\fancyhead[R]{$fancyhdr.first.headright$}%
$endif$
$if(fancyhdr.first.headrulewidth)$
\renewcommand{\headrulewidth}{$fancyhdr.first.headrulewidth$}
$endif$
%
$if(fancyhdr.first.footleft)$
\fancyfoot[L]{$fancyhdr.first.footleft$}%
$endif$
$if(fancyhdr.first.footcenter)$
\fancyfoot[C]{$fancyhdr.first.footcenter$}%
$endif$
$if(fancyhdr.first.footright)$
\fancyfoot[R]{$fancyhdr.first.footright$}%
$endif$
$if(fancyhdr.first.footrulewidth)$
\renewcommand{\footrulewidth}{$fancyhdr.first.footrulewidth$}
$endif$
}
$endif$
$if(fancyhdr.subsequent)$
\fancypagestyle{mysubsequent}{%
\fancyfoot[C]{\thepage}% Default to just page number
%
$if(fancyhdr.subsequent.headleft)$
\fancyhead[L]{$fancyhdr.subsequent.headleft$}%
$endif$
$if(fancyhdr.subsequent.headcenter)$
\fancyhead[C]{$fancyhdr.subsequent.headcenter$}%
$endif$
$if(fancyhdr.subsequent.headright)$
\fancyhead[R]{$fancyhdr.subsequent.headright$}%
$endif$
$if(fancyhdr.subsequent.headrulewidth)$
\renewcommand{\headrulewidth}{$fancyhdr.subsequent.headrulewidth$}
$endif$
%
$if(fancyhdr.subsequent.footleft)$
\fancyfoot[L]{$fancyhdr.subsequent.footleft$}%
$endif$
$if(fancyhdr.subsequent.footcenter)$
\fancyfoot[C]{$fancyhdr.subsequent.footcenter$}%
$endif$
$if(fancyhdr.subsequent.footright)$
\fancyfoot[R]{$fancyhdr.subsequent.footright$}%
$endif$
$if(fancyhdr.subsequent.footrulewidth)$
\renewcommand{\footrulewidth}{$fancyhdr.subsequent.footrulewidth$}
$endif$
}
$endif$
$endif$
% Environment for keywords
\makeatletter
\newcommand\keywordsname{Keywords}
\newenvironment*{keywords}[1][\keywordsname]{\if@twocolumn \else \small \quotation \fi \textbf{\textit{#1 ---}}}{\if@twocolumn \else \small \endquotation \fi}
\makeatother
% Environment for abstract that takes new abstract name
\newenvironment{renameableabstract}[1][\abstractname]{\let\oldabstractname\abstractname \renewcommand{\abstractname}{#1} \begin{abstract}}{\end{abstract} \renewcommand{\abstractname}{\oldabstractname}}