added code to deal with utf8 bibliographies
[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 % blank footnote
12 % Use \symbolfootnote[0]{Footnote text} for a blank footnote. 
13 % Useful for initial acknowledgment note.
14 \long\def\symbolfootnote[#1]#2{\begingroup%
15 \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
16
17 % >> article-1 << 
18 \makechapterstyle{article-1}{
19  \setsecheadstyle{\large\scshape}
20  \setsubsecheadstyle{\normalsize\itshape}
21  \renewcommand{\printchaptername}{}
22  \renewcommand{\chapternamenum}{}
23  \renewcommand{\chapnumfont}{\chaptitlefont}
24  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
25  \renewcommand{\afterchapternum}{}
26  \renewcommand{\printchaptername}{\secheadstyle}
27  \renewcommand{\cftchapterfont}{\normalfont}
28  \renewcommand{\cftchapterpagefont}{\normalfont\scshape}
29  \renewcommand{\cftchapterpresnum}{\scshape}
30  \captiontitlefont{\small}
31  
32  % turn off chapter numbering
33  \counterwithout{section}{chapter}
34  \counterwithout{figure}{chapter}
35  \counterwithout{table}{chapter}
36  
37  % reduce skip after section heading
38  \setaftersecskip{1.2ex}
39  
40  \pretitle{\newline\centering \LARGE\scshape \MakeLowercase }
41  \posttitle{\par\vskip 1em}
42  \predate{\footnotesize \centering}
43  \postdate{\par\vskip 1em}
44  
45  % 'abstract' title, bigger skip from title
46  \renewcommand{\abstractname}{}
47  \abstractrunin
48
49 % set name of bibliography to 'references'
50 \renewcommand{\bibname}{References}
51 }
52
53 % >> article-2 <<
54 \makechapterstyle{article-2}{
55  \setsecheadstyle{\Large\scshape\MakeLowercase} 
56  \setsubsecheadstyle{\normalsize\itshape} 
57  \setaftersubsubsecskip{-1em}
58  \setsubsubsecheadstyle{\small\bfseries}
59  \renewcommand{\printchaptername}{} 
60  \renewcommand{\chapternamenum}{} 
61  \renewcommand{\chapnumfont}{\chaptitlefont} 
62  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
63  \renewcommand{\afterchapternum}{} 
64  \renewcommand{\printchaptername}{\secheadstyle}
65  \renewcommand{\cftchapterfont}{\normalfont} 
66  \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
67  \renewcommand{\cftchapterpresnum}{\scshape} 
68  \captiontitlefont{\small}
69  
70  % turn off chapter numbering
71  \counterwithout{section}{chapter}
72  \counterwithout{figure}{chapter}
73  \counterwithout{table}{chapter}
74  
75  % supress chapter numbers 
76  \maxsecnumdepth{chapter} 
77  \setsecnumdepth{chapter}
78
79  % reduce skip after section heading
80  \setaftersecskip{1.7ex}
81  
82  % Title flush left
83  \pretitle{\flushleft\LARGE \itshape}
84  \posttitle{\par\vskip 0.5em}
85  \preauthor{\flushleft  \large \lineskip 1em}
86  \postauthor{\par\lineskip 1em}
87  \predate{\flushleft\footnotesize\vspace{0.65em}}
88  \postdate{\par\vskip 1em}
89  
90  % 'abstract' title, bigger skip from title
91  \renewcommand{\abstractname}{\normalfont\scriptsize\noindent}
92  \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
93  \abstractrunin
94
95  % set name of bibliography to 'references'
96  \renewcommand{\bibname}{References}
97 }
98
99 %%% Custom styles for headers and footers
100    
101 %%% Basic 
102 \makepagestyle{mako-mem}
103 %\makeevenfoot{mako-mem}{\thepage}{}{}
104 %\makeoddfoot{mako-mem}{}{}{\thepage}
105 %\makeheadrule{mako-mem}{\textwidth}{\normalrulethickness}
106 \newcommand{\@makomarks}{%
107   \let\@mkboth\markboth
108   \def\chaptermark##1{%
109     \markboth{%
110       \ifnum \c@secnumdepth >\m@ne
111         \if@mainmatter
112           \thechapter. \ %
113         \fi
114       \fi
115       ##1}{}}
116   \def\sectionmark##1{%
117     \markright{##1}}
118 }
119 \makepsmarks{mako-mem}{\@makomarks}
120 \makepsmarks{mako-mem}{}
121 \makeevenhead{mako-mem}{}{}{\scshape\thepage}
122 \makeoddhead{mako-mem}{}{}{\scshape\thepage}
123
124 %%% version control info in footers; requires vc package 
125 % Make the style for vc-git revision control headers and footers
126 \makepagestyle{kjhgit}
127 \newcommand{\@kjhgitmarks}{%
128   \let\@mkboth\markboth
129   \def\chaptermark##1{%
130     \markboth{%
131       \ifnum \c@secnumdepth >\m@ne
132         \if@mainmatter
133           \thechapter. \ %
134         \fi
135       \fi
136       ##1}{}}
137   \def\sectionmark##1{%
138     \markright{##1}}
139 }
140 \makepsmarks{kjhgit}{\@kjhgitmarks}
141 \makeevenhead{kjhgit}{}{}{\scshape\thepage}
142 \makeoddhead{kjhgit}{}{}{\scshape\thepage}
143 \makeevenfoot{kjhgit}{}{\texttt{\footnotesize{\textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}}{}
144 \makeoddfoot{kjhgit}{}{\texttt{\footnotesize \textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}{}
145
146 %% Create a command to make a note at the top of the first page describing the
147 %% publication status of the paper. 
148 \newcommand{\published}[1]{% 
149    \gdef\puB{#1}} 
150    \newcommand{\puB}{} 
151    \renewcommand{\maketitlehooka}{% 
152        \par\noindent\footnotesize \puB} 
153
154 \endinput
155

Benjamin Mako Hill || Want to submit a patch?