]> code.communitydata.science - cdsc_tex.git/blob - paper_template/mako-mem.sty
updated to use biber/biblatex instead of bitex
[cdsc_tex.git] / paper_template / mako-mem.sty
1 % Some article styles and page layout tweaks for the LaTeX Memoir class.
2 %
3 % Copyright 2009 Benjamin Mako Hill <mako@atdot.cc>
4 % Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
5
6 % Distributed as free software under the GNU GPL v3
7
8 % This file is heavily based on one by Kieran Healy
9 % available here: http://github.com/kjhealy/latex-custom-kjh/
10
11 \usepackage{lastpage}
12
13 % blank footnote
14 % Use \symbolfootnote[0]{Footnote text} for a blank footnote. 
15 % Useful for initial acknowledgment note.
16 \long\def\symbolfootnote[#1]#2{\begingroup%
17 \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
18
19 % put a period after the section numbers
20 \setsecnumformat{\csname the#1\endcsname.\enspace}
21
22 % >> article-1 << 
23 \makechapterstyle{article-1}{
24  \renewcommand{\rmdefault}{ugm}
25  \renewcommand{\sfdefault}{phv}
26
27  \setsecheadstyle{\large\scshape}
28  \setsubsecheadstyle{\normalsize\itshape}
29  \renewcommand{\printchaptername}{}
30  \renewcommand{\chapternamenum}{}
31  \renewcommand{\chapnumfont}{\chaptitlefont}
32  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
33  \renewcommand{\afterchapternum}{}
34  \renewcommand{\printchaptername}{\secheadstyle}
35  \renewcommand{\cftchapterfont}{\normalfont}
36  \renewcommand{\cftchapterpagefont}{\normalfont\scshape}
37  \renewcommand{\cftchapterpresnum}{\scshape}
38  \captiontitlefont{\small}
39  
40  % turn off chapter numbering
41  \counterwithout{section}{chapter}
42  \counterwithout{figure}{chapter}
43  \counterwithout{table}{chapter}
44  
45  % reduce skip after section heading
46  \setaftersecskip{1.2ex}
47  
48  \pretitle{\newline\centering \LARGE\scshape \MakeLowercase }
49  \posttitle{\par\vskip 1em}
50  \predate{\footnotesize \centering}
51  \postdate{\par\vskip 1em}
52  
53  % 'abstract' title, bigger skip from title
54  \renewcommand{\abstractname}{}
55  \abstractrunin
56
57 % set name of bibliography to 'references'
58 \renewcommand{\bibname}{References}
59 }
60
61 % >> article-2 <<
62 \makechapterstyle{article-2}{
63  \renewcommand{\rmdefault}{ugm}
64  \renewcommand{\sfdefault}{phv}
65
66  \setsecheadstyle{\large\scshape} 
67  \setsubsecheadstyle{\normalsize\itshape} 
68  \setaftersubsubsecskip{-1em}
69  \setsubsubsecheadstyle{\bfseries}
70  \renewcommand{\printchaptername}{} 
71  \renewcommand{\chapternamenum}{} 
72  \renewcommand{\chapnumfont}{\chaptitlefont} 
73  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
74  \renewcommand{\afterchapternum}{} 
75  \renewcommand{\printchaptername}{\secheadstyle}
76  \renewcommand{\cftchapterfont}{\normalfont} 
77  \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
78  \renewcommand{\cftchapterpresnum}{\scshape} 
79  \captiontitlefont{\small}
80  
81  % turn off chapter numbering
82  \counterwithout{section}{chapter}
83  \counterwithout{figure}{chapter}
84  \counterwithout{table}{chapter}
85  
86  % supress chapter numbers 
87  \maxsecnumdepth{chapter} 
88  \setsecnumdepth{chapter}
89  
90  % for numbered sections and subsections:
91  % (a) comment out the above stanza; (b) uncomment the one below
92  % \maxsecnumdepth{subsection} 
93  % \setsecnumdepth{subsection}
94
95  % reduce skip after section heading
96  \setaftersecskip{1.7ex}
97  
98  % Title flush left
99  \pretitle{\flushleft\LARGE \itshape}
100  \posttitle{\par\vskip 0.5em}
101  \preauthor{\flushleft  \large \lineskip 1em}
102  \postauthor{\par\lineskip 1em}
103  \predate{\flushleft\footnotesize\vspace{0.65em}}
104  \postdate{\par\vskip 1em}
105  
106  % 'abstract' title, bigger skip from title
107  \renewcommand{\abstractname}{Abstract:}
108  \renewcommand{\abstractnamefont}{\normalfont\small\bfseries}
109  \renewcommand{\abstracttextfont}{\normalfont\small}
110  \setlength{\absparindent}{0em}
111  \setlength{\abstitleskip}{-1.5em}
112  \abstractrunin
113
114  % set name of bibliography to 'references'
115  \renewcommand{\bibname}{References}
116 }
117
118
119 % >> article-3 <<
120 \makechapterstyle{article-3}{
121  \renewcommand{\rmdefault}{ugm}
122  \renewcommand{\sfdefault}{phv}
123
124  \setsecheadstyle{\large\sffamily\bfseries\MakeUppercase} 
125  \setsubsecheadstyle{\normalsize\itshape} 
126  \setaftersubsubsecskip{-1em}
127  \setsubsubsecheadstyle{\small\bfseries}
128  \renewcommand{\printchaptername}{} 
129  \renewcommand{\chapternamenum}{} 
130  \renewcommand{\chapnumfont}{\chaptitlefont} 
131  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
132  \renewcommand{\afterchapternum}{} 
133  \renewcommand{\printchaptername}{\secheadstyle}
134  \renewcommand{\cftchapterfont}{\normalfont} 
135  \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
136  \renewcommand{\cftchapterpresnum}{\scshape} 
137  \captiontitlefont{\small}
138
139  % turn off chapter numbering
140  \counterwithout{section}{chapter}
141  \counterwithout{figure}{chapter}
142  \counterwithout{table}{chapter}
143  
144  % supress chapter numbers 
145  \maxsecnumdepth{chapter} 
146  \setsecnumdepth{chapter}
147
148  % reduce skip after section heading
149  \setaftersecskip{1pt}
150  \setbeforesecskip{-1em}
151  
152  % 'abstract' title, bigger skip from title
153  % \renewcommand{\maketitle}{\{\preauthor \theauthor\} \hfill \thetitle}
154  \renewcommand{\maketitle}{
155     {\Large\sffamily\bfseries\MakeUppercase\thetitle} \hfill
156     {\Large\sffamily\MakeUppercase\theauthor}
157     \vskip 0.7em}
158  \renewcommand{\abstractname}{\normalfont\scriptsize\noindent}
159  \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
160  \abstractrunin
161
162  % set name of bibliography to 'references'
163  \renewcommand{\bibname}{References}
164
165  \parindent 0pt
166
167 }
168
169 %%% Custom styles for headers and footers
170 %%% Basic 
171 \makepagestyle{mako-mem}
172 %\makeevenfoot{mako-mem}{\thepage}{}{}
173 %\makeoddfoot{mako-mem}{}{}{\thepage}
174 %\makeheadrule{mako-mem}{\textwidth}{\normalrulethickness}
175 \newcommand{\@makomarks}{%
176   \let\@mkboth\markboth
177   \def\chaptermark##1{%
178     \markboth{%
179       \ifnum \c@secnumdepth >\m@ne
180         \if@mainmatter
181           \thechapter. \ %
182         \fi
183       \fi
184       ##1}{}}
185   \def\sectionmark##1{%
186     \markright{##1}}
187 }
188 \makepsmarks{mako-mem}{\@makomarks}
189 \makepsmarks{mako-mem}{}
190 \makeevenhead{mako-mem}{}{}{\scshape\thepage}
191 \makeoddhead{mako-mem}{}{}{\scshape\thepage}
192
193 %%% version control info in footers; requires vc package 
194 % Make the style for vc-git revision control headers and footers
195 \makepagestyle{mako-mem-git}
196 \newcommand{\@gitmarks}{%
197   \let\@mkboth\markboth
198   \def\chaptermark##1{%
199     \markboth{%
200       \ifnum \c@secnumdepth >\m@ne
201         \if@mainmatter
202           \thechapter. \ %
203         \fi
204       \fi
205       ##1}{}}
206   \def\sectionmark##1{%
207     \markright{##1}}
208 }
209 \makepsmarks{mako-mem-git}{\@gitmarks}
210 \makeevenhead{mako-mem-git}{}{}{\scshape\thepage}
211 \makeoddhead{mako-mem-git}{}{}{\scshape\thepage}
212 \makeevenfoot{mako-mem-git}{}{\texttt{\footnotesize{\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}}{}
213 \makeoddfoot{mako-mem-git}{}{\texttt{\footnotesize \textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}{}
214
215 %% Create a command to make a note at the top of the first page describing the
216 %% publication status of the paper. 
217 \newcommand{\published}[1]{% 
218    \gdef\puB{#1}} 
219    \newcommand{\puB}{} 
220    \renewcommand{\maketitlehooka}{% 
221        \par\noindent\footnotesize \puB} 
222
223 \makepagestyle{memo}
224 \makeevenhead{memo}{}{}{}
225 \makeoddhead{memo}{}{}{}
226
227 \makeevenfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}
228 \makeoddfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}
229
230
231 \endinput
232

Community Data Science Collective || Want to submit a patch?