-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmemoir-article-styles.sty
262 lines (225 loc) · 8.48 KB
/
memoir-article-styles.sty
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
251
252
253
254
255
256
257
258
259
260
261
%%% Some article styles and page layout tweaks for the memoir class
%%% Choose these as article or pagestyles for your memoir document.
%%% Kieran Healy
%%% --------------------------------------------------
%%% Some useful bits and pieces
%%% --------------------------------------------------
%% Blank footnote command.
% Use \symbolfootnote[0]{Footnote text} for a blank footnote.
% Useful for an initial acknowledgment note.
\long\def\symbolfootnote[#1]#2{\begingroup%
\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
%% Redefine \and and \andnext to remove tabular environment.
%% Needed below for custom article-styles when multiple authors are present.
\renewcommand{\and}{\, }
\renewcommand*{\andnext}{%
\\\medskip }
%% Custom hanging indent for vita items
\def\mybibind{\hangindent=1 true cm\hangafter=1 \noindent}
%%% --------------------------------------------------
%%% Style: memo-comments
%%% For short notes.
%%% --------------------------------------------------
% Make the style for Chapters and sections
\makechapterstyle{memo-comments}{
\renewcommand\thesection{\arabic{section}}
\setsecheadstyle{\LARGE\sffamily}
\setsubsecheadstyle{\Large\sffamily}
\setsubsubsecheadstyle{\normalsize\sffamily\itshape}
\renewcommand{\printchaptername}{}
\renewcommand{\chapternamenum}{}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
\renewcommand{\afterchapternum}{}
\renewcommand{\printchaptername}{\secheadstyle}
\renewcommand{\cftchapterfont}{\normalfont}
\renewcommand{\cftchapterpagefont}{\normalfont\sffamily}
\renewcommand{\cftchapterpresnum}{\sffamily}
%\renewcommand{\cftchapterleader}{}
%\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
\captiontitlefont{\small}
\settocdepth{chapter}
\maxsecnumdepth{chapter}
\setsecnumdepth{chapter}
% reduce skip after section heading
\setaftersecskip{1.7ex}
% Title
\pretitle{\begin{flushleft}\LARGE\sffamily\bfseries}
\posttitle{\end{flushleft}\par\vskip 0.5em}
\preauthor{\begin{flushleft}\Large\sffamily}
\postauthor{\end{flushleft}}
\predate{\begin{flushleft}\sffamily\footnotesize\vspace{0.9em}}
\postdate{\end{flushleft}\par\vskip 2em}
}
%%% --------------------------------------------------
%%% Style: article-4 (based on AJS)
%%% --------------------------------------------------
%% Make the style for Chapters and sections
\makechapterstyle{article-4}{
\setsecheadstyle{\Large\scshape\MakeLowercase}
\setsubsecheadstyle{\normalsize\scshape\MakeLowercase}
\setaftersubsubsecskip{-1em}
\setsubsubsecheadstyle{\small\bfseries}
\renewcommand{\printchaptername}{}
\renewcommand{\chapternamenum}{}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
\renewcommand{\afterchapternum}{}
\renewcommand{\printchaptername}{\secheadstyle}
\renewcommand{\cftchapterfont}{\normalfont}
\renewcommand{\cftchapterpagefont}{\normalfont\scshape}
\renewcommand{\cftchapterpresnum}{\scshape}
\captiontitlefont{\small}
\maxsecnumdepth{chapter}
\setsecnumdepth{chapter}
% reduce skip after section heading
\setaftersecskip{1.7ex}
% set name of bibliography to 'references'
%\renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}
% % Title flush left
\pretitle{\par\vskip 0.5em
\begin{flushleft}\LARGE\bfseries}
\posttitle{\end{flushleft}\par\vskip 0.5em}
\preauthor{\begin{flushleft}\normalsize\bigskip}
\postauthor{\end{flushleft}}
\predate{\begin{flushleft}\normalsize}
\postdate{\end{flushleft}}
% 'abstract' bigger skip from title
\addto\captionsamerican{\renewcommand{\abstractname}{}}
\renewcommand{\abstractname}{}
\renewcommand{\abstracttextfont}{\normalfont\scriptsize}
\abstractrunin
}
%%% --------------------------------------------------
%%% Custom styles for headers and footers The chapterstyles above
%%% style sections/subsections and titles, etc. These pagestyles
%%% control the running headers and footers. So far there's just one.
%%% --------------------------------------------------
%%%
%%% Basic
%%%
\makepagestyle{kjh}
%\makeevenfoot{kjh}{\thepage}{}{}
%\makeoddfoot{kjh}{}{}{\thepage}
%\makeheadrule{kjh}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhmarks}{%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\thechapter. \ %
\fi
\fi
##1}{}}
\def\sectionmark##1{%
\markright{##1}}
}
\makepsmarks{kjh}{\@kjhmarks}
\makepsmarks{kjh}{}
\makeevenhead{kjh}{}{}{\scshape\thepage}
\makeoddhead{kjh}{}{}{\scshape\thepage}
%%%
%%% RCS in footer
%%%
% Make the style for RCS revision control headers and footers
\makepagestyle{kjhrcs}
% \makeheadrule{kjhrcs}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhrcsmarks}{%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\thechapter. \ %
\fi
\fi
##1}{}}
\def\sectionmark##1{%
\markright{##1}}
}
\makepsmarks{kjhrcs}{\@kjhrcsmarks}
%\makeevenhead{kjhrcs}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}
%\makeoddhead{kjhrcs}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}
\makeevenfoot{kjhrcs}{\texttt{\footnotesize\rcsInfoFile}}{\scshape\thepage}{\footnotesize \emph{Rev} \texttt{\rcsInfoRevision \ \rcsInfoDate}}
\makeoddfoot{kjhrcs}{\texttt{\footnotesize\rcsInfoFile}}{\scshape\thepage}{\footnotesize \emph{Rev} \texttt{\rcsInfoRevision \ \rcsInfoDate}}
%%%
%%% Mercurial rev info in footers
%%%
% Make the style for hg revision control headers and footers
\makepagestyle{kjhhg}
% \makeheadrule{kjhhg}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhhgmarks}{%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\thechapter. \ %
\fi
\fi
##1}{}}
\def\sectionmark##1{%
\markright{##1}}
}
\makepsmarks{kjhhg}{\@kjhhgmarks}
%\makeevenhead{kjhhg}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}
%\makeoddhead{kjhhg}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}
\makeevenfoot{kjhhg}{\texttt{\footnotesize \hgkw{Filename}}}{\scshape\thepage}{\texttt{\footnotesize Rev \hgkw{LastChangedRevision} on \hgfilemonth\ \hgfileday, \hgfileyear}}
\makeoddfoot{kjhhg}{\texttt{\footnotesize \hgkw{Filename}}}{\scshape\thepage}{\texttt{\footnotesize Rev \hgkw{LastChangedRevision} on \hgfilemonth\ \hgfileday, \hgfileyear}}
%%%
%%% Git info in footers; requires vc package
%%%
% Make the style for vc-git revision control headers and footers
\makepagestyle{kjhgit}
% \makeheadrule{kjhgit}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhgitmarks}{%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\thechapter. \ %
\fi
\fi
##1}{}}
\def\sectionmark##1{%
\markright{##1}}
}
\makepsmarks{kjhgit}{\@kjhgitmarks}
%\makeevenhead{kjhgit}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}
%\makeoddhead{kjhgit}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}
\makeevenfoot{kjhgit}{}{\scshape\thepage}{\texttt{\footnotesize \VCRevision\ on \VCDateTEX}}
\makeoddfoot{kjhgit}{}{\scshape\thepage}{\texttt{\footnotesize \VCRevision\ on \VCDateTEX}}
%%%
%%% Custom appendix
%%%
% % Make the style for headers and footers in the Appendix
% \makepagestyle{kjhappendix}
% %\makeevenfoot{kjh}{\thepage}{}{}
% %\makeoddfoot{kjh}{}{}{\thepage}
% \makeheadrule{kjhapp}{\textwidth}{\normalrulethickness}
% \newcommand{\@kjhappmarks}{%
% \let\@mkboth\markboth
% \def\chaptermark##1{%
% \markboth{%
% \ifnum \c@secnumdepth >\m@ne
% \if@mainmatter
% \thechapter. \ %
% \fi
% \fi
% ##1}{}}
% \def\sectionmark##1{%
% \markright{##1}}
% }
% \makepsmarks{kjhappendix}{\@kjhappmarks}
% \makeevenhead{kjhappendix}{\footnotesize\scshape Appendix}{}{\scshape\thepage}
% \makeoddhead{kjhappendix}{}{}{\footnotesize Data and Methods for \rightmark\normalsize\ \ \scshape\thepage}
%% Create a command to make a note at the top of the first page describing the
%% publication status of the paper.
\newcommand{\published}[1]{%
\gdef\puB{#1}}
\newcommand{\puB}{}
\renewcommand{\maketitlehooka}{%
\par\noindent\footnotesize \puB}
\endinput