futurist-fieldguide/pandoc/header.tex
2015-06-17 15:01:02 +02:00

61 lines
1.4 KiB
TeX

\usepackage{fontspec}
\usepackage[pagestyles]{titlesec}
\usepackage{graphicx}
\usepackage{datetime}
\usepackage[iso,english]{isodate}
%\usepackage[perpage]{footmisc}
% page geometry
\usepackage{geometry}
\geometry{
a4paper,
total={210mm,297mm},
left=30mm,
right=30mm,
top=20mm,
bottom=20mm,
}
% http://tex.stackexchange.com/questions/246174/dynamic-title-size-using-titlesec
\newcommand{\resizetitle}[1]{\resizebox{\sectionwidth}{!}{#1}}
\newlength{\sectionwidth}
\AtBeginDocument{%
\setlength{\sectionwidth}{0.7\textwidth}%
}
% unix shell date
%\immediate\write18{date >\jobname.date}
% no page numbers
\pagenumbering{gobble}
% font setup
%\setmainfont{Quattrocento Sans}
\newfontfamily\sectionfont{Encode Sans ExtraLight}
% header & footer data
\newpagestyle{main}[\small]{
\setheadrule{.55pt}%
\sethead{Quattrocento Sans / Encode Sans ExtraLight}{}{\subsectiontitle} % left, centre, right
\setfoot{}{}{\sectionfont\small{printed: \isodate{\today} \currenttime \selectfont}}
}
\pagestyle{main}
%\titleformat*{\subsection}{\sectionfont\fontsize{32}{20}\selectfont}
\titleformat*{\subsubsection}{\sectionfont\fontsize{32}{12}\selectfont}
\titleformat{\subsection}
{\sectionfont\Large\bfseries}
{\thesection}
{1em}
{\resizetitle}
% url & hyperlink formatting
%\DeclareUrlCommand\url{}
% urls as footnotes
\renewcommand{\href}[2]{#2\footnote{. #2 \url{#1}}}
%\setfnsymbol{lamport}