added support for the vc plugin
[latex_mako] / mako-mem.sty
1 % Some article styles and page layout tweaks for the memoir class
2 %
3 % This file is heavily based on one by Kieran Healy
4
5 % blank footnote
6 % Use \symbolfootnote[0]{Footnote text} for a blank footnote. 
7 % Useful for initial acknowledgment note.
8 \long\def\symbolfootnote[#1]#2{\begingroup%
9 \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
10
11 % >> article-2 <<
12 % the name needs to start with article-n so that it automatically gets
13 % adjusted to keep the articles about the same. I've kept article-2
14 % since this is what the same rough thing was called in Kieran's
15 % document.
16
17 % Make the style for Chapters and sections
18    \makechapterstyle{article-2}{
19     \setsecheadstyle{\Large\scshape\MakeLowercase} 
20     \setsubsecheadstyle{\normalsize\itshape} 
21         \setaftersubsubsecskip{-1em}
22     \setsubsubsecheadstyle{\small\bfseries}
23     \renewcommand{\printchaptername}{} 
24     \renewcommand{\chapternamenum}{} 
25     \renewcommand{\chapnumfont}{\chaptitlefont} 
26     \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
27     \renewcommand{\afterchapternum}{} 
28     \renewcommand{\printchaptername}{\secheadstyle}
29     \renewcommand{\cftchapterfont}{\normalfont} 
30     \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
31     \renewcommand{\cftchapterpresnum}{\scshape} 
32     \captiontitlefont{\small}
33     
34     % turn off section numbering
35     \counterwithout{section}{chapter}
36     
37     % supress chapter numbers 
38     \maxsecnumdepth{chapter} 
39     \setsecnumdepth{chapter}
40
41     % reduce skip after section heading
42     \setaftersecskip{1.7ex}
43     
44     % Title flush left
45     \pretitle{\flushleft\LARGE \itshape}
46     \posttitle{\par\vskip 0.5em}
47     \preauthor{\flushleft  \large \lineskip 1em}
48     \postauthor{\par\lineskip 1em}
49     \predate{\flushleft\footnotesize\vspace{0.65em}}
50     \postdate{\par\vskip 1em}
51     
52     % 'abstract' title, bigger skip from title
53     \renewcommand{\abstractname}{\normalfont\scriptsize\emph{Abstract:}}
54         \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
55     \abstractrunin
56
57     % set name of bibliography to 'references'
58     \renewcommand{\bibname}{References}
59    }
60
61 %%% Custom styles for headers and footers
62    
63 %%% Basic 
64 \makepagestyle{kjh}
65 %\makeevenfoot{kjh}{\thepage}{}{}
66 %\makeoddfoot{kjh}{}{}{\thepage}
67 %\makeheadrule{kjh}{\textwidth}{\normalrulethickness}
68 \newcommand{\@kjhmarks}{%
69   \let\@mkboth\markboth
70   \def\chaptermark##1{%
71     \markboth{%
72       \ifnum \c@secnumdepth >\m@ne
73         \if@mainmatter
74           \thechapter. \ %
75         \fi
76       \fi
77       ##1}{}}
78   \def\sectionmark##1{%
79     \markright{##1}}
80 }
81 \makepsmarks{kjh}{\@kjhmarks}
82 \makepsmarks{kjh}{}
83 \makeevenhead{kjh}{}{}{\scshape\thepage}
84 \makeoddhead{kjh}{}{}{\scshape\thepage}
85
86 %%% version control info in footers; requires vc package 
87 % Make the style for vc-git revision control headers and footers
88 \makepagestyle{kjhgit}
89 \newcommand{\@kjhgitmarks}{%
90   \let\@mkboth\markboth
91   \def\chaptermark##1{%
92     \markboth{%
93       \ifnum \c@secnumdepth >\m@ne
94         \if@mainmatter
95           \thechapter. \ %
96         \fi
97       \fi
98       ##1}{}}
99   \def\sectionmark##1{%
100     \markright{##1}}
101 }
102 \makepsmarks{kjhgit}{\@kjhgitmarks}
103 \makeevenhead{kjh}{}{}{\scshape\thepage}
104 \makeoddhead{kjh}{}{}{\scshape\thepage}
105 \makeevenfoot{kjhgit}{}{\texttt{\footnotesize{\textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}}{}
106 \makeoddfoot{kjhgit}{}{\texttt{\footnotesize \textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}{}
107
108 %% Create a command to make a note at the top of the first page describing the
109 %% publication status of the paper. 
110 \newcommand{\published}[1]{% 
111    \gdef\puB{#1}} 
112    \newcommand{\puB}{} 
113    \renewcommand{\maketitlehooka}{% 
114        \par\noindent\footnotesize \puB} 
115
116 \endinput
117

Benjamin Mako Hill || Want to submit a patch?