# %.tex: %.Rnw
# Rscript -e "library(knitr); knit('$<')"
-refs-processed.bib:
- perl -p -e 's/©//' refs.bib > 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
-
-%.pdf: %.tex refs-processed.bib vc
+%.pdf: %.tex
latexmk -f -pdf $<
clean:
latexmk -C *.tex
- rm -f *.tmp
+ rm -f *.tmp *.run.xml
rm -f vc
- rm -f refs-processed.bib
+ rm -f *.bbl
# the following lines are useful for Rnw/knitr
# rm -rf cache/ figure/
# rm -f *.tex
% with article-3 \chapterstyle, change to: \pagestyle{memo}
\pagestyle{mako-mem}
-\usepackage{ucs}
-\usepackage[utf8x]{inputenc}
+\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
urlcolor=Blue, unicode=true}
% add bibliographic stuff
-\usepackage[round]{natbib}
+% 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%
+ \prebibhook}
+
\def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})}
\def\citespos#1{\citeauthor{#1}' (\citeyear{#1})}
fox jumps over the lazy dog \citep{989866}.
% bibliography here
-\renewcommand{\bibsection}{\section{\bibname}\prebibhook}
-\baselineskip 14.2pt
-\bibliography{refs-processed}
-\bibliographystyle{apalike}
+\printbibliography[title = {References}, heading=secbib]
+
\end{document}