Skip to content

Instantly share code, notes, and snippets.

@igneus
Last active August 24, 2016 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igneus/c29bf6bd101348a5ca531c3ca924e20d to your computer and use it in GitHub Desktop.
Save igneus/c29bf6bd101348a5ca531c3ca924e20d to your computer and use it in GitHub Desktop.
my seminar paper template (studying Theology at http://www.tf.jcu.cz/)
\documentclass[12pt, a4paper, twoside]{article}
% To compile:
%
% $ xelatex filename
% $ biber filename
% $ xelatex filename
\usepackage{fontspec}
\setmainfont[Ligatures={TeX}]{TeX Gyre Pagella}
\usepackage[czech]{babel}
\usepackage{csquotes}
\usepackage[left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm, marginparsep=3mm]{geometry}
\usepackage[
backend=biber,
style=iso-authoryear,
sortlocale=cs_CZ,
maxnames=3,
firstinits=true,
]{biblatex}
\usepackage[show]{ed} % editorial annotations
\usepackage{color}
\usepackage{xcolor}
\usepackage[hidelinks]{hyperref}
\usepackage{changepage}
\usepackage{filecontents}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
% bibliography is usually short and can be inlined:
\begin{filecontents}{biblio.bib}
@book{ dulles,
author = "Avery Dulles",
title = "Models of the Church",
publisher = "Image Books",
location = "New York",
year = "1974",
isbn = "0-385-13368-5"
}
\end{filecontents}
\bibliography{biblio}
\author{Jakub Pavlík}
\title{Title of the paper}
\begin{document}
\setlength{\parindent}{0.5cm}
\maketitle
\section*{Introduction}
Lorem ipsum\cite[5]{dulles}
\section{Foo}
dolor sit amet
\printbibliography
\end{document}
deps = Dir["*.tex"] + Dir["*.*bx"] + Dir['*.bib']
main = Dir['*.tex'].first # only one expected
main_noext = main.sub '.tex', ''
main_pdf = main.sub '.tex', '.pdf'
file main_pdf => deps do |t|
sh "xelatex #{main_noext}"
sh "biber #{main_noext}"
sh "xelatex #{main_noext}"
end
task :default => [main_pdf]
task :clean do
%w{aux bbl dvi bcf blg log out pdf run.xml *~}.each do |s|
unless Dir['*.'+s].empty?
sh "rm *."+s
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment