Compare commits
15 Commits
knitr
...
22832af588
| Author | SHA1 | Date | |
|---|---|---|---|
| 22832af588 | |||
| dab1be34c5 | |||
| 0aee418e2a | |||
| 1e79d8d0f6 | |||
| c0406f157f | |||
| 6643132141 | |||
| cc993ca40d | |||
| c316de3312 | |||
| c4a709c22c | |||
| 2b29f051a6 | |||
| a0674e7f87 | |||
| 27e9bc3254 | |||
| bd8fa11def | |||
| f43488ef70 | |||
| 34b6fe4401 |
51
README
51
README
@@ -5,8 +5,8 @@
|
||||
Copyright (c) 2009-2026 Benjamin Mako Hill <mako@atdot.cc> / <makohill@uw.edu>
|
||||
|
||||
This repository contains LaTeX configuration files and templates used to
|
||||
format papers, assignments, and letters. All files are released under the
|
||||
GNU GPL version 3 or later.
|
||||
format papers, memos, letters, and posters. All files are released under
|
||||
the GNU GPL version 3 or later.
|
||||
|
||||
The latest version can be found in git at:
|
||||
https://gitea.communitydata.science/collective/cdsc_tex
|
||||
@@ -33,20 +33,36 @@ git format-patch to generate patch files to send by email:
|
||||
On Debian or Ubuntu, install the following packages:
|
||||
|
||||
* latexmk
|
||||
* texlive-luatex
|
||||
* texlive-latex-recommended
|
||||
* texlive-fonts-extra
|
||||
* texlive-fonts-recommended
|
||||
* texlive-bibtex-extra
|
||||
|
||||
apt install latexmk texlive-latex-recommended \
|
||||
apt install latexmk texlive-luatex texlive-latex-recommended \
|
||||
texlive-fonts-extra texlive-fonts-recommended \
|
||||
texlive-bibtex-extra
|
||||
|
||||
On other systems, installing a full TeX Live distribution should provide
|
||||
everything needed.
|
||||
|
||||
The templates make extensive use of the URW Garamond font, available from
|
||||
CTAN: https://ctan.org/pkg/urw-garamond
|
||||
All four templates build with LuaLaTeX (via latexmk -lualatex). The text
|
||||
fonts are EB Garamond (provided by texlive-fonts-extra) and TeX Gyre
|
||||
Heros.
|
||||
|
||||
================================
|
||||
=== Accessibility ==============
|
||||
================================
|
||||
|
||||
All four templates produce PDF/UA-2 compliant tagged PDFs via the
|
||||
LaTeX tagging project (\DocumentMetadata + tagpdf). You can verify
|
||||
compliance with verapdf: https://verapdf.org/
|
||||
|
||||
The paper and memo templates were originally built on the memoir
|
||||
class, which is incompatible with the LaTeX tagged-PDF code. They now
|
||||
use the standard article class with custom styling (cdsc-paper.sty
|
||||
and cdsc-memo.sty) to keep their previous look while supporting full
|
||||
tagging.
|
||||
|
||||
================================
|
||||
=== Branches ===================
|
||||
@@ -54,7 +70,7 @@ CTAN: https://ctan.org/pkg/urw-garamond
|
||||
|
||||
This repository has two main branches:
|
||||
|
||||
master Standard LaTeX templates (paper, assignment, letter)
|
||||
master Standard LaTeX templates (paper, memo, letter, poster)
|
||||
knitr Knitr/R template for reproducible research documents
|
||||
|
||||
================================
|
||||
@@ -70,10 +86,10 @@ and destination directory as arguments:
|
||||
|
||||
Available types:
|
||||
|
||||
paper LaTeX paper template (master branch)
|
||||
assignment LaTeX assignment template (master branch)
|
||||
knitr Knitr/R paper template (knitr branch)
|
||||
letter LaTeX letter template (master branch)
|
||||
paper LaTeX paper template (master branch)
|
||||
memo LaTeX memo template (master branch)
|
||||
knitr Knitr/R paper template (knitr branch)
|
||||
letter LaTeX letter template (master branch)
|
||||
|
||||
Example:
|
||||
|
||||
@@ -103,26 +119,23 @@ following to your .bashrc or .zshrc:
|
||||
|
||||
This defines the following aliases (only if new_tex_document is in PATH):
|
||||
|
||||
new_tex_assignment → new_tex_document assignment
|
||||
new_knitr_document → new_tex_document knitr
|
||||
new_tex_letter → new_tex_document letter
|
||||
new_tex_memo → new_tex_document memo
|
||||
new_knitr_document → new_tex_document knitr
|
||||
new_tex_letter → new_tex_document letter
|
||||
|
||||
================================
|
||||
=== Migration ==================
|
||||
================================
|
||||
|
||||
The individual scripts new_knitr_document, new_tex_assignment, and
|
||||
new_tex_letter have been consolidated into new_tex_document. The old
|
||||
scripts remain in the repository but are superseded.
|
||||
The individual scripts new_knitr_document and new_tex_letter have
|
||||
been consolidated into new_tex_document. The old scripts remain in
|
||||
the repository but are superseded.
|
||||
|
||||
To migrate, replace calls to the old scripts with new_tex_document:
|
||||
|
||||
Old: new_knitr_document mydir
|
||||
New: new_tex_document knitr mydir
|
||||
|
||||
Old: new_tex_assignment mydir
|
||||
New: new_tex_document assignment mydir
|
||||
|
||||
Old: new_tex_letter mydir
|
||||
New: new_tex_document letter mydir
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
\documentclass[12pt]{memoir}
|
||||
|
||||
% article-1 and article-2 styles were originally based on kieran healy's
|
||||
% templates
|
||||
\usepackage{mako-mem}
|
||||
\chapterstyle{article-2}
|
||||
|
||||
% with article-3 \chapterstyle, change to: \pagestyle{memo}
|
||||
\pagestyle{mako-mem}
|
||||
|
||||
\usepackage[utf8]{inputenc}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{textcomp}
|
||||
\usepackage[garamond]{mathdesign}
|
||||
|
||||
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
||||
|
||||
% 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
|
||||
\usepackage[usenames,dvipsnames]{color}
|
||||
\usepackage[breaklinks]{hyperref}
|
||||
|
||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
|
||||
urlcolor=Blue, unicode=true}
|
||||
|
||||
% add bibliographic stuff
|
||||
% memoir function to take out of the space out of the whitespace lists
|
||||
\firmlists
|
||||
|
||||
% 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}
|
||||
|
||||
\setlength{\parskip}{4.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}
|
||||
\author{Nathan TeGrotenhuis\\
|
||||
\href{mailto:nathante@uw.edu}{nathante@uw.edu}}
|
||||
\date{\today}
|
||||
|
||||
\maketitle
|
||||
|
||||
\section{Section}
|
||||
|
||||
|
||||
\end{document}
|
||||
|
||||
% LocalWords:
|
||||
@@ -1,232 +0,0 @@
|
||||
% Some article styles and page layout tweaks for the LaTeX Memoir class.
|
||||
%
|
||||
% Copyright 2009 Benjamin Mako Hill <mako@atdot.cc>
|
||||
% Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
|
||||
|
||||
% Distributed as free software under the GNU GPL v3
|
||||
|
||||
% This file is heavily based on one by Kieran Healy
|
||||
% available here: http://github.com/kjhealy/latex-custom-kjh/
|
||||
|
||||
\usepackage{lastpage}
|
||||
|
||||
% 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}
|
||||
|
||||
% put a period after the section numbers
|
||||
\setsecnumformat{\csname the#1\endcsname.\enspace}
|
||||
|
||||
% >> article-1 <<
|
||||
\makechapterstyle{article-1}{
|
||||
\renewcommand{\rmdefault}{ugm}
|
||||
\renewcommand{\sfdefault}{phv}
|
||||
|
||||
\setsecheadstyle{\large\scshape}
|
||||
\setsubsecheadstyle{\normalsize\itshape}
|
||||
\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 chapter numbering
|
||||
\counterwithout{section}{chapter}
|
||||
\counterwithout{figure}{chapter}
|
||||
\counterwithout{table}{chapter}
|
||||
|
||||
% reduce skip after section heading
|
||||
\setaftersecskip{1.2ex}
|
||||
|
||||
\pretitle{\newline\centering \LARGE\scshape \MakeLowercase }
|
||||
\posttitle{\par\vskip 1em}
|
||||
\predate{\footnotesize \centering}
|
||||
\postdate{\par\vskip 1em}
|
||||
|
||||
% 'abstract' title, bigger skip from title
|
||||
\renewcommand{\abstractname}{}
|
||||
\abstractrunin
|
||||
|
||||
% set name of bibliography to 'references'
|
||||
\renewcommand{\bibname}{References}
|
||||
}
|
||||
|
||||
% >> article-2 <<
|
||||
\makechapterstyle{article-2}{
|
||||
\renewcommand{\rmdefault}{ugm}
|
||||
\renewcommand{\sfdefault}{phv}
|
||||
|
||||
\setsecheadstyle{\large\scshape}
|
||||
\setsubsecheadstyle{\normalsize\itshape}
|
||||
\setaftersubsubsecskip{-1em}
|
||||
\setsubsubsecheadstyle{\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 chapter numbering
|
||||
\counterwithout{section}{chapter}
|
||||
\counterwithout{figure}{chapter}
|
||||
\counterwithout{table}{chapter}
|
||||
|
||||
% supress chapter numbers
|
||||
\maxsecnumdepth{chapter}
|
||||
\setsecnumdepth{chapter}
|
||||
|
||||
% for numbered sections and subsections:
|
||||
% (a) comment out the above stanza; (b) uncomment the one below
|
||||
% \maxsecnumdepth{subsection}
|
||||
% \setsecnumdepth{subsection}
|
||||
|
||||
% 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}{Abstract:}
|
||||
\renewcommand{\abstractnamefont}{\normalfont\small\bfseries}
|
||||
\renewcommand{\abstracttextfont}{\normalfont\small}
|
||||
\setlength{\absparindent}{0em}
|
||||
\setlength{\abstitleskip}{-1.5em}
|
||||
\abstractrunin
|
||||
|
||||
% set name of bibliography to 'references'
|
||||
\renewcommand{\bibname}{References}
|
||||
}
|
||||
|
||||
|
||||
% >> article-3 <<
|
||||
\makechapterstyle{article-3}{
|
||||
\renewcommand{\rmdefault}{ugm}
|
||||
\renewcommand{\sfdefault}{phv}
|
||||
|
||||
\setsecheadstyle{\large\sffamily\bfseries\MakeUppercase}
|
||||
\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 chapter numbering
|
||||
\counterwithout{section}{chapter}
|
||||
\counterwithout{figure}{chapter}
|
||||
\counterwithout{table}{chapter}
|
||||
|
||||
% supress chapter numbers
|
||||
\maxsecnumdepth{chapter}
|
||||
\setsecnumdepth{chapter}
|
||||
|
||||
% reduce skip after section heading
|
||||
\setaftersecskip{1pt}
|
||||
\setbeforesecskip{-1em}
|
||||
|
||||
% 'abstract' title, bigger skip from title
|
||||
% \renewcommand{\maketitle}{\{\preauthor \theauthor\} \hfill \thetitle}
|
||||
\renewcommand{\maketitle}{
|
||||
{\Large\sffamily\bfseries\MakeUppercase\thetitle} \hfill
|
||||
{\Large\sffamily\MakeUppercase\theauthor}
|
||||
\vskip 0.7em}
|
||||
\renewcommand{\abstractname}{\normalfont\scriptsize\noindent}
|
||||
\renewcommand{\abstracttextfont}{\normalfont\scriptsize}
|
||||
\abstractrunin
|
||||
|
||||
% set name of bibliography to 'references'
|
||||
\renewcommand{\bibname}{References}
|
||||
|
||||
\parindent 0pt
|
||||
|
||||
}
|
||||
|
||||
%%% Custom styles for headers and footers
|
||||
%%% Basic
|
||||
\makepagestyle{mako-mem}
|
||||
%\makeevenfoot{mako-mem}{\thepage}{}{}
|
||||
%\makeoddfoot{mako-mem}{}{}{\thepage}
|
||||
%\makeheadrule{mako-mem}{\textwidth}{\normalrulethickness}
|
||||
\newcommand{\@makomarks}{%
|
||||
\let\@mkboth\markboth
|
||||
\def\chaptermark##1{%
|
||||
\markboth{%
|
||||
\ifnum \c@secnumdepth >\m@ne
|
||||
\if@mainmatter
|
||||
\thechapter. \ %
|
||||
\fi
|
||||
\fi
|
||||
##1}{}}
|
||||
\def\sectionmark##1{%
|
||||
\markright{##1}}
|
||||
}
|
||||
\makepsmarks{mako-mem}{\@makomarks}
|
||||
\makepsmarks{mako-mem}{}
|
||||
\makeevenhead{mako-mem}{}{}{\scshape\thepage}
|
||||
\makeoddhead{mako-mem}{}{}{\scshape\thepage}
|
||||
|
||||
%%% version control info in footers; requires vc package
|
||||
% Make the style for vc-git revision control headers and footers
|
||||
\makepagestyle{mako-mem-git}
|
||||
\newcommand{\@gitmarks}{%
|
||||
\let\@mkboth\markboth
|
||||
\def\chaptermark##1{%
|
||||
\markboth{%
|
||||
\ifnum \c@secnumdepth >\m@ne
|
||||
\if@mainmatter
|
||||
\thechapter. \ %
|
||||
\fi
|
||||
\fi
|
||||
##1}{}}
|
||||
\def\sectionmark##1{%
|
||||
\markright{##1}}
|
||||
}
|
||||
\makepsmarks{mako-mem-git}{\@gitmarks}
|
||||
\makeevenhead{mako-mem-git}{}{}{\scshape\thepage}
|
||||
\makeoddhead{mako-mem-git}{}{}{\scshape\thepage}
|
||||
\makeevenfoot{mako-mem-git}{}{\texttt{\footnotesize{\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}}{}
|
||||
\makeoddfoot{mako-mem-git}{}{\texttt{\footnotesize \textcolor{BrickRed}{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}
|
||||
|
||||
\makepagestyle{memo}
|
||||
\makeevenhead{memo}{}{}{}
|
||||
\makeoddhead{memo}{}{}{}
|
||||
|
||||
\makeevenfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}
|
||||
\makeoddfoot{memo}{}{\scshape \thepage/\pageref{LastPage}}{}
|
||||
|
||||
|
||||
\endinput
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
\documentclass[12pt]{memoir}
|
||||
|
||||
% article-1 and article-2 styles were originally based on kieran healy's
|
||||
% templates
|
||||
\usepackage{mako-mem}
|
||||
\chapterstyle{article-2}
|
||||
|
||||
% with article-3 \chapterstyle, change to: \pagestyle{memo}
|
||||
\pagestyle{mako-mem}
|
||||
|
||||
\usepackage[utf8]{inputenc}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{textcomp}
|
||||
\usepackage[garamond]{mathdesign}
|
||||
|
||||
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
||||
|
||||
% 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
|
||||
\usepackage[usenames,dvipsnames]{color}
|
||||
\usepackage[breaklinks]{hyperref}
|
||||
|
||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
|
||||
urlcolor=Blue, unicode=true}
|
||||
|
||||
% add bibliographic stuff
|
||||
% memoir function to take out of the space out of the whitespace lists
|
||||
\firmlists
|
||||
|
||||
% 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}
|
||||
|
||||
\setlength{\parskip}{4.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}
|
||||
\author{Nathan TeBlunthuis\\
|
||||
\href{mailto:nathante@uw.edu}{nathante@uw.edu}}
|
||||
\date{\today}
|
||||
|
||||
\maketitle
|
||||
|
||||
\section{Section}
|
||||
|
||||
|
||||
\end{document}
|
||||
|
||||
% LocalWords:
|
||||
@@ -3,7 +3,7 @@
|
||||
# source ~/tex/cdsc_tex/cdsc_tex_aliases.sh
|
||||
|
||||
if command -v new_tex_document > /dev/null 2>&1; then
|
||||
alias new_tex_assignment='new_tex_document assignment'
|
||||
alias new_tex_memo='new_tex_document memo'
|
||||
alias new_knitr_document='new_tex_document knitr'
|
||||
alias new_tex_letter='new_tex_document letter'
|
||||
fi
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
all: $(patsubst %.tex,%.pdf,$(wildcard *.tex))
|
||||
|
||||
%.pdf: %.tex
|
||||
latexmk -f -pdf $<
|
||||
latexmk -f -lualatex $<
|
||||
|
||||
clean:
|
||||
latexmk -C *.tex
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
\DocumentMetadata{
|
||||
pdfversion=2.0,
|
||||
pdfstandard=ua-2,
|
||||
lang=en-US,
|
||||
}
|
||||
\documentclass[12pt]{letter}
|
||||
|
||||
\usepackage{ucs}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{textcomp}
|
||||
\renewcommand{\rmdefault}{ugm}
|
||||
\renewcommand{\sfdefault}{phv}
|
||||
\usepackage[garamond]{mathdesign}
|
||||
\usepackage{fontspec}
|
||||
\setmainfont{EB Garamond}
|
||||
\setsansfont{TeX Gyre Heros}
|
||||
|
||||
\usepackage[letterpaper,left=1.3in,right=1.3in,top=0.8in,bottom=0.8in]{geometry}
|
||||
|
||||
\usepackage{tagpdf}
|
||||
\tagpdfsetup{activate-all}
|
||||
|
||||
\usepackage{hyperref}
|
||||
\hypersetup{unicode=true,
|
||||
pdftitle={Letter},
|
||||
pdfauthor={Benjamin Mako Hill},
|
||||
pdflang={en-US},
|
||||
pdfdisplaydoctitle=true}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{letter}{Person Letter is Addressed To\\
|
||||
|
||||
@@ -8,7 +8,7 @@ all: $(patsubst %.tex,%.pdf,$(wildcard *.tex))
|
||||
# Rscript -e "library(knitr); knit('$<')"
|
||||
|
||||
%.pdf: %.tex
|
||||
latexmk -f -pdf $<
|
||||
latexmk -f -lualatex $<
|
||||
|
||||
clean:
|
||||
latexmk -C *.tex
|
||||
@@ -22,6 +22,8 @@ clean:
|
||||
viewpdf: all
|
||||
evince *.pdf
|
||||
|
||||
vc: resources/vc-git
|
||||
|
||||
pdf: all
|
||||
|
||||
.PHONY: clean all
|
||||
90
memo_template/cdsc-memo.sty
Normal file
90
memo_template/cdsc-memo.sty
Normal file
@@ -0,0 +1,90 @@
|
||||
% Memo-style page layout for CDSC documents.
|
||||
%
|
||||
% Article-class equivalent of the old cdsc-memo chapterstyle that
|
||||
% lived in cdsc-memoir.sty. Targets the standard `article' class so
|
||||
% the LaTeX tagging-project can produce tagged, accessible PDFs.
|
||||
%
|
||||
% Look-and-feel: sans-serif uppercase title and author on a single
|
||||
% line, sans-serif uppercase section headings, no paragraph indent,
|
||||
% and a small-caps "page/total" footer.
|
||||
%
|
||||
% Copyright 2009-2026 Benjamin Mako Hill <mako@atdot.cc>
|
||||
% Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
|
||||
|
||||
% Distributed as free software under the GNU GPL v3
|
||||
|
||||
\usepackage{lastpage}
|
||||
\usepackage{xcolor}
|
||||
|
||||
%%% Page style: empty header; "page/total" centered in the footer.
|
||||
\usepackage{fancyhdr}
|
||||
\setlength{\headheight}{14.5pt}
|
||||
\addtolength{\topmargin}{-2.5pt}
|
||||
|
||||
\fancypagestyle{cdsc-page-memo}{%
|
||||
\fancyhf{}%
|
||||
\fancyfoot[C]{\scshape\thepage/\pageref*{LastPage}}%
|
||||
\renewcommand{\headrulewidth}{0pt}%
|
||||
}
|
||||
|
||||
% Variant with git revision info in the footer (requires the vc package).
|
||||
\fancypagestyle{cdsc-page-memo-git}{%
|
||||
\fancyhf{}%
|
||||
\fancyfoot[C]{\texttt{\footnotesize\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}%
|
||||
\renewcommand{\headrulewidth}{0pt}%
|
||||
}
|
||||
|
||||
\pagestyle{cdsc-page-memo}
|
||||
|
||||
%%% Section headings: large sans-serif bold uppercase, with the
|
||||
%%% tight before/after spacing the original memo style used.
|
||||
\usepackage{titlesec}
|
||||
|
||||
\titleformat{\section}
|
||||
{\normalsize\sffamily\bfseries\MakeUppercase}{\thesection.}{0.5em}{}
|
||||
\titlespacing*{\section}{0pt}{*1.5}{1pt}
|
||||
|
||||
\titleformat{\subsection}
|
||||
{\small\sffamily\bfseries\MakeUppercase}{\thesubsection.}{0.5em}{}
|
||||
\titlespacing*{\subsection}{0pt}{*1}{1pt}
|
||||
|
||||
\titleformat{\subsubsection}[runin]
|
||||
{\footnotesize\sffamily\bfseries}{\thesubsubsection.}{0.5em}{}[\hskip 0.5em]
|
||||
|
||||
% By default, suppress section numbering. To enable numbered sections
|
||||
% and subsections, comment the line below and uncomment the alternative.
|
||||
\setcounter{secnumdepth}{0}
|
||||
% \setcounter{secnumdepth}{2}
|
||||
|
||||
%%% Title block: "TITLE [...] AUTHOR" on a single line, no date.
|
||||
\usepackage{titling}
|
||||
|
||||
\renewcommand{\maketitle}{%
|
||||
\par\noindent\footnotesize\puB\par
|
||||
{\large\sffamily\bfseries\MakeUppercase\thetitle}\hfill
|
||||
{\large\sffamily\MakeUppercase\theauthor}%
|
||||
\par\vskip 0.7em%
|
||||
}
|
||||
|
||||
%% \published{...}: a note about publication status, printed in small
|
||||
%% type at the very top of the title block.
|
||||
\newcommand{\puB}{}
|
||||
\newcommand{\published}[1]{\gdef\puB{#1}}
|
||||
|
||||
%%% List spacing
|
||||
\usepackage{enumitem}
|
||||
\setlist{topsep=0pt, partopsep=0pt}
|
||||
|
||||
%%% Caption font
|
||||
\usepackage{caption}
|
||||
\captionsetup{font=small}
|
||||
|
||||
%%% No paragraph indent (memos use a blank-line paragraph break style).
|
||||
\setlength{\parindent}{0pt}
|
||||
|
||||
%%% Footnote symbol command (for \thanks{} footnotes that should not
|
||||
%%% have a numeric mark). Use as \symbolfootnote[0]{Footnote text}.
|
||||
\long\def\symbolfootnote[#1]#2{\begingroup%
|
||||
\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
|
||||
|
||||
\endinput
|
||||
14
memo_template/refs.bib
Normal file
14
memo_template/refs.bib
Normal file
@@ -0,0 +1,14 @@
|
||||
@inproceedings{989866,
|
||||
author = {Ken Hinckley and Gonzalo Ramos and François
|
||||
Guimbretiere and Patrick Baudisch and Marc Smith},
|
||||
title = {Stitching: pen gestures that span multiple displays},
|
||||
booktitle = {AVI '04: Proceedings of the working conference on
|
||||
Advanced visual interfaces},
|
||||
year = {2004},
|
||||
isbn = {1-58113-867-9},
|
||||
pages = {23--31},
|
||||
location = {Gallipoli, Italy},
|
||||
doi = {http://doi.acm.org/10.1145/989863.989866},
|
||||
publisher = {ACM Press},
|
||||
address = {New York, NY, USA},
|
||||
}
|
||||
106
memo_template/text.tex
Normal file
106
memo_template/text.tex
Normal file
@@ -0,0 +1,106 @@
|
||||
% Tagged PDF (PDF/UA-2) accessibility setup. The article class works
|
||||
% with the LaTeX tagging-project, so we use the full \DocumentMetadata
|
||||
% path here.
|
||||
\DocumentMetadata{
|
||||
pdfversion=2.0,
|
||||
pdfstandard=ua-2,
|
||||
lang=en-US,
|
||||
}
|
||||
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\usepackage{cdsc-memo}
|
||||
\usepackage{tagpdf}
|
||||
\tagpdfsetup{activate-all}
|
||||
|
||||
\usepackage{fontspec}
|
||||
\setmainfont{EB Garamond}
|
||||
\setsansfont{TeX Gyre Heros}
|
||||
|
||||
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
||||
|
||||
% 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}
|
||||
|
||||
% urls and colors
|
||||
\usepackage[dvipsnames]{xcolor}
|
||||
\usepackage[breaklinks]{hyperref}
|
||||
|
||||
% pdftitle/pdfauthor populate PDF and XMP metadata; keep these in sync
|
||||
% with \title{} and \author{} below. UA-2 requires dc:title in XMP.
|
||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
|
||||
urlcolor=Blue, unicode=true,
|
||||
pdftitle={Memo Title},
|
||||
pdfauthor={Your Name},
|
||||
pdflang={en-US},
|
||||
pdfdisplaydoctitle=true}
|
||||
|
||||
% list of footnote symbols for \thanks{}
|
||||
\makeatletter
|
||||
\renewcommand*{\@fnsymbol}[1]{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
|
||||
\mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
|
||||
\or \ddagger\ddagger \else\@ctrerr\fi}}
|
||||
\makeatother
|
||||
\newcommand*\samethanks[1][\value{footnote}]{\footnotemark[#1]}
|
||||
|
||||
% add bibliographic stuff
|
||||
\usepackage[american]{babel}
|
||||
\usepackage{csquotes}
|
||||
\usepackage[natbib=true, style=apa, backend=biber]{biblatex}
|
||||
\addbibresource{refs.bib}
|
||||
\DeclareLanguageMapping{american}{american-apa}
|
||||
|
||||
\defbibheading{secbib}[\bibname]{%
|
||||
\section*{#1}%
|
||||
\markboth{#1}{#1}%
|
||||
\baselineskip 14.2pt}
|
||||
|
||||
\def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})}
|
||||
\def\citespos#1{\citeauthor{#1}' (\citeyear{#1})}
|
||||
|
||||
% LATEX NOTE: these lines will import vc stuff after running `make vc`,
|
||||
% which adds a git revision footer to each page:
|
||||
% \input{vc}
|
||||
% \pagestyle{cdsc-page-memo-git}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\setlength{\parskip}{4.5pt}
|
||||
\baselineskip 16pt
|
||||
|
||||
\title{Memo Title}
|
||||
\author{Your Name}
|
||||
|
||||
\maketitle
|
||||
|
||||
\section{Section}
|
||||
|
||||
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}.
|
||||
|
||||
\section{Another Section}
|
||||
|
||||
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.
|
||||
|
||||
\subsection{A Subsection}
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog.
|
||||
|
||||
% bibliography
|
||||
\setcounter{biburlnumpenalty}{9001}
|
||||
\printbibliography[title = {References}, heading=secbib]
|
||||
|
||||
|
||||
\end{document}
|
||||
|
||||
% LocalWords:
|
||||
@@ -10,7 +10,7 @@ CURDIR=$(pwd)
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename "$0") <type> <directory>"
|
||||
echo "Types: paper, assignment, knitr, letter"
|
||||
echo "Types: paper, memo, knitr, letter"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@ case "$TYPE" in
|
||||
TEMPLATE="paper_template"
|
||||
EXT="tex"
|
||||
;;
|
||||
assignment)
|
||||
memo)
|
||||
REPO="$HOME/tex/cdsc_tex"
|
||||
BRANCH="master"
|
||||
TEMPLATE="assignment_template"
|
||||
TEMPLATE="memo_template"
|
||||
EXT="tex"
|
||||
;;
|
||||
knitr)
|
||||
|
||||
2
paper_template/.gitignore
vendored
2
paper_template/.gitignore
vendored
@@ -13,5 +13,3 @@
|
||||
/*.ttt
|
||||
/*.bcf
|
||||
/*.run.xml
|
||||
/figures/*
|
||||
/*.tex
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
#!/usr/bin/make
|
||||
|
||||
all: $(patsubst %.Rtex,%.pdf,$(wildcard *.Rtex))
|
||||
all: $(patsubst %.tex,%.pdf,$(wildcard *.tex))
|
||||
|
||||
%.tex: %.Rtex
|
||||
Rscript -e "library(knitr); knit('$<')"
|
||||
# use the following section for Rnw/knitr documents
|
||||
# all: $(patsubst %.Rnw,%.pdf,$(wildcard *.Rnw))
|
||||
# %.tex: %.Rnw
|
||||
# Rscript -e "library(knitr); knit('$<')"
|
||||
|
||||
%.pdf: %.tex
|
||||
latexmk -f -pdf $<
|
||||
latexmk -f -lualatex $<
|
||||
|
||||
clean:
|
||||
latexmk -C *.tex
|
||||
rm -f *.tmp *.run.xml
|
||||
rm -f vc
|
||||
rm -f *.bbl
|
||||
# the following lines are useful for Rtex/knitr
|
||||
rm -rf cache/ figure/
|
||||
rm -f *.tex
|
||||
# the following lines are useful for Rnw/knitr
|
||||
# rm -rf cache/ figure/
|
||||
# rm -f *.tex
|
||||
|
||||
viewpdf: all
|
||||
evince *.pdf
|
||||
@@ -25,4 +27,4 @@ vc: resources/vc-git
|
||||
pdf: all
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.tex
|
||||
# .PRECIOUS: %.tex
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
% Some article styles and page layout tweaks for the LaTeX Memoir
|
||||
% class.
|
||||
%
|
||||
% Copyright 2009-2018 Benjamin Mako Hill <mako@atdot.cc>
|
||||
% Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
|
||||
|
||||
% Distributed as free software under the GNU GPL v3
|
||||
|
||||
% This file was originally based on one by Kieran Healy
|
||||
% available here: http://github.com/kjhealy/latex-custom-kjh/
|
||||
|
||||
%%% Custom styles for headers and footers
|
||||
%%% Basic
|
||||
|
||||
\makepagestyle{cdsc-page}
|
||||
%\makeevenfoot{cdsc-page}{\thepage}{}{}
|
||||
%\makeoddfoot{cdsc-page}{}{}{\thepage}
|
||||
%\makeheadrule{cdsc-page}{\textwidth}{\normalrulethickness}
|
||||
\newcommand{\@cdscmarks}{%
|
||||
\let\@mkboth\markboth
|
||||
\def\chaptermark##1{%
|
||||
\markboth{%
|
||||
\ifnum \c@secnumdepth >\m@ne
|
||||
\if@mainmatter
|
||||
\thechapter. \ %
|
||||
\fi
|
||||
\fi
|
||||
##1}{}}
|
||||
\def\sectionmark##1{%
|
||||
\markright{##1}}
|
||||
}
|
||||
\makepsmarks{cdsc-page}{\@cdscmarks}
|
||||
\makepsmarks{cdsc-page}{}
|
||||
\makeevenhead{cdsc-page}{}{}{\scshape\thepage}
|
||||
\makeoddhead{cdsc-page}{}{}{\scshape\thepage}
|
||||
|
||||
%%% version control info in footers; requires vc package
|
||||
% Make the style for vc-git revision control headers and footers
|
||||
\makepagestyle{cdsc-page-git}
|
||||
\newcommand{\@gitmarks}{%
|
||||
\let\@mkboth\markboth
|
||||
\def\chaptermark##1{%
|
||||
\markboth{%
|
||||
\ifnum \c@secnumdepth >\m@ne
|
||||
\if@mainmatter
|
||||
\thechapter. \ %
|
||||
\fi
|
||||
\fi
|
||||
##1}{}}
|
||||
\def\sectionmark##1{%
|
||||
\markright{##1}}
|
||||
}
|
||||
\makepsmarks{cdsc-page-git}{\@gitmarks}
|
||||
\makeevenhead{cdsc-page-git}{}{}{\scshape\thepage}
|
||||
\makeoddhead{cdsc-page-git}{}{}{\scshape\thepage}
|
||||
\makeevenfoot{cdsc-page-git}{}{\texttt{\footnotesize{\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}}{}
|
||||
\makeoddfoot{cdsc-page-git}{}{\texttt{\footnotesize \textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}{}
|
||||
|
||||
%%% print a datestamp from ShareLaTeX
|
||||
\makepagestyle{cdsc-page-overleaf}
|
||||
\newcommand{\@slmarks}{%
|
||||
\let\@mkboth\markboth
|
||||
\def\chaptermark##1{%
|
||||
\markboth{%
|
||||
\ifnum \c@secnumdepth >\m@ne
|
||||
\if@mainmatter
|
||||
\thechapter. \ %
|
||||
\fi
|
||||
\fi
|
||||
##1}{}}
|
||||
\def\sectionmark##1{%
|
||||
\markright{##1}}
|
||||
}
|
||||
\makepsmarks{cdsc-page-overleaf}{\@slmarks}
|
||||
\makeevenhead{cdsc-page-overleaf}{}{}{\scshape\thepage}
|
||||
\makeoddhead{cdsc-page-overleaf}{}{}{\scshape\thepage}
|
||||
\makeevenfoot{cdsc-page-overleaf}{}{\texttt{\footnotesize{\textcolor{BrickRed}{Buildstamp/Version:~\pdfdate}}}}{}
|
||||
\makeoddfoot{cdsc-page-overleaf}{}{\texttt{\footnotesize{\textcolor{BrickRed}{Buildstamp/Version:~\pdfdate}}}}{}
|
||||
|
||||
%% 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}
|
||||
|
||||
\makepagestyle{cdsc-page-memo}
|
||||
\makeevenhead{cdsc-page-memo}{}{}{}
|
||||
\makeoddhead{cdsc-page-memo}{}{}{}
|
||||
\makeevenfoot{cdsc-page-memo}{}{\scshape \thepage/\pageref{LastPage}}{}
|
||||
\makeoddfoot{cdsc-page-memo}{}{\scshape \thepage/\pageref{LastPage}}{}
|
||||
|
||||
\usepackage{lastpage}
|
||||
\usepackage{datetime}
|
||||
|
||||
% 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}
|
||||
|
||||
% put a period after the section numbers
|
||||
\setsecnumformat{\csname the#1\endcsname.\enspace}
|
||||
|
||||
% set fonts to garamond and helvetica
|
||||
\renewcommand{\rmdefault}{ugm}
|
||||
\renewcommand{\sfdefault}{phv}
|
||||
|
||||
% material shared between the two modes
|
||||
|
||||
\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 chapter numbering
|
||||
\counterwithout{section}{chapter}
|
||||
\counterwithout{figure}{chapter}
|
||||
\counterwithout{table}{chapter}
|
||||
|
||||
% supress chapter numbers
|
||||
\maxsecnumdepth{chapter}
|
||||
\setsecnumdepth{chapter}
|
||||
|
||||
% for numbered sections and subsections:
|
||||
% (a) comment out the above stanza; (b) uncomment the one below
|
||||
% \maxsecnumdepth{subsection}
|
||||
% \setsecnumdepth{subsection}
|
||||
|
||||
% set name of bibliography to 'references'
|
||||
\renewcommand{\bibname}{References}
|
||||
|
||||
% >> cdsc-article <<
|
||||
\makechapterstyle{cdsc-article}{
|
||||
|
||||
% section heading sytle
|
||||
\setsecheadstyle{\large\scshape}
|
||||
|
||||
% 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}{Abstract:}
|
||||
\renewcommand{\abstractnamefont}{\normalfont\small\bfseries}
|
||||
\renewcommand{\abstracttextfont}{\normalfont\small}
|
||||
\setlength{\absparindent}{0em}
|
||||
\setlength{\abstitleskip}{-1.5em}
|
||||
\abstractrunin
|
||||
|
||||
% this is the default page style for chapters
|
||||
\pagestyle{cdsc-page}
|
||||
|
||||
}
|
||||
|
||||
% >> cdsc-memo <<
|
||||
\makechapterstyle{cdsc-memo}{
|
||||
|
||||
% section heading sytle
|
||||
\setsecheadstyle{\large\sffamily\bfseries\MakeUppercase}
|
||||
|
||||
% reduce skip after section heading
|
||||
\setaftersecskip{1pt}
|
||||
\setbeforesecskip{-1em}
|
||||
\setaftersubsecskip{1pt}
|
||||
\setbeforesubsecskip{-1em}
|
||||
% \setaftersubsubsecskip{1pt}
|
||||
% \setbeforesubsubsecskip{-1em}
|
||||
|
||||
|
||||
% 'abstract' title, bigger skip from title
|
||||
% \renewcommand{\maketitle}{\{\preauthor \theauthor\} \hfill \thetitle}
|
||||
\renewcommand{\maketitle}{
|
||||
{\Large\sffamily\bfseries\MakeUppercase\thetitle} \hfill
|
||||
{\Large\sffamily\MakeUppercase\theauthor}
|
||||
\vskip 0.7em}
|
||||
\renewcommand{\abstractname}{\normalfont\scriptsize\noindent}
|
||||
\renewcommand{\abstracttextfont}{\normalfont\scriptsize}
|
||||
\abstractrunin
|
||||
|
||||
% set name of bibliography to 'references'
|
||||
\renewcommand{\bibname}{References}
|
||||
|
||||
\parindent 0pt
|
||||
|
||||
% this is the default page style for chapters
|
||||
\pagestyle{cdsc-page-memo}
|
||||
|
||||
}
|
||||
|
||||
\endinput
|
||||
|
||||
110
paper_template/cdsc-paper.sty
Normal file
110
paper_template/cdsc-paper.sty
Normal file
@@ -0,0 +1,110 @@
|
||||
% Article-class styles and page layout for CDSC paper documents.
|
||||
%
|
||||
% This file replaces the older cdsc-memoir.sty. It targets the
|
||||
% standard `article' class so the LaTeX tagging-project can produce
|
||||
% tagged, accessible PDFs --- memoir is currently incompatible with
|
||||
% that work. The look-and-feel is kept as close to the previous
|
||||
% cdsc-article chapterstyle as is practical.
|
||||
%
|
||||
% Copyright 2009-2026 Benjamin Mako Hill <mako@atdot.cc>
|
||||
% Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
|
||||
|
||||
% Distributed as free software under the GNU GPL v3
|
||||
|
||||
\usepackage{lastpage}
|
||||
\usepackage{datetime}
|
||||
\usepackage{xcolor}
|
||||
|
||||
%%% Page styles (replaces memoir's \makepagestyle / \makeevenhead etc.)
|
||||
\usepackage{fancyhdr}
|
||||
\setlength{\headheight}{14.5pt}
|
||||
\addtolength{\topmargin}{-2.5pt}
|
||||
|
||||
% Basic: page number in small caps in the upper-right corner
|
||||
\fancypagestyle{cdsc-page}{%
|
||||
\fancyhf{}%
|
||||
\fancyhead[R]{\scshape\thepage}%
|
||||
\renewcommand{\headrulewidth}{0pt}%
|
||||
}
|
||||
|
||||
% Variant with git revision info in the footer (requires the vc package).
|
||||
\fancypagestyle{cdsc-page-git}{%
|
||||
\fancyhf{}%
|
||||
\fancyhead[R]{\scshape\thepage}%
|
||||
\fancyfoot[C]{\texttt{\footnotesize\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}%
|
||||
\renewcommand{\headrulewidth}{0pt}%
|
||||
}
|
||||
|
||||
% Variant with a build timestamp in the footer (useful on Overleaf/etc.)
|
||||
\fancypagestyle{cdsc-page-overleaf}{%
|
||||
\fancyhf{}%
|
||||
\fancyhead[R]{\scshape\thepage}%
|
||||
\fancyfoot[C]{\texttt{\footnotesize\textcolor{BrickRed}{Buildstamp/Version:~\today}}}%
|
||||
\renewcommand{\headrulewidth}{0pt}%
|
||||
}
|
||||
|
||||
\pagestyle{cdsc-page}
|
||||
|
||||
%%% Section heading styles (replaces memoir's \setsecheadstyle etc.)
|
||||
\usepackage{titlesec}
|
||||
|
||||
% Sections: large small caps; period after the number
|
||||
\titleformat{\section}
|
||||
{\large\scshape}{\thesection.}{0.5em}{}
|
||||
\titlespacing*{\section}{0pt}{*2}{1.7ex}
|
||||
|
||||
% Subsections: italic
|
||||
\titleformat{\subsection}
|
||||
{\normalsize\itshape}{\thesubsection.}{0.5em}{}
|
||||
|
||||
% Subsubsections: small bold, runin (matches memoir's negative skip behavior)
|
||||
\titleformat{\subsubsection}[runin]
|
||||
{\small\bfseries}{\thesubsubsection.}{0.5em}{}[\hskip 0.5em]
|
||||
|
||||
% By default, suppress numbering at the section level (matches the
|
||||
% memoir template's default of \setsecnumdepth{chapter}). To enable
|
||||
% numbered sections and subsections, comment the line below and
|
||||
% uncomment the alternative.
|
||||
\setcounter{secnumdepth}{0}
|
||||
% \setcounter{secnumdepth}{2}
|
||||
|
||||
%%% Title block (titling package replaces memoir's title hooks)
|
||||
\usepackage{titling}
|
||||
|
||||
% Title flush left, italic, large
|
||||
\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}
|
||||
|
||||
%% \published{...}: a note about the publication status, printed in
|
||||
%% small type at the very top of the title block. Use this for
|
||||
%% draft/working-paper notices.
|
||||
\newcommand{\puB}{}
|
||||
\newcommand{\published}[1]{\gdef\puB{#1}}
|
||||
\renewcommand{\maketitlehooka}{\par\noindent\footnotesize\puB}
|
||||
|
||||
%%% Abstract: runin style ("**Abstract:** the quick brown fox..."),
|
||||
%%% indented from both margins (via the quote environment, which gives
|
||||
%%% the side indent without adding first-line paragraph indentation).
|
||||
\renewenvironment{abstract}%
|
||||
{\par\addvspace{\medskipamount}\small
|
||||
\begin{quote}\noindent\textbf{Abstract:}\hspace{0.5em}\ignorespaces}%
|
||||
{\end{quote}\par\medskip}
|
||||
|
||||
%%% List spacing (replaces memoir's \firmlists --- tighter lists)
|
||||
\usepackage{enumitem}
|
||||
\setlist{topsep=0pt, partopsep=0pt}
|
||||
|
||||
%%% Caption font
|
||||
\usepackage{caption}
|
||||
\captionsetup{font=small}
|
||||
|
||||
%%% Footnote symbol command (for \thanks{} footnotes that should not
|
||||
%%% have a numeric mark). Use as \symbolfootnote[0]{Footnote text}.
|
||||
\long\def\symbolfootnote[#1]#2{\begingroup%
|
||||
\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
|
||||
|
||||
\endinput
|
||||
Binary file not shown.
@@ -1,50 +0,0 @@
|
||||
bold <- function(x) {paste('{\\textbf{',x,'}}', sep ='')}
|
||||
gray <- function(x) {paste('{\\textcolor{gray}{',x,'}}', sep ='')}
|
||||
wrapify <- function (x) {paste("{", x, "}", sep="")}
|
||||
|
||||
# load("knitr_data.RData"); now broken up into small files so we'll bring 'em all in together
|
||||
r <- do.call("c", lapply(paste("knitr_rdata/", list.files("knitr_rdata"), sep=""),
|
||||
function (x) {load(x); return(r)}))
|
||||
|
||||
attach(r)
|
||||
|
||||
f <- function (x) {formatC(x, format="d", big.mark=',')}
|
||||
|
||||
format.percent <- function(x) {paste(f(x*100),"\\%",sep='')}
|
||||
|
||||
format.day.ordinal <- function(x) {
|
||||
day <- format(x,format="%d")
|
||||
daylast <- substr(day,nchar(day),nchar(day))
|
||||
dayfirst <- substr(day,1,1)
|
||||
if(dayfirst == '0')
|
||||
day = daylast
|
||||
|
||||
if( daylast == "1")
|
||||
day <- paste0(day,"st")
|
||||
else if(daylast == "2")
|
||||
day <- paste0(day,"nd")
|
||||
else if (daylast == "3")
|
||||
day <- paste0(day,"rd")
|
||||
else
|
||||
day <- paste0(day,"th")
|
||||
|
||||
return(day)
|
||||
}
|
||||
|
||||
format.month <- function(x){
|
||||
return( format(x,format='%B %Y'))
|
||||
}
|
||||
|
||||
format.date <- function(x) {
|
||||
return(paste(format(x,format = '%B'),format.day.ordinal(x),format(x,format='%Y'),sep=' '))
|
||||
}
|
||||
|
||||
format.pvalue <- function (x, digits=3) {
|
||||
threshold <- 1*10^(-1*digits)
|
||||
x <- round(x, digits)
|
||||
if (x < threshold) {
|
||||
return(paste("p<", threshold, sep=""))
|
||||
} else {
|
||||
return(paste("p=", x, sep=""))
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,23 @@
|
||||
\documentclass[12pt]{memoir}
|
||||
% Tagged PDF (PDF/UA-2) accessibility setup. The article class works
|
||||
% with the LaTeX tagging-project, so we use the full \DocumentMetadata
|
||||
% path here.
|
||||
\DocumentMetadata{
|
||||
pdfversion=2.0,
|
||||
pdfstandard=ua-2,
|
||||
lang=en-US,
|
||||
}
|
||||
|
||||
\usepackage{cdsc-memoir}
|
||||
% there are two chapter styles: cdsc-article and cdsc-memo
|
||||
% memo assumes that you remove the "\\" and the email address from the
|
||||
% \author field below as well as that you will comment out the
|
||||
% \published tag
|
||||
\chapterstyle{cdsc-article}
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{cdsc-paper}
|
||||
\usepackage{tagpdf}
|
||||
\tagpdfsetup{activate-all}
|
||||
|
||||
\usepackage{fontspec}
|
||||
\setmainfont{EB Garamond}
|
||||
\setsansfont{TeX Gyre Heros}
|
||||
\usepackage{wrapfig}
|
||||
|
||||
<<init, echo=FALSE>>=
|
||||
knit_hooks$set(document = function(x) {
|
||||
x <- sub('\\usepackage[]{xcolor}',
|
||||
'\\usepackage[dvipsnames]{xcolor}', x, fixed = TRUE)
|
||||
x
|
||||
})
|
||||
opts_chunk$set(fig.path="figures/knitr-")
|
||||
|
||||
source("resources/preamble.R")
|
||||
@
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{textcomp}
|
||||
\usepackage[garamond]{mathdesign}
|
||||
|
||||
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
||||
|
||||
% packages i use in essentially every document
|
||||
@@ -39,8 +32,15 @@ source("resources/preamble.R")
|
||||
% import and customize urls
|
||||
\usepackage[dvipsnames]{xcolor}
|
||||
\usepackage[breaklinks]{hyperref}
|
||||
|
||||
% pdftitle/pdfauthor populate PDF and XMP metadata; keep these in sync
|
||||
% with \title{} and \author{} below. UA-2 requires dc:title in XMP.
|
||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
|
||||
urlcolor=Blue, unicode=true}
|
||||
urlcolor=Blue, unicode=true,
|
||||
pdftitle={Title},
|
||||
pdfauthor={Your Name},
|
||||
pdflang={en-US},
|
||||
pdfdisplaydoctitle=true}
|
||||
|
||||
% list of footnote symbols for \thanks{}
|
||||
\makeatletter
|
||||
@@ -60,15 +60,11 @@ source("resources/preamble.R")
|
||||
\defbibheading{secbib}[\bibname]{%
|
||||
\section*{#1}%
|
||||
\markboth{#1}{#1}%
|
||||
\baselineskip 14.2pt%
|
||||
\prebibhook}
|
||||
\baselineskip 14.2pt}
|
||||
|
||||
\def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})}
|
||||
\def\citespos#1{\citeauthor{#1}' (\citeyear{#1})}
|
||||
|
||||
% memoir function to take out of the space out of the whitespace lists
|
||||
\firmlists
|
||||
|
||||
% 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:
|
||||
@@ -145,15 +141,6 @@ 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}.
|
||||
|
||||
\begin{table}
|
||||
\centering
|
||||
<<test_table, echo=FALSE>>=
|
||||
kable(form.copy, format="latex")
|
||||
@
|
||||
\caption{This is a test table. There are \Sexpr{f(nrow(form.copy))} rows in the table.}
|
||||
\label{tab:test}
|
||||
\end{table}
|
||||
|
||||
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
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,24 @@
|
||||
\DocumentMetadata{
|
||||
pdfversion=2.0,
|
||||
pdfstandard=ua-2,
|
||||
lang=en-US,
|
||||
}
|
||||
\documentclass[xcolor=dvipsnames, 12pt]{beamer}
|
||||
|
||||
\usepackage[size=custom, width=114, height=80, scale=1.5]{beamerposter}
|
||||
|
||||
\usepackage{tagpdf}
|
||||
\tagpdfsetup{activate-all}
|
||||
|
||||
% Tag frame titles as H1 headings for PDF accessibility
|
||||
\addtobeamertemplate{frametitle}{%
|
||||
\tagstructbegin{tag=H1}%
|
||||
\tagmcbegin{tag=H1}%
|
||||
}{%
|
||||
\tagmcend%
|
||||
\tagstructend%
|
||||
}
|
||||
|
||||
\usepackage[absolute,overlay]{textpos}
|
||||
% set up the file to create notes in the output PDFs
|
||||
|
||||
@@ -41,10 +58,10 @@
|
||||
\tikzstyle{every picture}+=[overlay,remember picture]
|
||||
|
||||
% add functions to circle parts of slides (e.g., in tables)
|
||||
\newcommand\marktopleft[1]{\tikz \node (marker-#1-a) at (0,1.5ex) {};}
|
||||
\newcommand\marktopleft[1]{\tagmcbegin{artifact}\tikz \node (marker-#1-a) at (0,1.5ex) {};\tagmcend}
|
||||
\newcommand\markbottomright[1]{%
|
||||
\tikz{\node (marker-#1-b) at (0,0) {};}
|
||||
\tikz[dashed,inner sep=3pt]{\node[violet!75,ultra thick,draw,rounded rectangle,fit=(marker-#1-a.center) (marker-#1-b.center)] {};}}
|
||||
\tagmcbegin{artifact}\tikz{\node (marker-#1-b) at (0,0) {};}\tagmcend
|
||||
\tagmcbegin{artifact}\tikz[dashed,inner sep=3pt]{\node[violet!75,ultra thick,draw,rounded rectangle,fit=(marker-#1-a.center) (marker-#1-b.center)] {};}\tagmcend}
|
||||
|
||||
% DEPRECATED function to build a huge centered dropshadow
|
||||
\newcommand\dropshadow[3]{%
|
||||
@@ -88,13 +105,13 @@
|
||||
\usepackage{url}
|
||||
% \usepackage{dcolumn}
|
||||
% \usepackage{booktabs}
|
||||
% bibliography stuff
|
||||
\DeclareLanguageMapping{american}{american-apa}
|
||||
\defbibheading{secbib}[\bibname]{%
|
||||
\section{#1}%
|
||||
\markboth{#1}{#1}%
|
||||
\baselineskip 14.2pt%
|
||||
\prebibhook}
|
||||
% bibliography stuff — uncomment these if you load biblatex
|
||||
% \DeclareLanguageMapping{american}{american-apa}
|
||||
% \defbibheading{secbib}[\bibname]{%
|
||||
% \section{#1}%
|
||||
% \markboth{#1}{#1}%
|
||||
% \baselineskip 14.2pt%
|
||||
% \prebibhook}
|
||||
|
||||
\def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})}
|
||||
\def\citespos#1{\citeauthor{#1}' (\citeyear{#1})}
|
||||
@@ -149,7 +166,9 @@
|
||||
%\useoutertheme{infolines}p
|
||||
%\usepackage[breaklinks]{hyperref}
|
||||
|
||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=makopurple1, urlcolor=Plum, unicode=true}
|
||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=makopurple1, urlcolor=Plum, unicode=true,
|
||||
pdflang={en-US},
|
||||
pdfdisplaydoctitle=true}
|
||||
|
||||
% create a boldface version of the header
|
||||
\setbeamerfont{frametitle}{series=\bfseries}
|
||||
@@ -185,7 +204,7 @@
|
||||
\newcommand{\credit}[1]{%
|
||||
\tikz[overlay]{\node at (current page.south east)
|
||||
[anchor=south east,yshift=1.3em,xshift=0.35em]
|
||||
{\smaller {[}#1{]}};}}
|
||||
{\tagmcbegin{artifact}\smaller {[}#1{]}\tagmcend};}}
|
||||
\begin{document}
|
||||
|
||||
\begin{frame}[t]{}
|
||||
@@ -195,7 +214,7 @@
|
||||
|
||||
\vspace*{1ex}
|
||||
|
||||
\includegraphics[width=8cm]{figures/uw_logo}
|
||||
\includegraphics[width=8cm,alt={University of Washington logo}]{figures/uw_logo}
|
||||
\vspace*{1ex}
|
||||
\end{textblock}
|
||||
|
||||
@@ -248,7 +267,7 @@
|
||||
\end{textblock}
|
||||
|
||||
\begin{textblock}{2}(122,0)
|
||||
\includegraphics[width=6.5cm]{figures/logo}
|
||||
\includegraphics[width=6.5cm,alt={Community Data Science Collective logo}]{figures/logo}
|
||||
|
||||
\vspace*{1ex}
|
||||
\end{textblock}
|
||||
@@ -279,7 +298,7 @@
|
||||
\vspace{1em}
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=0.8\textwidth]{figures/taboo topics hypotheses.jpg}
|
||||
\includegraphics[width=0.8\textwidth,alt={Diagram of project hypotheses}]{figures/taboo topics hypotheses.jpg}
|
||||
\end{figure}
|
||||
|
||||
|
||||
@@ -301,7 +320,7 @@ With billions of viewers, Wikipedia is one of the top ten most visited sites on
|
||||
\vspace{0.3em}
|
||||
\begin{center}
|
||||
\begin{figure}
|
||||
\includegraphics[width=0.8\textwidth]{figures/viewsBox.pdf}
|
||||
\includegraphics[width=0.8\textwidth,alt={Boxplot of article ranks by popularity}]{figures/viewsBox.pdf}
|
||||
\caption{Rank of articles in our sample versus all articles with dictionary salience. The most popular article is ranked ``1''.}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
@@ -323,7 +342,7 @@ Definitions tagged with euphemistic usages were marked as taboo. We extracted al
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{figures/member.png}
|
||||
\includegraphics[width=\textwidth,alt={Screenshot of the Wiktionary definition of ``member''}]{figures/member.png}
|
||||
|
||||
\caption{The Wiktionary definition of ``member''---which has meanings ranging from the organizational to the anatomical.}
|
||||
\label{fig:wiktEntry}
|
||||
@@ -340,7 +359,7 @@ To develop a comparison sample, we filtered the population of articles to just t
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=.9\textwidth]{figures/V2 Taboo Topics Analytical Pipeline.pdf}
|
||||
\includegraphics[width=.9\textwidth,alt={Flowchart of the analytical pipeline}]{figures/V2 Taboo Topics Analytical Pipeline.pdf}
|
||||
\caption{Our analytical pipeline first extracts n-grams, labeling them taboo if they are drawn from definitions tagged as euphemistic. Our samples are drawn from those articles that match these n-grams.} \label{fig:pipeline}
|
||||
\end{figure}
|
||||
\end{block}
|
||||
@@ -352,7 +371,7 @@ To develop a comparison sample, we filtered the population of articles to just t
|
||||
\vspace{0.3em}
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=0.5\textwidth]{figures/volumeBox.pdf}
|
||||
\includegraphics[width=0.5\textwidth,alt={Boxplot of contribution volume}]{figures/volumeBox.pdf}
|
||||
\caption{Taboo articles receive more contributions than comparable articles.}
|
||||
\label{fig:volumeBox}
|
||||
\end{figure}
|
||||
@@ -367,7 +386,7 @@ To develop a comparison sample, we filtered the population of articles to just t
|
||||
\vspace{0.3em}
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=0.5\textwidth]{figures/boxQualitySrc.pdf}
|
||||
\includegraphics[width=0.5\textwidth,alt={Boxplot of article quality}]{figures/boxQualitySrc.pdf}
|
||||
\caption{Articles about taboo subjects exceed the quality of our comparison set.}
|
||||
\label{fig:ageGrowth}
|
||||
\end{figure}
|
||||
@@ -382,7 +401,7 @@ To develop a comparison sample, we filtered the population of articles to just t
|
||||
\vspace{0.3em}
|
||||
\begin{center}
|
||||
\begin{figure}
|
||||
\includegraphics[width=0.5\textwidth]{figures/damageRate.pdf}
|
||||
\includegraphics[width=0.5\textwidth,alt={Plot of damage rates by article category}]{figures/damageRate.pdf}
|
||||
\caption{The rate of damaging contributions to taboo subjects is higher.}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
@@ -396,12 +415,12 @@ Editors of taboo subjects are less likely to use an account, have less experienc
|
||||
|
||||
\begin{figure}
|
||||
%\begin{minipage}{0.45\textwidth}
|
||||
\includegraphics[width=.45\textwidth]{figures/mailProp.pdf}
|
||||
\includegraphics[width=.45\textwidth,alt={Proportion of contributors who disclose an email address}]{figures/mailProp.pdf}
|
||||
\end{figure}
|
||||
%\end{minipage}\hfill
|
||||
%\begin{minipage}{0.45\textwidth}
|
||||
\begin{figure}
|
||||
\includegraphics[width=.45\textwidth]{figures/genderProp.pdf}
|
||||
\includegraphics[width=.45\textwidth,alt={Proportion of contributors who disclose gender}]{figures/genderProp.pdf}
|
||||
%\end{minipage}\hfill
|
||||
\end{figure}
|
||||
|
||||
|
||||
108
wiki_page.wiki
108
wiki_page.wiki
@@ -1,108 +0,0 @@
|
||||
In order to write LaTeX documents, there are two main options. The first is to do everything in Overleaf. The second option, which is explained below in this document under [[#Installing TeX on your computer]], is to install software on your local machine which will compile LaTeX documents.
|
||||
|
||||
This document explains how to use our lab-created templates. Using other templates may require other steps.
|
||||
|
||||
== Getting/Installing Templates ==
|
||||
|
||||
You can find the latest version of the templates [https://gitea.communitydata.science/collective/cdsc_tex here].
|
||||
|
||||
To clone the public repository, you can do:
|
||||
|
||||
git clone https://gitea.communitydata.science/collective/cdsc_tex.git
|
||||
|
||||
If you can clone them into the directory <code>~/tex/</code> (e.g., by doing <code>mkdir ~/tex; cd ~/tex</code> before running the clone command above) it will make things a bit easier.
|
||||
|
||||
This repository includes scripts for quickly creating a new project from a template. Symlink them into your PATH with:
|
||||
|
||||
ln -s ~/tex/cdsc_tex/new_tex_document ~/bin/
|
||||
ln -s ~/tex/cdsc_tex/rename_tex_to_dirname ~/bin/
|
||||
|
||||
The main script is <code>new_tex_document</code>, which takes a document type and destination directory:
|
||||
|
||||
new_tex_document <type> <directory>
|
||||
|
||||
Available types are <code>paper</code>, <code>assignment</code>, <code>knitr</code>, and <code>letter</code>. For example:
|
||||
|
||||
new_tex_document paper my-new-paper
|
||||
new_tex_document knitr my-knitr-paper
|
||||
|
||||
The repository also includes <code>cdsc_tex_aliases.sh</code>, which defines aliases for the old individual script names (<code>new_knitr_document</code>, <code>new_tex_assignment</code>, <code>new_tex_letter</code>) in case you prefer those. Add the following to your <code>.bashrc</code> or <code>.zshrc</code> to load them:
|
||||
|
||||
[[ -f ~/tex/cdsc_tex/cdsc_tex_aliases.sh ]] && source ~/tex/cdsc_tex/cdsc_tex_aliases.sh
|
||||
|
||||
== Using the paper templates ==
|
||||
|
||||
There are quite a number of useful instructions sprinkled throughout the TeX source file in comments. You should pay particular attention to the comments that begin with:
|
||||
|
||||
% LATEX NOTE:
|
||||
|
||||
There are two styles that come with the package with two basic layouts that are defined. To switch between them, you just edit the following line:
|
||||
|
||||
\chapterstyle{cdsc-article}
|
||||
|
||||
The first style <code>cdsc-article</code> is great for papers ([https://mako.cc/academic/shaw_hill-laboratories_of_oligarchy-DRAFT.pdf a perhaps dated example]).
|
||||
|
||||
The second style <code>cdsc-memo</code> is more for shorter pieces and memos ([https://mako.cc/academic/bmh-research_statement.pdf a perhaps dated example]).
|
||||
|
||||
If you want to use the style, you might want to consider switching the <code>\chapterstyle</code> line mentioned above <code>cdsc-article</code> to <code>cdsc-memo</code> by editing the following line.
|
||||
|
||||
If you want to include git commit IDs and datestamp on each page of the paper, you can uncomment the following lines which will import version control information after running <code>make vc</code>
|
||||
|
||||
\input{vc}
|
||||
\pagestyle{cdsc-page-git}
|
||||
|
||||
One problem is that this can be tricky to get to work on Overleaf. This alternative line will just input a timestamp at the build process:
|
||||
|
||||
\pagestyle{cdsc-page-overleaf}
|
||||
|
||||
Either approach can be useful for keeping track of which version of a document somebody has.
|
||||
|
||||
The templates themselves use the [https://texdoc.org/serve/memoir/0 LaTeX Memoir Class] (warning that link is a ~1000 page PDF and the documentation).
|
||||
|
||||
== Using the Beamer templates ==
|
||||
|
||||
The beamer templates are described in [[CommunityData:Beamer]].
|
||||
|
||||
== Using the poster template ==
|
||||
|
||||
The poster template is in a subdirectory called <code>poster_template</code> within the <code>cdsc_tex</code> repository above. The template is actually just a single Beamer slide. You can simply upload all the files in this directory to Overleaf and/or build them following instructions over on [[CommunityData:Beamer]].
|
||||
|
||||
== Sending Patches to the templates ==
|
||||
|
||||
If you want to send patches, clone the repository, make your changes, and use <code>git format-patch</code> to generate patch files to email directly to mako at <code>mako@atdot.cc</code>. For example:
|
||||
|
||||
git format-patch origin/master
|
||||
git send-email *.patch
|
||||
|
||||
== Installing TeX on your computer ==
|
||||
=== Debian/Ubuntu Installation Instructions ===
|
||||
|
||||
First, you'll want to install the following packages:
|
||||
|
||||
* latexmk
|
||||
* texlive-latex-recommended
|
||||
* texlive-latex-extra
|
||||
* texlive-fonts-extra
|
||||
* texlive-fonts-recommended
|
||||
* texlive-bibtex-extra
|
||||
* moreutils
|
||||
* gawk
|
||||
|
||||
Also, to install Garamond grab and install the font from [https://ctan.org/pkg/urw-garamond here] through the following complicated process:
|
||||
|
||||
* Download the file
|
||||
* Create ''~/texmf'' if it does not exist yet
|
||||
* Unzip the file ugm.zip from the garamond.zip file into that ~/texmf/
|
||||
* Copy the other font files in the root directory of garamond.zip into ~/texmf/fonts/type1/
|
||||
* Run "texhash ~/texmf
|
||||
|
||||
Alternatively, if you want to install them system wide and have root credentials, you can also place them in ''/usr/local/share/texmf'' instead.
|
||||
|
||||
=== Using MacTeX on macOS ===
|
||||
|
||||
To install with MacTeX, you need to install the font:
|
||||
|
||||
wget https://tug.org/fonts/getnonfreefonts/install-getnonfreefonts
|
||||
texlua install-getnonfreefonts
|
||||
sudo getnonfreefonts-sys garamond
|
||||
|
||||
Reference in New Issue
Block a user