]> projects.mako.cc - latex_mako/blob - paper_template/mako-mem.sty
8fe47193a737358447d68a29bb1515213f8900c0
[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\MakeLowercase} 
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  % reduce skip after section heading
88  \setaftersecskip{1.7ex}
89  
90  % Title flush left
91  \pretitle{\flushleft\LARGE \itshape}
92  \posttitle{\par\vskip 0.5em}
93  \preauthor{\flushleft  \large \lineskip 1em}
94  \postauthor{\par\lineskip 1em}
95  \predate{\flushleft\footnotesize\vspace{0.65em}}
96  \postdate{\par\vskip 1em}
97  
98  % 'abstract' title, bigger skip from title
99  \renewcommand{\abstractname}{Abstract:}
100  \renewcommand{\abstractnamefont}{\normalfont\small\bfseries}
101  \renewcommand{\abstracttextfont}{\normalfont\small}
102  \setlength{\absparindent}{0em}
103  \setlength{\abstitleskip}{-1.5em}
104  \abstractrunin
105
106  % set name of bibliography to 'references'
107  \renewcommand{\bibname}{References}
108 }
109
110 % >> article-3 <<
111 \makechapterstyle{article-3}{
112  \renewcommand{\rmdefault}{ugm}
113  \renewcommand{\sfdefault}{phv}
114
115  \setsecheadstyle{\large\sffamily\bfseries\MakeUppercase} 
116  \setsubsecheadstyle{\normalsize\itshape} 
117  \setaftersubsubsecskip{-1em}
118  \setsubsubsecheadstyle{\small\bfseries}
119  \renewcommand{\printchaptername}{} 
120  \renewcommand{\chapternamenum}{} 
121  \renewcommand{\chapnumfont}{\chaptitlefont} 
122  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
123  \renewcommand{\afterchapternum}{} 
124  \renewcommand{\printchaptername}{\secheadstyle}
125  \renewcommand{\cftchapterfont}{\normalfont} 
126  \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
127  \renewcommand{\cftchapterpresnum}{\scshape} 
128  \captiontitlefont{\small}
129
130  % turn off chapter numbering
131  \counterwithout{section}{chapter}
132  \counterwithout{figure}{chapter}
133  \counterwithout{table}{chapter}
134  
135  % supress chapter numbers 
136  \maxsecnumdepth{chapter} 
137  \setsecnumdepth{chapter}
138
139  % reduce skip after section heading
140  \setaftersecskip{1pt}
141  \setbeforesecskip{-1em}
142  
143  % 'abstract' title, bigger skip from title
144  % \renewcommand{\maketitle}{\{\preauthor \theauthor\} \hfill \thetitle}
145  \renewcommand{\maketitle}{
146     {\Large\sffamily\bfseries\MakeUppercase\thetitle} \hfill
147     {\Large\sffamily\MakeUppercase\theauthor}
148     \vskip 0.7em}
149  \renewcommand{\abstractname}{\normalfont\scriptsize\noindent}
150  \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
151  \abstractrunin
152
153  % set name of bibliography to 'references'
154  \renewcommand{\bibname}{References}
155
156  \parindent 0pt
157
158 }
159
160 %%% Custom styles for headers and footers
161 %%% Basic 
162 \makepagestyle{mako-mem}
163 %\makeevenfoot{mako-mem}{\thepage}{}{}
164 %\makeoddfoot{mako-mem}{}{}{\thepage}
165 %\makeheadrule{mako-mem}{\textwidth}{\normalrulethickness}
166 \newcommand{\@makomarks}{%
167   \let\@mkboth\markboth
168   \def\chaptermark##1{%
169     \markboth{%
170       \ifnum \c@secnumdepth >\m@ne
171         \if@mainmatter
172           \thechapter. \ %
173         \fi
174       \fi
175       ##1}{}}
176   \def\sectionmark##1{%
177     \markright{##1}}
178 }
179 \makepsmarks{mako-mem}{\@makomarks}
180 \makepsmarks{mako-mem}{}
181 \makeevenhead{mako-mem}{}{}{\scshape\thepage}
182 \makeoddhead{mako-mem}{}{}{\scshape\thepage}
183
184 %%% version control info in footers; requires vc package 
185 % Make the style for vc-git revision control headers and footers
186 \makepagestyle{kjhgit}
187 \newcommand{\@kjhgitmarks}{%
188   \let\@mkboth\markboth
189   \def\chaptermark##1{%
190     \markboth{%
191       \ifnum \c@secnumdepth >\m@ne
192         \if@mainmatter
193           \thechapter. \ %
194         \fi
195       \fi
196       ##1}{}}
197   \def\sectionmark##1{%
198     \markright{##1}}
199 }
200 \makepsmarks{kjhgit}{\@kjhgitmarks}
201 \makeevenhead{kjhgit}{}{}{\scshape\thepage}
202 \makeoddhead{kjhgit}{}{}{\scshape\thepage}
203 \makeevenfoot{kjhgit}{}{\texttt{\footnotesize{\textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}}{}
204 \makeoddfoot{kjhgit}{}{\texttt{\footnotesize \textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}{}
205
206 %% Create a command to make a note at the top of the first page describing the
207 %% publication status of the paper. 
208 \newcommand{\published}[1]{% 
209    \gdef\puB{#1}} 
210    \newcommand{\puB}{} 
211    \renewcommand{\maketitlehooka}{% 
212        \par\noindent\footnotesize \puB} 
213
214 \makepagestyle{memo}
215 \makeevenhead{memo}{}{}{}
216 \makeoddhead{memo}{}{}{}
217
218 \makeevenfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}
219 \makeoddfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}
220
221
222 \endinput
223

Benjamin Mako Hill || Want to submit a patch?