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

Benjamin Mako Hill || Want to submit a patch?