diff options
Diffstat (limited to 'ue4/protokoll/fancyheadings.sty')
| -rw-r--r-- | ue4/protokoll/fancyheadings.sty | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/ue4/protokoll/fancyheadings.sty b/ue4/protokoll/fancyheadings.sty new file mode 100644 index 0000000..c1e706e --- /dev/null +++ b/ue4/protokoll/fancyheadings.sty | |||
| @@ -0,0 +1,166 @@ | |||
| 1 | % fancyheadings.sty version 1.94 | ||
| 2 | % Fancy headers and footers. | ||
| 3 | % Piet van Oostrum, Dept of Computer Science, University of Utrecht | ||
| 4 | % Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands | ||
| 5 | % Telephone: +31 30 2531806. Email: piet@cs.ruu.nl | ||
| 6 | % Sep 16, 1994 | ||
| 7 | % version 1.4: Correction for use with \reversemargin | ||
| 8 | % Sep 29, 1994: | ||
| 9 | % version 1.5: Added the \iftopfloat, \ifbotfloat and \iffloatpage commands | ||
| 10 | % Oct 4, 1994: | ||
| 11 | % version 1.6: Reset single spacing in headers/footers for use with | ||
| 12 | % setspace.sty or doublespace.sty | ||
| 13 | % Oct 4, 1994: | ||
| 14 | % version 1.7: changed \let\@mkboth\markboth to | ||
| 15 | % \def\@mkboth{\protect\markboth} to make it more robust | ||
| 16 | % Dec 5, 1994: | ||
| 17 | % version 1.8: corrections for amsbook/amsart: define \@chapapp and (more | ||
| 18 | % importantly) use the \chapter/sectionmark definitions from ps@headings if | ||
| 19 | % they exist (which should be true for all standard classes). | ||
| 20 | % May 31, 1995: | ||
| 21 | % version 1.9: The proposed \renewcommand{\headrulewidth}{\iffloatpage... | ||
| 22 | % construction in the doc did not work properly with the fancyplain style. | ||
| 23 | % June 1, 1995: | ||
| 24 | % version 1.91: The definition of \@mkboth wasn't restored on subsequent | ||
| 25 | % \pagestyle{fancy}'s. | ||
| 26 | % June 1, 1995: | ||
| 27 | % version 1.92: The sequence \pagestyle{fancyplain} \pagestyle{plain} | ||
| 28 | % \pagestyle{fancy} would erroneously select the plain version. | ||
| 29 | % June 1, 1995: | ||
| 30 | % version 1.93: \fancypagestyle command added. | ||
| 31 | % Dec 11, 1995: | ||
| 32 | % version 1.94: suggested by Conrad Hughes <chughes@maths.tcd.ie> | ||
| 33 | % CJCH, Dec 11, 1995: added \footruleskip to allow control over footrule | ||
| 34 | % position (old hardcoded value of .3\normalbaselineskip is far too high | ||
| 35 | % when used with very small footer fonts). | ||
| 36 | % Jan 31, 1996: | ||
| 37 | % version 1.95: call \@normalsize in the reset code if that is defined, | ||
| 38 | % otherwise \normalsize. | ||
| 39 | % this is to solve a problem with ucthesis.cls, as this doesn't | ||
| 40 | % define \@currsize. Unfortunately for latex209 calling \normalsize doesn't | ||
| 41 | % work as this is optimized to do very little, so there \@normalsize should | ||
| 42 | % be called. Hopefully this code works for all versions of LaTeX known to | ||
| 43 | % mankind. | ||
| 44 | |||
| 45 | \let\fancy@def\gdef | ||
| 46 | \def\lhead{\@ifnextchar[{\@xlhead}{\@ylhead}} | ||
| 47 | \def\@xlhead[#1]#2{\fancy@def\@elhead{#1}\fancy@def\@olhead{#2}} | ||
| 48 | \def\@ylhead#1{\fancy@def\@elhead{#1}\fancy@def\@olhead{#1}} | ||
| 49 | |||
| 50 | \def\chead{\@ifnextchar[{\@xchead}{\@ychead}} | ||
| 51 | \def\@xchead[#1]#2{\fancy@def\@echead{#1}\fancy@def\@ochead{#2}} | ||
| 52 | \def\@ychead#1{\fancy@def\@echead{#1}\fancy@def\@ochead{#1}} | ||
| 53 | |||
| 54 | \def\rhead{\@ifnextchar[{\@xrhead}{\@yrhead}} | ||
| 55 | \def\@xrhead[#1]#2{\fancy@def\@erhead{#1}\fancy@def\@orhead{#2}} | ||
| 56 | \def\@yrhead#1{\fancy@def\@erhead{#1}\fancy@def\@orhead{#1}} | ||
| 57 | |||
| 58 | \def\lfoot{\@ifnextchar[{\@xlfoot}{\@ylfoot}} | ||
| 59 | \def\@xlfoot[#1]#2{\fancy@def\@elfoot{#1}\fancy@def\@olfoot{#2}} | ||
| 60 | \def\@ylfoot#1{\fancy@def\@elfoot{#1}\fancy@def\@olfoot{#1}} | ||
| 61 | |||
| 62 | \def\cfoot{\@ifnextchar[{\@xcfoot}{\@ycfoot}} | ||
| 63 | \def\@xcfoot[#1]#2{\fancy@def\@ecfoot{#1}\fancy@def\@ocfoot{#2}} | ||
| 64 | \def\@ycfoot#1{\fancy@def\@ecfoot{#1}\fancy@def\@ocfoot{#1}} | ||
| 65 | |||
| 66 | \def\rfoot{\@ifnextchar[{\@xrfoot}{\@yrfoot}} | ||
| 67 | \def\@xrfoot[#1]#2{\fancy@def\@erfoot{#1}\fancy@def\@orfoot{#2}} | ||
| 68 | \def\@yrfoot#1{\fancy@def\@erfoot{#1}\fancy@def\@orfoot{#1}} | ||
| 69 | |||
| 70 | \newdimen\headrulewidth | ||
| 71 | \newdimen\footrulewidth | ||
| 72 | \newdimen\plainheadrulewidth | ||
| 73 | \newdimen\plainfootrulewidth | ||
| 74 | \newdimen\headwidth | ||
| 75 | \newdimen\footruleskip | ||
| 76 | \newif\if@fancyplain \@fancyplainfalse | ||
| 77 | \def\fancyplain#1#2{\if@fancyplain#1\else#2\fi} | ||
| 78 | |||
| 79 | % Command to reset various things in the headers: | ||
| 80 | % a.o. single spacing (taken from setspace.sty) | ||
| 81 | % and the catcode of ^^M (so that epsf files in the header work if a | ||
| 82 | % verbatim crosses a page boundary) | ||
| 83 | \def\fancy@reset{\restorecr | ||
| 84 | \def\baselinestretch{1}% | ||
| 85 | \ifx\undefined\@newbaseline% NFSS not present; 2.09 or 2e | ||
| 86 | \ifx\@normalsize\undefined \normalsize % for ucthesis.cls | ||
| 87 | \else \@normalsize \fi | ||
| 88 | \else% NFSS (2.09) present | ||
| 89 | \@newbaseline% | ||
| 90 | \fi} | ||
| 91 | |||
| 92 | % Initialization of the head and foot text. | ||
| 93 | |||
| 94 | \headrulewidth 0.4pt | ||
| 95 | \footrulewidth\z@ | ||
| 96 | \plainheadrulewidth\z@ | ||
| 97 | \plainfootrulewidth\z@ | ||
| 98 | \footruleskip .3\normalbaselineskip | ||
| 99 | |||
| 100 | \lhead[\fancyplain{}{\sl\rightmark}]{\fancyplain{}{\sl\leftmark}} | ||
| 101 | % i.e. empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages | ||
| 102 | \chead{} | ||
| 103 | \rhead[\fancyplain{}{\sl\leftmark}]{\fancyplain{}{\sl\rightmark}} | ||
| 104 | % i.e. empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages | ||
| 105 | \lfoot{} | ||
| 106 | \cfoot{\rm\thepage} % page number | ||
| 107 | \rfoot{} | ||
| 108 | |||
| 109 | % Put together a header or footer given the left, center and | ||
| 110 | % right text, fillers at left and right and a rule. | ||
| 111 | % The \lap commands put the text into an hbox of zero size, | ||
| 112 | % so overlapping text does not generate an errormessage. | ||
| 113 | |||
| 114 | \def\@fancyhead#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\hbox | ||
| 115 | {\rlap{\parbox[b]{\headwidth}{\raggedright#2\strut}}\hfill | ||
| 116 | \parbox[b]{\headwidth}{\centering#3\strut}\hfill | ||
| 117 | \llap{\parbox[b]{\headwidth}{\raggedleft#4\strut}}}\headrule}}#5} | ||
| 118 | |||
| 119 | |||
| 120 | \def\@fancyfoot#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\footrule | ||
| 121 | \hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2\strut}}\hfill | ||
| 122 | \parbox[t]{\headwidth}{\centering#3\strut}\hfill | ||
| 123 | \llap{\parbox[t]{\headwidth}{\raggedleft#4\strut}}}}}#5} | ||
| 124 | |||
| 125 | \def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi | ||
| 126 | \hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}} | ||
| 127 | |||
| 128 | \def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi | ||
| 129 | \vskip-\footruleskip\vskip-\footrulewidth | ||
| 130 | \hrule\@width\headwidth\@height\footrulewidth\vskip\footruleskip}} | ||
| 131 | |||
| 132 | \def\ps@fancy{% | ||
| 133 | \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook | ||
| 134 | \@ifundefined{chapter}{\def\sectionmark##1{\markboth | ||
| 135 | {\uppercase{\ifnum \c@secnumdepth>\z@ | ||
| 136 | \thesection\hskip 1em\relax \fi ##1}}{}}% | ||
| 137 | \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne | ||
| 138 | \thesubsection\hskip 1em\relax \fi ##1}}}% | ||
| 139 | {\def\chaptermark##1{\markboth {\uppercase{\ifnum \c@secnumdepth>\m@ne | ||
| 140 | \@chapapp\ \thechapter. \ \fi ##1}}{}} | ||
| 141 | \def\sectionmark##1{\markright{\uppercase{\ifnum \c@secnumdepth >\z@ | ||
| 142 | \thesection. \ \fi ##1}}}}% | ||
| 143 | \csname ps@headings\endcsname % use \ps@headings defaults if they exist | ||
| 144 | \ps@@fancy | ||
| 145 | \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}% | ||
| 146 | \headwidth\textwidth} | ||
| 147 | \def\ps@fancyplain{\ps@fancy \let\ps@plain\ps@plain@fancy} | ||
| 148 | \def\ps@plain@fancy{\@fancyplaintrue\ps@@fancy} | ||
| 149 | \def\ps@@fancy{% | ||
| 150 | \def\@mkboth{\protect\markboth}% | ||
| 151 | \def\@oddhead{\@fancyhead\@lodd\@olhead\@ochead\@orhead\@rodd}% | ||
| 152 | \def\@oddfoot{\@fancyfoot\@lodd\@olfoot\@ocfoot\@orfoot\@rodd}% | ||
| 153 | \def\@evenhead{\@fancyhead\@rodd\@elhead\@echead\@erhead\@lodd}% | ||
| 154 | \def\@evenfoot{\@fancyfoot\@rodd\@elfoot\@ecfoot\@erfoot\@lodd}% | ||
| 155 | } | ||
| 156 | \def\@lodd{\if@reversemargin\hss\else\relax\fi} | ||
| 157 | \def\@rodd{\if@reversemargin\relax\else\hss\fi} | ||
| 158 | |||
| 159 | \let\latex@makecol\@makecol | ||
| 160 | \def\@makecol{\let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol} | ||
| 161 | \def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi} | ||
| 162 | \def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi} | ||
| 163 | \def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi} | ||
| 164 | |||
| 165 | \newcommand{\fancypagestyle}[2]{% | ||
| 166 | \@namedef{ps@#1}{\let\fancy@def\def#2\relax\ps@fancy}} | ||
