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

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