Use document title and document date in lyx fancyheader

โ€”

by

in

Put this in your Lyx preamble (document -> settings -> preamble):


\def\title#1{\gdef\@title{#1}\gdef\THETITLE{#1}}
\def\date#1{\gdef\@date{#1}\gdef\THEDATE{#1}}
\def\author#1{\gdef\@author{#1}\gdef\THEAUTHOR{#1}}

\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand{\helv}{%
\fontfamily{phv}\fontseries{b}\fontsize{10}{10}\selectfont}
\lhead{\helv \THETITLE - \THEDATE }
\rhead{\helv \THEAUTHOR}

\usepackage{lastpage}
\cfoot{\thepage\ / \pageref{LastPage}}