1 % Some article styles and page layout tweaks for the LaTeX Memoir class.
3 % Copyright 2009 Benjamin Mako Hill <mako@atdot.cc>
4 % Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
6 % Distributed as free software under the GNU GPL v3
8 % This file is heavily based on one by Kieran Healy
9 % available here: http://github.com/kjhealy/latex-custom-kjh/
15 % Use \symbolfootnote[0]{Footnote text} for a blank footnote.
16 % Useful for initial acknowledgment note.
17 \long\def\symbolfootnote[#1]#2{\begingroup%
18 \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
20 % put a period after the section numbers
21 \setsecnumformat{\csname the#1\endcsname.\enspace}
24 \makechapterstyle{article-1}{
25 \renewcommand{\rmdefault}{ugm}
26 \renewcommand{\sfdefault}{phv}
28 \setsecheadstyle{\large\scshape}
29 \setsubsecheadstyle{\normalsize\itshape}
30 \renewcommand{\printchaptername}{}
31 \renewcommand{\chapternamenum}{}
32 \renewcommand{\chapnumfont}{\chaptitlefont}
33 \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
34 \renewcommand{\afterchapternum}{}
35 \renewcommand{\printchaptername}{\secheadstyle}
36 \renewcommand{\cftchapterfont}{\normalfont}
37 \renewcommand{\cftchapterpagefont}{\normalfont\scshape}
38 \renewcommand{\cftchapterpresnum}{\scshape}
39 \captiontitlefont{\small}
41 % turn off chapter numbering
42 \counterwithout{section}{chapter}
43 \counterwithout{figure}{chapter}
44 \counterwithout{table}{chapter}
46 % reduce skip after section heading
47 \setaftersecskip{1.2ex}
49 \pretitle{\newline\centering \LARGE\scshape \MakeLowercase }
50 \posttitle{\par\vskip 1em}
51 \predate{\footnotesize \centering}
52 \postdate{\par\vskip 1em}
54 % 'abstract' title, bigger skip from title
55 \renewcommand{\abstractname}{}
58 % set name of bibliography to 'references'
59 \renewcommand{\bibname}{References}
63 \makechapterstyle{article-2}{
64 \renewcommand{\rmdefault}{ugm}
65 \renewcommand{\sfdefault}{phv}
67 \setsecheadstyle{\large\scshape}
68 \setsubsecheadstyle{\normalsize\itshape}
69 \setaftersubsubsecskip{-1em}
70 \setsubsubsecheadstyle{\bfseries}
71 \renewcommand{\printchaptername}{}
72 \renewcommand{\chapternamenum}{}
73 \renewcommand{\chapnumfont}{\chaptitlefont}
74 \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
75 \renewcommand{\afterchapternum}{}
76 \renewcommand{\printchaptername}{\secheadstyle}
77 \renewcommand{\cftchapterfont}{\normalfont}
78 \renewcommand{\cftchapterpagefont}{\normalfont\scshape}
79 \renewcommand{\cftchapterpresnum}{\scshape}
80 \captiontitlefont{\small}
82 % turn off chapter numbering
83 \counterwithout{section}{chapter}
84 \counterwithout{figure}{chapter}
85 \counterwithout{table}{chapter}
87 % supress chapter numbers
88 \maxsecnumdepth{chapter}
89 \setsecnumdepth{chapter}
91 % for numbered sections and subsections:
92 % (a) comment out the above stanza; (b) uncomment the one below
93 % \maxsecnumdepth{subsection}
94 % \setsecnumdepth{subsection}
96 % reduce skip after section heading
97 \setaftersecskip{1.7ex}
100 \pretitle{\flushleft\LARGE \itshape}
101 \posttitle{\par\vskip 0.5em}
102 \preauthor{\flushleft \large \lineskip 1em}
103 \postauthor{\par\lineskip 1em}
104 \predate{\flushleft\footnotesize\vspace{0.65em}}
105 \postdate{\par\vskip 1em}
107 % 'abstract' title, bigger skip from title
108 \renewcommand{\abstractname}{Abstract:}
109 \renewcommand{\abstractnamefont}{\normalfont\small\bfseries}
110 \renewcommand{\abstracttextfont}{\normalfont\small}
111 \setlength{\absparindent}{0em}
112 \setlength{\abstitleskip}{-1.5em}
115 % set name of bibliography to 'references'
116 \renewcommand{\bibname}{References}
121 \makechapterstyle{article-3}{
122 \renewcommand{\rmdefault}{ugm}
123 \renewcommand{\sfdefault}{phv}
125 \setsecheadstyle{\large\sffamily\bfseries\MakeUppercase}
126 \setsubsecheadstyle{\normalsize\itshape}
127 \setaftersubsubsecskip{-1em}
128 \setsubsubsecheadstyle{\small\bfseries}
129 \renewcommand{\printchaptername}{}
130 \renewcommand{\chapternamenum}{}
131 \renewcommand{\chapnumfont}{\chaptitlefont}
132 \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
133 \renewcommand{\afterchapternum}{}
134 \renewcommand{\printchaptername}{\secheadstyle}
135 \renewcommand{\cftchapterfont}{\normalfont}
136 \renewcommand{\cftchapterpagefont}{\normalfont\scshape}
137 \renewcommand{\cftchapterpresnum}{\scshape}
138 \captiontitlefont{\small}
140 % turn off chapter numbering
141 \counterwithout{section}{chapter}
142 \counterwithout{figure}{chapter}
143 \counterwithout{table}{chapter}
145 % supress chapter numbers
146 \maxsecnumdepth{chapter}
147 \setsecnumdepth{chapter}
149 % reduce skip after section heading
150 \setaftersecskip{1pt}
151 \setbeforesecskip{-1em}
153 % 'abstract' title, bigger skip from title
154 % \renewcommand{\maketitle}{\{\preauthor \theauthor\} \hfill \thetitle}
155 \renewcommand{\maketitle}{
156 {\Large\sffamily\bfseries\MakeUppercase\thetitle} \hfill
157 {\Large\sffamily\MakeUppercase\theauthor}
159 \renewcommand{\abstractname}{\normalfont\scriptsize\noindent}
160 \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
163 % set name of bibliography to 'references'
164 \renewcommand{\bibname}{References}
170 %%% Custom styles for headers and footers
172 \makepagestyle{mako-mem}
173 %\makeevenfoot{mako-mem}{\thepage}{}{}
174 %\makeoddfoot{mako-mem}{}{}{\thepage}
175 %\makeheadrule{mako-mem}{\textwidth}{\normalrulethickness}
176 \newcommand{\@makomarks}{%
177 \let\@mkboth\markboth
178 \def\chaptermark##1{%
180 \ifnum \c@secnumdepth >\m@ne
186 \def\sectionmark##1{%
189 \makepsmarks{mako-mem}{\@makomarks}
190 \makepsmarks{mako-mem}{}
191 \makeevenhead{mako-mem}{}{}{\scshape\thepage}
192 \makeoddhead{mako-mem}{}{}{\scshape\thepage}
194 %%% version control info in footers; requires vc package
195 % Make the style for vc-git revision control headers and footers
196 \makepagestyle{mako-mem-git}
197 \newcommand{\@gitmarks}{%
198 \let\@mkboth\markboth
199 \def\chaptermark##1{%
201 \ifnum \c@secnumdepth >\m@ne
207 \def\sectionmark##1{%
210 \makepsmarks{mako-mem-git}{\@gitmarks}
211 \makeevenhead{mako-mem-git}{}{}{\scshape\thepage}
212 \makeoddhead{mako-mem-git}{}{}{\scshape\thepage}
213 \makeevenfoot{mako-mem-git}{}{\texttt{\footnotesize{\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}}{}
214 \makeoddfoot{mako-mem-git}{}{\texttt{\footnotesize \textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}{}
216 %%% print a datestamp from ShareLaTeX
217 \makepagestyle{mako-mem-sharelatex}
218 \newcommand{\@slmarks}{%
219 \let\@mkboth\markboth
220 \def\chaptermark##1{%
222 \ifnum \c@secnumdepth >\m@ne
228 \def\sectionmark##1{%
231 \makepsmarks{mako-mem-sharelatex}{\@slmarks}
232 \makeevenhead{mako-mem-sharelatex}{}{}{\scshape\thepage}
233 \makeoddhead{mako-mem-sharelatex}{}{}{\scshape\thepage}
234 \makeevenfoot{mako-mem-sharelatex}{}{\texttt{\footnotesize{\textcolor{BrickRed}{Buildstamp/Version:~\pdfdate}}}}{}
235 \makeoddfoot{mako-mem-sharelatex}{}{\texttt{\footnotesize{\textcolor{BrickRed}{Buildstamp/Version:~\pdfdate}}}}{}
237 %% Create a command to make a note at the top of the first page describing the
238 %% publication status of the paper.
239 \newcommand{\published}[1]{%
242 \renewcommand{\maketitlehooka}{%
243 \par\noindent\footnotesize \puB}
246 \makeevenhead{memo}{}{}{}
247 \makeoddhead{memo}{}{}{}
249 \makeevenfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}
250 \makeoddfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}