From b55c36a6814223c4aca32ed3b53c017bd0741e3a Mon Sep 17 00:00:00 2001 From: nik gaffney Date: Tue, 2 Jun 2015 14:48:22 +0200 Subject: [PATCH] change from fancyhdr to titleps --- pandoc/header.tex | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/pandoc/header.tex b/pandoc/header.tex index 8e51eb6..cc87e60 100644 --- a/pandoc/header.tex +++ b/pandoc/header.tex @@ -1,6 +1,5 @@ -\usepackage{fancyhdr} \usepackage{fontspec} -\usepackage{titlesec} +\usepackage[pagestyles]{titlesec} \usepackage{graphicx} \usepackage{datetime} @@ -36,11 +35,28 @@ %\newfontfamily\sectionfont{Roboto Light} \newfontfamily\sectionfont{Encode Sans ExtraLight} -\pagestyle{fancy} -\fancyhf{} -\rhead{\sectionfont\small$title-meta$\selectfont} +%\pagestyle{fancy} +%\fancyhf{} +%\rhead{\sectionfont\small$title-meta$\selectfont} %\lhead{Quattrocento Sans / Encode Sans ExtraLight} -\rfoot{\sectionfont\small{printed: \isodate{\today} \currenttime \selectfont}} +%\rfoot{\sectionfont\small{printed: \isodate{\today} \currenttime \selectfont}} + +% convert header to titleps - http://www.tex-tipografia.com/titleps_fancyhdr.html +\newpagestyle{main}[\small]{ + \setheadrule{.55pt}% + \sethead[\colorbox{black}{\color{white}{\thepage}}]% even-left + [\chaptertitle]% even-center + [\colorbox{CornflowerBlue}{\thesection}]% even-right + {\colorbox{CornflowerBlue}{\thesection}}% odd-left + {\sectiontitle}% odd-center + {\colorbox{black}{\color{white}{\thepage}}}% odd-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}