From: Benjamin Mako Hill Date: Sat, 28 Nov 2009 04:41:45 +0000 (-0500) Subject: moved over to the new memoir-based template from kjh X-Git-Url: https://code.communitydata.science/cdsc_tex.git/commitdiff_plain/21912b41bbd90d4f9d3c49492e6f41498418a6d4?ds=inline;hp=982a83a0e17caf173f5fdf5a6674c4e4e59f7671 moved over to the new memoir-based template from kjh --- diff --git a/mako-mem.sty b/mako-mem.sty new file mode 100644 index 0000000..4943b0d --- /dev/null +++ b/mako-mem.sty @@ -0,0 +1,116 @@ +% Some article styles and page layout tweaks for the memoir class +% +% This file is heavily based on one by Kieran Healy + +% blank footnote +% Use \symbolfootnote[0]{Footnote text} for a blank footnote. +% Useful for initial acknowledgment note. +\long\def\symbolfootnote[#1]#2{\begingroup% +\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup} + +% >> article-2 << +% the name needs to start with article-n so that it automatically gets +% adjusted to keep the articles about the same. I've kept article-2 +% since this is what the same rough thing was called in Kieran's +% document. + +% Make the style for Chapters and sections + \makechapterstyle{article-2}{ + \setsecheadstyle{\Large\scshape\MakeLowercase} + \setsubsecheadstyle{\normalsize\itshape} + \setaftersubsubsecskip{-1em} + \setsubsubsecheadstyle{\small\bfseries} + \renewcommand{\printchaptername}{} + \renewcommand{\chapternamenum}{} + \renewcommand{\chapnumfont}{\chaptitlefont} + \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} + \renewcommand{\afterchapternum}{} + \renewcommand{\printchaptername}{\secheadstyle} + \renewcommand{\cftchapterfont}{\normalfont} + \renewcommand{\cftchapterpagefont}{\normalfont\scshape} + \renewcommand{\cftchapterpresnum}{\scshape} + \captiontitlefont{\small} + + % turn off section numbering + \counterwithout{section}{chapter} + + % supress chapter numbers + \maxsecnumdepth{chapter} + \setsecnumdepth{chapter} + + % reduce skip after section heading + \setaftersecskip{1.7ex} + + % Title flush left + \pretitle{\flushleft\LARGE \itshape} + \posttitle{\par\vskip 0.5em} + \preauthor{\flushleft \large \lineskip 1em} + \postauthor{\par\lineskip 1em} + \predate{\flushleft\footnotesize\vspace{0.65em}} + \postdate{\par\vskip 1em} + + % 'abstract' title, bigger skip from title + \renewcommand{\abstractname}{\normalfont\scriptsize\emph{Abstract:}} + \renewcommand{\abstracttextfont}{\normalfont\scriptsize} + \abstractrunin + + % set name of bibliography to 'references' + \renewcommand{\bibname}{References} + } + +%%% Custom styles for headers and footers + +%%% Basic +\makepagestyle{kjh} +%\makeevenfoot{kjh}{\thepage}{}{} +%\makeoddfoot{kjh}{}{}{\thepage} +%\makeheadrule{kjh}{\textwidth}{\normalrulethickness} +\newcommand{\@kjhmarks}{% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \thechapter. \ % + \fi + \fi + ##1}{}} + \def\sectionmark##1{% + \markright{##1}} +} +\makepsmarks{kjh}{\@kjhmarks} +\makepsmarks{kjh}{} +\makeevenhead{kjh}{}{}{\scshape\thepage} +\makeoddhead{kjh}{}{}{\scshape\thepage} + +%%% version control info in footers; requires vc package +% Make the style for vc-git revision control headers and footers +\makepagestyle{kjhgit} +\newcommand{\@kjhgitmarks}{% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \thechapter. \ % + \fi + \fi + ##1}{}} + \def\sectionmark##1{% + \markright{##1}} +} +\makepsmarks{kjhgit}{\@kjhgitmarks} +\makeevenhead{kjh}{}{}{\scshape\thepage} +\makeoddhead{kjh}{}{}{\scshape\thepage} +\makeevenfoot{kjhgit}{}{\texttt{\footnotesize git revision \VCRevision\ on \VCDateTEX}}{} +\makeoddfoot{kjhgit}{}{\texttt{\footnotesize git revision \VCRevision\ on \VCDateTEX}}{} +%% Create a command to make a note at the top of the first page describing the +%% publication status of the paper. +\newcommand{\published}[1]{% + \gdef\puB{#1}} + \newcommand{\puB}{} + \renewcommand{\maketitlehooka}{% + \par\noindent\footnotesize \puB} + +\endinput + diff --git a/text.tex b/text.tex index 8870a4b..dbed9c4 100644 --- a/text.tex +++ b/text.tex @@ -1,4 +1,9 @@ -\documentclass[12pt]{scrartcl} +\documentclass[12pt]{memoir} + +% based on kieran healy's memoir modifications +\usepackage{mako-mem} +\chapterstyle{article-2} +\pagestyle{kjh} \usepackage{ucs} \usepackage[utf8x]{inputenc} @@ -10,46 +15,44 @@ \usepackage[garamond]{mathdesign} \usepackage[letterpaper,left=1.2in,right=1.2in,top=1.2in,bottom=1.2in]{geometry} -\usepackage{fancyhdr} -% \usepackage{url} -% \usepackage{graphicx} +% packages i use in essentially every document +\usepackage{graphicx} +\usepackage{enumerate} + +% packages i use in many documents but leave off by default % \usepackage{amsmath, amsthm, amssymb} % \usepackage{dcolumn} % \usepackage{endfloat} +% import and customize urls (kjh does this as well, it seems) +\usepackage[usenames,dvipsnames]{color} +\usepackage[breaklinks]{hyperref} + +\hypersetup{colorlinks=true, linkcolor=Blue, citecolor=Black, filecolor=Blue, + urlcolor=Blue, unicode=true} + % add bibliographic stuff \usepackage[round]{natbib} \def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})} \def\citespos#1{\citeauthor{#1}' (\citeyear{#1})} -\newcommand{\titleref}[1]{\textsl{#1}} - -\newenvironment{narrow}[2]{% - \begin{list}{}{% - \setlength{\topsep}{0pt}% - \setlength{\leftmargin}{#1}% - \setlength{\rightmargin}{#2}% - \setlength{\listparindent}{0pt}% - \setlength{\itemindent}{0pt}% - \setlength{\parsep}{\parskip}}% - \item[]}{\end{list}} +% import vc stuff after running `make vc`: \input{vc} \pagestyle{kjhgit} \begin{document} -\pagestyle{fancy} -\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} -\fancyhead{} -\fancyfoot{} -\fancyhead[R]{\rm \thepage} -\fancyhead[L]{\bf \rightmark} - \setlength{\parskip}{4.5pt} \baselineskip 18.5pt \title{Title} -\author{Benjamin Mako Hill} +\author{Benjamin Mako Hill\\ + \href{mailto:mako@mit.edu}{mako@mit.edu}} + +% \published{\textsc{\textcolor{BrickRed}{This document is an +% unpublished draft.\\ Please do not distribute or cite with +% persmission.}}} + \maketitle \section{Section} @@ -62,6 +65,9 @@ brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog \citep{989866}. + +% bibliography here +\renewcommand{\bibsection}{\section{\bibname}\prebibhook} \bibliography{refs} \bibliographystyle{chicago}