a series of updates to the mako-mem template
- Padded right/left margins to decrease line length based on research into general typographic standards. - Shrunk linespacing to decrease line-spacing to bring this in line with general typographic standards. - Added comments explaining the changes and basic typographic decisions. - Renamed some variables to make it more clear about the relationships between pagestyles. - Added the vc-git and vc-awk scripts into the repository so folks don't have to go hunting for them. - Made VC stuff generated by default in Makefile. - Increased the amount of sample text so we can actually see the effects on full pages of text.
This commit is contained in:
parent
f3b3d82957
commit
d449d749d8
@ -12,7 +12,7 @@ refs-processed.bib:
|
|||||||
perl -0pe 's/,\s+(file|abstract) = \{.*?\}(,\n|\n)/\2/sg' refs-processed.bib |sponge refs-processed.bib
|
perl -0pe 's/,\s+(file|abstract) = \{.*?\}(,\n|\n)/\2/sg' refs-processed.bib |sponge refs-processed.bib
|
||||||
recode -d u8..ltex < refs-processed.bib | sponge refs-processed.bib
|
recode -d u8..ltex < refs-processed.bib | sponge refs-processed.bib
|
||||||
|
|
||||||
%.pdf: %.tex refs-processed.bib
|
%.pdf: %.tex refs-processed.bib vc
|
||||||
latexmk -f -pdf $<
|
latexmk -f -pdf $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@ -28,7 +28,7 @@ viewpdf: all
|
|||||||
evince *.pdf
|
evince *.pdf
|
||||||
|
|
||||||
vc:
|
vc:
|
||||||
vc-git
|
resources/vc-git
|
||||||
|
|
||||||
pdf: all
|
pdf: all
|
||||||
|
|
||||||
|
|||||||
@ -192,8 +192,8 @@
|
|||||||
|
|
||||||
%%% version control info in footers; requires vc package
|
%%% version control info in footers; requires vc package
|
||||||
% Make the style for vc-git revision control headers and footers
|
% Make the style for vc-git revision control headers and footers
|
||||||
\makepagestyle{kjhgit}
|
\makepagestyle{mako-mem-git}
|
||||||
\newcommand{\@kjhgitmarks}{%
|
\newcommand{\@gitmarks}{%
|
||||||
\let\@mkboth\markboth
|
\let\@mkboth\markboth
|
||||||
\def\chaptermark##1{%
|
\def\chaptermark##1{%
|
||||||
\markboth{%
|
\markboth{%
|
||||||
@ -206,11 +206,11 @@
|
|||||||
\def\sectionmark##1{%
|
\def\sectionmark##1{%
|
||||||
\markright{##1}}
|
\markright{##1}}
|
||||||
}
|
}
|
||||||
\makepsmarks{kjhgit}{\@kjhgitmarks}
|
\makepsmarks{mako-mem-git}{\@gitmarks}
|
||||||
\makeevenhead{kjhgit}{}{}{\scshape\thepage}
|
\makeevenhead{mako-mem-git}{}{}{\scshape\thepage}
|
||||||
\makeoddhead{kjhgit}{}{}{\scshape\thepage}
|
\makeoddhead{mako-mem-git}{}{}{\scshape\thepage}
|
||||||
\makeevenfoot{kjhgit}{}{\texttt{\footnotesize{\textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}}{}
|
\makeevenfoot{mako-mem-git}{}{\texttt{\footnotesize{\textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}}{}
|
||||||
\makeoddfoot{kjhgit}{}{\texttt{\footnotesize \textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}{}
|
\makeoddfoot{mako-mem-git}{}{\texttt{\footnotesize \textcolor{Blue}{git revision \VCRevision\ on \VCDateTEX}}}{}
|
||||||
|
|
||||||
%% Create a command to make a note at the top of the first page describing the
|
%% Create a command to make a note at the top of the first page describing the
|
||||||
%% publication status of the paper.
|
%% publication status of the paper.
|
||||||
|
|||||||
24
paper_template/resources/vc-git
Executable file
24
paper_template/resources/vc-git
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# This is file 'vc' from the vc bundle for TeX.
|
||||||
|
# The original file can be found at CTAN:support/vc.
|
||||||
|
# This file is Public Domain.
|
||||||
|
|
||||||
|
# Parse command line options.
|
||||||
|
full=0
|
||||||
|
mod=0
|
||||||
|
while [ -n "$(echo $1 | grep '-')" ]; do
|
||||||
|
case $1 in
|
||||||
|
-f ) full=1 ;;
|
||||||
|
-m ) mod=1 ;;
|
||||||
|
* ) echo 'usage: vc [-f] [-m]'
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
# English locale.
|
||||||
|
LC_ALL=C
|
||||||
|
git --no-pager log -1 HEAD --pretty=format:"Hash: %H%nAbr. Hash: %h%nParent Hashes: %P%nAbr. Parent Hashes: %p%nAuthor Name: %an%nAuthor Email: %ae%nAuthor Date: %ai%nCommitter Name: %cn%nCommitter Email: %ce%nCommitter Date: %ci%n" |gawk -v script=log -v full=$full -f ~/bin/vc-git.awk > vc
|
||||||
|
if [ "$mod" = 1 ]
|
||||||
|
then
|
||||||
|
git status |gawk -v script=status -f ~/bin/vc-git.awk >> vc
|
||||||
|
fi
|
||||||
89
paper_template/resources/vc-git.awk
Normal file
89
paper_template/resources/vc-git.awk
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# This is file 'vc-git.awk' from the vc bundle for TeX.
|
||||||
|
# The original file can be found at CTAN:support/vc.
|
||||||
|
# This file is Public Domain.
|
||||||
|
BEGIN {
|
||||||
|
|
||||||
|
### Process output of "git status".
|
||||||
|
if (script=="status") {
|
||||||
|
modified = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Process output of "git log".
|
||||||
|
script=="log" && /^Hash:/ { Hash = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Abr. Hash:/ { AbrHash = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Parent Hashes:/ { ParentHashes = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Abr. Parent Hashes:/ { AbrParentHashes = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Author Name:/ { AuthorName = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Author Email:/ { AuthorEmail = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Author Date:/ { AuthorDate = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Committer Name:/ { CommitterName = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Committer Email:/ { CommitterEmail = substr($0, 2+match($0, ":")) }
|
||||||
|
script=="log" && /^Committer Date:/ { CommitterDate = substr($0, 2+match($0, ":")) }
|
||||||
|
|
||||||
|
### Process output of "git status".
|
||||||
|
### Changed index?
|
||||||
|
script=="status" && /^# Changes to be committed:/ { modified = 1 }
|
||||||
|
### Unstaged modifications?
|
||||||
|
script=="status" && /^# Changed but not updated:/ { modified = 2 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
END {
|
||||||
|
|
||||||
|
### Process output of "git log".
|
||||||
|
if (script=="log") {
|
||||||
|
### Standard encoding is UTF-8.
|
||||||
|
if (Encoding == "") Encoding = "UTF-8"
|
||||||
|
### Extract relevant information from variables.
|
||||||
|
LongDate = substr(AuthorDate, 1, 25)
|
||||||
|
DateRAW = substr(LongDate, 1, 10)
|
||||||
|
DateISO = DateRAW
|
||||||
|
DateTEX = DateISO
|
||||||
|
gsub("-", "/", DateTEX)
|
||||||
|
Time = substr(LongDate, 12, 14)
|
||||||
|
### Write file identification to vc.tex.
|
||||||
|
print "%%% This file has been generated by the vc bundle for TeX."
|
||||||
|
print "%%% Do not edit this file!"
|
||||||
|
print "%%%"
|
||||||
|
### Write Git specific macros.
|
||||||
|
print "%%% Define Git specific macros."
|
||||||
|
print "\\gdef\\GITHash{" Hash "}%"
|
||||||
|
print "\\gdef\\GITAbrHash{" AbrHash "}%"
|
||||||
|
print "\\gdef\\GITParentHashes{" ParentHashes "}%"
|
||||||
|
print "\\gdef\\GITAbrParentHashes{" AbrParentHashes "}%"
|
||||||
|
print "\\gdef\\GITAuthorName{" AuthorName "}%"
|
||||||
|
print "\\gdef\\GITAuthorEmail{" AuthorEmail "}%"
|
||||||
|
print "\\gdef\\GITAuthorDate{" AuthorDate "}%"
|
||||||
|
print "\\gdef\\GITCommitterName{" CommitterName "}%"
|
||||||
|
print "\\gdef\\GITCommitterEmail{" CommitterEmail "}%"
|
||||||
|
print "\\gdef\\GITCommitterDate{" CommitterDate "}%"
|
||||||
|
### Write generic version control macros.
|
||||||
|
print "%%% Define generic version control macros."
|
||||||
|
print "\\gdef\\VCRevision{\\GITAbrHash}%"
|
||||||
|
print "\\gdef\\VCAuthor{\\GITAuthorName}%"
|
||||||
|
print "\\gdef\\VCDateRAW{" DateRAW "}%"
|
||||||
|
print "\\gdef\\VCDateISO{" DateISO "}%"
|
||||||
|
print "\\gdef\\VCDateTEX{" DateTEX "}%"
|
||||||
|
print "\\gdef\\VCTime{" Time "}%"
|
||||||
|
print "\\gdef\\VCModifiedText{\\textcolor{red}{with local modifications!}}%"
|
||||||
|
print "%%% Assume clean working copy."
|
||||||
|
print "\\gdef\\VCModified{0}%"
|
||||||
|
print "\\gdef\\VCRevisionMod{\\VCRevision}%"
|
||||||
|
}
|
||||||
|
|
||||||
|
### Process output of "git status".
|
||||||
|
if (script=="status") {
|
||||||
|
print "%%% Is working copy modified?"
|
||||||
|
print "\\gdef\\VCModified{" modified "}%"
|
||||||
|
if (modified==0) {
|
||||||
|
print "\\gdef\\VCRevisionMod{\\VCRevision}%"
|
||||||
|
} else {
|
||||||
|
print "\\gdef\\VCRevisionMod{\\VCRevision~\\VCModifiedText}%"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,8 +1,11 @@
|
|||||||
\documentclass[12pt]{memoir}
|
\documentclass[12pt]{memoir}
|
||||||
|
|
||||||
% based on kieran healy's memoir modifications
|
% article-1 and article-2 styles were originally based on kieran healy's
|
||||||
|
% templates
|
||||||
\usepackage{mako-mem}
|
\usepackage{mako-mem}
|
||||||
\chapterstyle{article-2}
|
\chapterstyle{article-2}
|
||||||
|
|
||||||
|
% with article-3 \chapterstyle, change to: \pagestyle{memo}
|
||||||
\pagestyle{mako-mem}
|
\pagestyle{mako-mem}
|
||||||
|
|
||||||
\usepackage{ucs}
|
\usepackage{ucs}
|
||||||
@ -12,7 +15,7 @@
|
|||||||
\usepackage{textcomp}
|
\usepackage{textcomp}
|
||||||
\usepackage[garamond]{mathdesign}
|
\usepackage[garamond]{mathdesign}
|
||||||
|
|
||||||
\usepackage[letterpaper,left=1.2in,right=1.2in,top=1.2in,bottom=1.2in]{geometry}
|
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
||||||
|
|
||||||
% packages i use in essentially every document
|
% packages i use in essentially every document
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
@ -38,21 +41,30 @@
|
|||||||
% memoir function to take out of the space out of the whitespace lists
|
% memoir function to take out of the space out of the whitespace lists
|
||||||
\firmlists
|
\firmlists
|
||||||
|
|
||||||
% import vc stuff after running `make vc`: \input{vc} \pagestyle{kjhgit}
|
% LATEX NOTE: these lines will import vc stuff after running `make vc` which
|
||||||
|
% will add version control information to the bottom of each page. This can be
|
||||||
|
% useful for keeping track of which version of a document somebody has:
|
||||||
|
% \input{vc}
|
||||||
|
% \pagestyle{mako-mem-git}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\setlength{\parskip}{4.5pt}
|
\setlength{\parskip}{4.5pt}
|
||||||
\baselineskip 18.5pt
|
% LATEX NOTE: Ideal linespacing is usually said to be between 120-140% the
|
||||||
|
% typeface size. So, for 12pt (default in this document, we're looking for
|
||||||
|
% somewhere between a 14.4-17.4pt \baselineskip. Single; 1.5 lines; and Double
|
||||||
|
% in MSWord are equivalent to ~117%, 175%, and 233%.
|
||||||
|
|
||||||
|
\baselineskip 16pt
|
||||||
|
|
||||||
\title{Title}
|
\title{Title}
|
||||||
\author{Benjamin Mako Hill\\
|
\author{Benjamin Mako Hill\\
|
||||||
\href{mailto:makohill@uw.edu}{makohill@uw.edu}}
|
\href{mailto:makohill@uw.edu}{makohill@uw.edu}}
|
||||||
\date{}
|
\date{}
|
||||||
|
|
||||||
% \published{\textsc{\textcolor{BrickRed}{This document is an
|
\published{\textsc{\textcolor{BrickRed}{This document is an
|
||||||
% unpublished draft.\\ Please do not distribute or cite without
|
unpublished draft.\\ Please do not distribute or cite without
|
||||||
% permission.}}}
|
permission.}}}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
@ -68,6 +80,15 @@ fox jumps over the lazy dog.
|
|||||||
|
|
||||||
\section{Section}
|
\section{Section}
|
||||||
|
|
||||||
|
% LATEX NOTE: This alphabet below is here so we can measure the line-length of
|
||||||
|
% different layouts. Typesetters suggest that an average line-length of
|
||||||
|
% between 45-90 characters and a rule of thumb for typesetting is that you
|
||||||
|
% should be able to fit between 2-3 alphabets on one line. Generally speaking,
|
||||||
|
% the shorter the line length, the better -- and the smaller the linespacing
|
||||||
|
% can become. The following line is 3 alphabets (73 characters).
|
||||||
|
|
||||||
|
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
||||||
|
|
||||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
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. The
|
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
|
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||||
@ -76,6 +97,69 @@ 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
|
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||||
fox jumps over the lazy dog \citep{989866}.
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
|
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. 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. 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. The quick brown
|
||||||
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
% bibliography here
|
% bibliography here
|
||||||
\renewcommand{\bibsection}{\section{\bibname}\prebibhook}
|
\renewcommand{\bibsection}{\section{\bibname}\prebibhook}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user