Received: via tmail-4.1(11) (invoked by user schoepf) for schoepf; Wed, 19 Jan 2000 04:56:56 +0100 (MET) Received: from mailgate2.zdv.Uni-Mainz.DE (mailgate2.zdv.Uni-Mainz.DE [134.93.8.57]) by mailserver1.zdv.Uni-Mainz.DE (8.9.3+Sun/8.9.1) with ESMTP id EAA14942 for ; Wed, 19 Jan 2000 04:56:56 +0100 (MET) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF6231.3A423400" Received: from mail.listserv.gmd.de (mail.listserv.gmd.de [192.88.97.5]) by mailgate2.zdv.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id EAA04215 for ; Wed, 19 Jan 2000 04:56:55 +0100 (MET) Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <4.05BE6B46@mail.listserv.gmd.de>; Wed, 19 Jan 2000 4:56:34 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 447893 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Wed, 19 Jan 2000 04:55:27 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id EAA07883 for ; Wed, 19 Jan 2000 04:54:57 +0100 (MET) Received: from downtown.oche.de (downtown.oche.de [194.94.253.3]) by relay.uni-heidelberg.de (8.9.3+Sun/8.9.1) with ESMTP id EAA20656 for ; Wed, 19 Jan 2000 04:54:52 +0100 (MET) Received: from corona.oche.de (uucp@localhost) by downtown.oche.de (8.9.3/8.9.3/Debian/GNU) with UUCP id EAA16941 for urz.uni-heidelberg.de!latex-l; Wed, 19 Jan 2000 04:50:00 +0100 Received: by corona.oche.de (wUUCP 1.10) id <1kmh@corona.oche.de>; Tue, 18 Jan 00 21:13:23 CET Return-Path: X-Mailer: AmiGate 1.6 (13.11.95) x-vm-v5-data: ([nil nil nil nil nil nil nil nil nil]["8267" "Tue" "18" "January" "2000" "21:05:27" "CET" "Achim Blumensath" "blume@CORONA.OCHE.DE" nil "295" "Headings templates" "^Date:" nil nil "1" nil nil nil nil nil]nil) Content-class: urn:content-classes:message Subject: Headings templates Date: Tue, 18 Jan 2000 22:05:27 +0100 Message-ID: <30001f56@corona.oche.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Achim Blumensath" Sender: "Mailing list for the LaTeX3 project" To: "Multiple recipients of list LATEX-L" Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 3502 This is a multi-part message in MIME format. ------_=_NextPart_001_01BF6231.3A423400 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I wrote some templates for head- and footlines. The code is taken mainly from the fancyhdr package. Achim ________________________________________________________________________ _ | \_____/ = | // Achim Blumensath | \ _ \O/ \___/\ = | // blume@corona.oche.de |-< /_\ =3Do=3D \ = /\ \| \X/ (p^2 - m^2)\psi =3D 0 |_/ \_ /"\ = o----| ____________________________________________________________________\___|= % \iffalse %% %% (C) Copyright 1999 Achim Blumensath %% All rights reserved. %% %% Not for general distribution. In its present form it is not allowed %% to put this package onto CD or an archive without consulting the %% the authors. %% %<*dtx> \ProvidesFile{xhdr.dtx} % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{xhdr} %\ProvidesFile{xhdr.drv} % \fi % \ProvidesFile{xhdr.dtx} [2000/01/16 v0.1 header styles] % % \iffalse %<*driver> \documentclass{ltxdoc} \usepackage{textcomp} % \usepackage{xparse,xlists,xlists-samples} % \usepackage{ldcdoc} % next three definitions are big hacks to run the file % without the above packages % \newcommand\NoValue{\texttt{\textbackslash NoValue}} \newenvironment{TemplateInterfaceDescription}[1] {\subsection{The Template Type `#1'}% \begingroup\description \def\TemplateArgument##1##2{\item[Arg: ##1]##2\par}% \def\TemplateSemantics{\enddescription\endgroup \subsubsection*{Semantics:}}% } {\par\bigskip} \newenvironment{TemplateDescription}[2] {\subsection{The Template `#2' (type #1)}% \subsubsection*{Attributes:}% \begingroup\description \def\TemplateKey##1##2##3##4{\item[##1 (##2)]##3% \ifx\TemplateKey##4\TemplateKey\else % \hskip0ptplus3em\penalty-500\hskip 0pt plus 1filll = Default:~##4% \hfill\penalty500\hbox{}\hfill Default:~##4% \nobreak\hskip-\parfillskip\hskip0pt\relax \fi \par}% \def\TemplateSemantics{\enddescription\endgroup \subsubsection*{Semantics \& Comments:}}% } {\par\bigskip} \begin{document} \DocInput{xhdr.dtx} \end{document} % % \fi % % % \GetFileInfo{xhdr.dtx} % % \title{The \textsf{xhdr} package\thanks{This file % has version number \fileversion, last % revised \filedate.}} % \author{AB} % \date{\filedate} % % \maketitle % % \tableofcontents % % \begin{abstract} % Package for head- and footline styles derived from the % \textsf{fancyhdr} package. % \end{abstract} % % \section{Interfaces} % % \begin{TemplateInterfaceDescription}{header} % % \TemplateArgument{1} % {Page number (\texttt{\textbackslash thepage})} % % \TemplateArgument{2} % {Left mark (\texttt{\textbackslash leftmark})} % % \TemplateArgument{3} % {Right mark (\texttt{\textbackslash rightmark})} % % \TemplateSemantics % % This template typesets a head- or footline. % % \end{TemplateInterfaceDescription} % % % \begin{TemplateDescription}{header}{std} % % \TemplateKey{pre-action}{f0} % {Action to perform before the header, e.g., \texttt{\textbackslash = hss}.} % {empty} % \TemplateKey{post-action}{f0} % {Action to perform after the header, e.g., \texttt{\textbackslash = hss}.} % {empty} % \TemplateKey{left-text}{f3} % {Text to appear at the left of the header. The arguments are the % same as the templates arguments.} % {empty} % \TemplateKey{center-text}{f3} % {Text to appear at the center of the header. The arguments are the % same as the templates arguments.} % {empty} % \TemplateKey{right-text}{f3} % {Text to appear at the right of the header. The arguments are the % same as the templates arguments.} % {empty} % \TemplateKey{valign}{f0} % {\texttt{b} for headlines, \texttt{t} for footlines.} % {\texttt{b}} % \TemplateKey{width}{l} % {Width of the header.} % {\texttt{\textbackslash textwidth}} % \TemplateKey{above-skip}{l} % {Skip above the header. Should be 0 for headlines.} % {0.3\texttt{\textbackslash normalbaselineskip}} % \TemplateKey{above-rule}{l} % {Height of the rule above the header.} % {0pt} % \TemplateKey{below-rule}{l} % {Height of the rule below the header.} % {0pt} % % \TemplateSemantics % This implements the \textsf{fancyhdr} layout. Separate instances for % even/odd and head-/footlines are required. % % \end{TemplateDescription} % % \DescribeMacro\setheader % The \verb|\setheader| command determines which headers should be used. % The arguments are the names of instances for odd head, odd foot, % even head, and even foot headers. % % \section{Implementation} % % \begin{macrocode} %<*package> \RequirePackage{xparse} \RequirePackage{template} \IgnoreWhiteSpace % \end{macrocode} % % \begin{macrocode} \DeclareTemplateType{header}{3} \newdimen\HL@width \newdimen\HL@aboverule \newdimen\HL@belowrule \newskip\HL@aboveskip \DeclareTemplate{header}{std}{3} { pre-action =3Df0 [] \HL@preaction, post-action =3Df0 [] \HL@postaction, left-text =3Df3 [] \HL@left, center-text =3Df3 [] \HL@center, right-text =3Df3 [] \HL@right, valign =3Df0 [b] \HL@align, width =3Dl [\DelayEvaluation{\textwidth}] \HL@width, above-skip =3Dl [\DelayEvaluation{0.3\normalbaselineskip}] \HL@aboveskip, above-rule =3Dl [0pt] \HL@aboverule, below-rule =3Dl [0pt] \HL@belowrule } { \DoParameterAssignments \HL@preaction \hbox to\HL@width{ \@normalsize \vbox{ \vskip-\HL@aboveskip \vskip-\HL@aboverule \hrule\@width\HL@width\@height\HL@aboverule \vskip\HL@aboveskip \hbox{ \rlap{\parbox[\HL@align]{\HL@width} {\raggedright\HL@left{#1}{#2}{#3}\strut}}\hfill \parbox[\HL@align]{\HL@width} {\centering\HL@center{#1}{#2}{#3}\strut}\hfill \llap{\parbox[\HL@align]{\HL@width} {\raggedleft\HL@right{#1}{#2}{#3}\strut}} } \hrule\@width\HL@width\@height\HL@belowrule \vskip-\HL@belowrule } } \HL@postaction } % \end{macrocode} % Two sample styles. % \begin{macrocode} \DeclareInstance{header}{head-plain}{std} { above-skip =3D 0pt, pre-action =3D {\if@reversemargin\hss\else\relax\fi}, post-action =3D {\if@reversemargin\relax\else\hss\fi} } \DeclareInstance{header}{foot-plain}{std} { center-text =3D {#1}, valign =3D t, pre-action =3D {\if@reversemargin\hss\else\relax\fi}, post-action =3D {\if@reversemargin\relax\else\hss\fi} } \DeclareInstance{header}{head-headings-odd}{std} { left-text =3D {\small\textsl{#2}}, right-text =3D {#1}, above-skip =3D 0pt, below-rule =3D 0.4pt, pre-action =3D {\if@reversemargin\hss\else\relax\fi}, post-action =3D {\if@reversemargin\relax\else\hss\fi} } \DeclareInstance{header}{head-headings-even}{std} { left-text =3D {#1}, right-text =3D {\small\textsl{#3}}, above-skip =3D 0pt, below-rule =3D 0.4pt, pre-action =3D {\if@reversemargin\relax\else\hss\fi}, post-action =3D {\if@reversemargin\hss\else\relax\fi} } \DeclareInstance{header}{foot-headings-odd}{std} { valign =3D t, pre-action =3D {\if@reversemargin\hss\else\relax\fi}, post-action =3D {\if@reversemargin\relax\else\hss\fi} } \DeclareInstance{header}{foot-headings-even}{std} { valign =3D t, pre-action =3D {\if@reversemargin\relax\else\hss\fi}, post-action =3D {\if@reversemargin\hss\else\relax\fi} } % \end{macrocode} % % \texttt{\textbackslash setheader} determines which instances are used. % The arguments consist of instace names for odd head, odd foot, even % head, and even foot. % \begin{macrocode} \DeclareDocumentCommand{\setheader}{mmmm} { \def\@oddhead{ \UseInstance{header}{#1}{\thepage}{\leftmark}{\rightmark}} \def\@oddfoot{ \UseInstance{header}{#2}{\thepage}{\leftmark}{\rightmark}} \def\@evenhead{ \UseInstance{header}{#3}{\thepage}{\leftmark}{\rightmark}} \def\@evenfoot{ \UseInstance{header}{#4}{\thepage}{\leftmark}{\rightmark}} } % \end{macrocode} % % \begin{macrocode} \endinput % \end{macrocode} % % \begin{macrocode} % % \end{macrocode} % % % \Finale % \endinput ------_=_NextPart_001_01BF6231.3A423400 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Headings templates

Hello,

I wrote some templates for head- and footlines. The = code is taken
mainly from the fancyhdr package.

Achim
________________________________________________________________= ________
          &nbs= p;            = ;         = _            =             &= nbsp;    | \_____/ |
    //  Achim = Blumensath       | \  = _            =             \O/ = \___/\ |
   //   = blume@corona.oche.de   |-< = /_\           &nbs= p;           = =3Do=3D  \ /\ \|
 \X/    (p^2 - m^2)\psi =3D = 0    |_/ = \_            = ;            = /"\   o----|
________________________________________________________________= ____\___|

% \iffalse
%%
%% (C) Copyright 1999 Achim Blumensath
%% All rights reserved.
%%
%% Not for general distribution. In its present form = it is not allowed
%% to put this package onto CD or an archive without = consulting the
%% the authors.
%%
%<*dtx>
          = \ProvidesFile{xhdr.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xhdr}
%<driver>\ProvidesFile{xhdr.drv}
% \fi
%         = \ProvidesFile{xhdr.dtx}
          = [2000/01/16 v0.1 header styles]
%
% \iffalse
%<*driver>
 \documentclass{ltxdoc}
 \usepackage{textcomp}

% \usepackage{xparse,xlists,xlists-samples}
% \usepackage{ldcdoc}

% next three definitions are big hacks to run the = file
% without the above packages
%
\newcommand\NoValue{\texttt{\textbackslash = NoValue}}

\newenvironment{TemplateInterfaceDescription}[1]
  {\subsection{The Template Type `#1'}%
   \begingroup\description
   \def\TemplateArgument##1##2{\item[Arg: = ##1]##2\par}%
   = \def\TemplateSemantics{\enddescription\endgroup
       = \subsubsection*{Semantics:}}%
  }
  {\par\bigskip}

\newenvironment{TemplateDescription}[2]
  {\subsection{The Template `#2' (type = #1)}%
   \subsubsection*{Attributes:}%
   \begingroup\description
   \def\TemplateKey##1##2##3##4{\item[##1 = (##2)]##3%
     = \ifx\TemplateKey##4\TemplateKey\else
%         = \hskip0ptplus3em\penalty-500\hskip 0pt plus 1filll Default:~##4%
         = \hfill\penalty500\hbox{}\hfill Default:~##4%
         = \nobreak\hskip-\parfillskip\hskip0pt\relax
     \fi
     \par}%
   = \def\TemplateSemantics{\enddescription\endgroup
       = \subsubsection*{Semantics \& Comments:}}%
  }
  {\par\bigskip}

 \begin{document}
 \DocInput{xhdr.dtx}
 \end{document}
%</driver>
% \fi
%
%
% \GetFileInfo{xhdr.dtx}
%
% \title{The \textsf{xhdr} package\thanks{This = file
%         has = version number \fileversion, last
%         = revised \filedate.}}
% \author{AB}
% \date{\filedate}
%
%  \maketitle
%
% \tableofcontents
%
% \begin{abstract}
%   Package for head- and footline styles = derived from the
%   \textsf{fancyhdr} package.
% \end{abstract}
%
% \section{Interfaces}
%
% \begin{TemplateInterfaceDescription}{header}
%
%   \TemplateArgument{1}
%       {Page number = (\texttt{\textbackslash thepage})}
%
%   \TemplateArgument{2}
%       {Left mark = (\texttt{\textbackslash leftmark})}
%
%   \TemplateArgument{3}
%       {Right mark = (\texttt{\textbackslash rightmark})}
%
%   \TemplateSemantics
%
%   This template typesets a head- or = footline.
%
% \end{TemplateInterfaceDescription}
%
%
% \begin{TemplateDescription}{header}{std}
%
%   \TemplateKey{pre-action}{f0}
%     {Action to perform before = the header, e.g., \texttt{\textbackslash hss}.}
%     {empty}
%   \TemplateKey{post-action}{f0}
%     {Action to perform after = the header, e.g., \texttt{\textbackslash hss}.}
%     {empty}
%   \TemplateKey{left-text}{f3}
%     {Text to appear at the left = of the header. The arguments are the
%      same as the templates = arguments.}
%     {empty}
%   \TemplateKey{center-text}{f3}
%     {Text to appear at the = center of the header. The arguments are the
%      same as the templates = arguments.}
%     {empty}
%   \TemplateKey{right-text}{f3}
%     {Text to appear at the = right of the header. The arguments are the
%      same as the templates = arguments.}
%     {empty}
%   \TemplateKey{valign}{f0}
%     {\texttt{b} for headlines, = \texttt{t} for footlines.}
%     {\texttt{b}}
%   \TemplateKey{width}{l}
%     {Width of the = header.}
%     {\texttt{\textbackslash = textwidth}}
%   \TemplateKey{above-skip}{l}
%     {Skip above the header. = Should be 0 for headlines.}
%     {0.3\texttt{\textbackslash = normalbaselineskip}}
%   \TemplateKey{above-rule}{l}
%     {Height of the rule above = the header.}
%     {0pt}
%   \TemplateKey{below-rule}{l}
%     {Height of the rule below = the header.}
%     {0pt}
%
%   \TemplateSemantics
%   This implements the \textsf{fancyhdr} = layout. Separate instances for
%   even/odd and head-/footlines are = required.
%
% \end{TemplateDescription}
%
% \DescribeMacro\setheader
% The \verb|\setheader| command determines which = headers should be used.
% The arguments are the names of instances for odd = head, odd foot,
% even head, and even foot headers.
%
% \section{Implementation}
%
%    \begin{macrocode}
%<*package>
\RequirePackage{xparse}
\RequirePackage{template}

\IgnoreWhiteSpace
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareTemplateType{header}{3}

\newdimen\HL@width
\newdimen\HL@aboverule
\newdimen\HL@belowrule
\newskip\HL@aboveskip

\DeclareTemplate{header}{std}{3}
{
  pre-action  =3Df0 []    = \HL@preaction,
  post-action =3Df0 []    = \HL@postaction,
  left-text   =3Df3 = []    \HL@left,
  center-text =3Df3 []    = \HL@center,
  right-text  =3Df3 []    = \HL@right,
  valign      =3Df0 = [b]   \HL@align,
  width       = =3Dl  [\DelayEvaluation{\textwidth}]
          &nbs= p;            = ; \HL@width,
  above-skip  =3Dl  = [\DelayEvaluation{0.3\normalbaselineskip}]
          &nbs= p;            = ; \HL@aboveskip,
  above-rule  =3Dl  [0pt] = \HL@aboverule,
  below-rule  =3Dl  [0pt] = \HL@belowrule
}
{
  \DoParameterAssignments
  \HL@preaction
  \hbox to\HL@width{
    \@normalsize
    \vbox{
      = \vskip-\HL@aboveskip
      = \vskip-\HL@aboverule
      = \hrule\@width\HL@width\@height\HL@aboverule
      = \vskip\HL@aboveskip
      \hbox{
        = \rlap{\parbox[\HL@align]{\HL@width}
          &nbs= p;     = {\raggedright\HL@left{#1}{#2}{#3}\strut}}\hfill
        = \parbox[\HL@align]{\HL@width}
          &nbs= p;     = {\centering\HL@center{#1}{#2}{#3}\strut}\hfill
        = \llap{\parbox[\HL@align]{\HL@width}
          &nbs= p;     = {\raggedleft\HL@right{#1}{#2}{#3}\strut}}
      }
      = \hrule\@width\HL@width\@height\HL@belowrule
      = \vskip-\HL@belowrule
    }
  }
  \HL@postaction
}
%    \end{macrocode}
% Two sample styles.
%    \begin{macrocode}
\DeclareInstance{header}{head-plain}{std}
{
  above-skip  =3D 0pt,
  pre-action  =3D = {\if@reversemargin\hss\else\relax\fi},
  post-action =3D = {\if@reversemargin\relax\else\hss\fi}
}
\DeclareInstance{header}{foot-plain}{std}
{
  center-text =3D {#1},
  valign      =3D = t,
  pre-action  =3D = {\if@reversemargin\hss\else\relax\fi},
  post-action =3D = {\if@reversemargin\relax\else\hss\fi}
}
\DeclareInstance{header}{head-headings-odd}{std}
{
  left-text   =3D = {\small\textsl{#2}},
  right-text  =3D {#1},
  above-skip  =3D 0pt,
  below-rule  =3D 0.4pt,
  pre-action  =3D = {\if@reversemargin\hss\else\relax\fi},
  post-action =3D = {\if@reversemargin\relax\else\hss\fi}
}
\DeclareInstance{header}{head-headings-even}{std}
{
  left-text   =3D {#1},
  right-text  =3D = {\small\textsl{#3}},
  above-skip  =3D 0pt,
  below-rule  =3D 0.4pt,
  pre-action  =3D = {\if@reversemargin\relax\else\hss\fi},
  post-action =3D = {\if@reversemargin\hss\else\relax\fi}
}
\DeclareInstance{header}{foot-headings-odd}{std}
{
  valign      =3D = t,
  pre-action  =3D = {\if@reversemargin\hss\else\relax\fi},
  post-action =3D = {\if@reversemargin\relax\else\hss\fi}
}
\DeclareInstance{header}{foot-headings-even}{std}
{
  valign      =3D = t,
  pre-action  =3D = {\if@reversemargin\relax\else\hss\fi},
  post-action =3D = {\if@reversemargin\hss\else\relax\fi}
}
%    \end{macrocode}
%
% \texttt{\textbackslash setheader} determines which = instances are used.
% The arguments consist of instace names for odd = head, odd foot, even
% head, and even foot.
%    \begin{macrocode}
\DeclareDocumentCommand{\setheader}{mmmm}
{
  \def\@oddhead{
    = \UseInstance{header}{#1}{\thepage}{\leftmark}{\rightmark}}
  \def\@oddfoot{
    = \UseInstance{header}{#2}{\thepage}{\leftmark}{\rightmark}}
  \def\@evenhead{
    = \UseInstance{header}{#3}{\thepage}{\leftmark}{\rightmark}}
  \def\@evenfoot{
    = \UseInstance{header}{#4}{\thepage}{\leftmark}{\rightmark}}
}
%    \end{macrocode}
%
%    \begin{macrocode}
\endinput
%    \end{macrocode}
%
%    \begin{macrocode}
%</package>
%    \end{macrocode}
%
%
% \Finale
%
\endinput

------_=_NextPart_001_01BF6231.3A423400--