\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead[\rightmark]{}
+\lfoot[\thepage]{\input{revid.inc}}
+\rfoot[\input{revid.inc}]{\thepage}
\let\stdsection\section
\renewcommand\section{\newpage\stdsection}
\newcommand{\py}{\pay{P}}
\newcommand{\pn}{\pan{P}}
+\newcommand{\pl}{\pa{L}}
+\newcommand{\ply}{\pay{L}}
+\newcommand{\pln}{\pan{L}}
+
\newcommand{\pq}{\pa{Q}}
\newcommand{\pqy}{\pay{Q}}
\newcommand{\pqn}{\pan{Q}}