diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/fancyhdr/README | 49 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf | bin | 312991 -> 378142 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex | 285 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty | 56 |
5 files changed, 198 insertions, 206 deletions
diff --git a/Master/texmf-dist/doc/latex/fancyhdr/README b/Master/texmf-dist/doc/latex/fancyhdr/README index f0371cf8943..8ce4276df34 100644 --- a/Master/texmf-dist/doc/latex/fancyhdr/README +++ b/Master/texmf-dist/doc/latex/fancyhdr/README @@ -1,31 +1,32 @@ -This is fancyhdr, a replacement for fancyheadings. +fancyhdr – Extensive control of page headers and footers in LaTeX2ε -I still still intend to make sometime in the future a real .dtx of it, -including the minimal documentation. The current documentation is in -fancyhdr.tex, but this contains much more material than the fancyhdr doc. -When the fancyhdr.dtx is ready, I will rename fancyhdr.tex into something -like pagelayout.tex to get it more in line with the title (Page Layout in -LaTeX). +The package provides extensive facilities, both for constructing headers and footers, and for controlling their use (for example, at times when LaTeX would automatically change the heading style in use). -fancyhdr is 99% compatible with fancyheadings. The only incompatibility is -that \headrulewidth and \footrulewidth and their \plain... versions are no -longer length parameters, but normal macros (to be changed with -\renewcommand rather than \setlength). +The package consists of the following files: -Although all the other old fancyheadings commands continue to work you are -advised to use the new syntax as described in fancyhdr.tex, because this is -much easier to use in complicated cases. The old way of doing is no longer -described in the manual, except for the simplest use of \lhead etc. +README This file +fancyhdr.sty the LaTeX package +fancyhdr.tex extensive documentation file +fancyhdr.pdf PDF of the above +fancyheadings.sty this loads fancyhdr with a warning message +extramarks.sty a package for additional marks -In order to latex the documentation you need to install a copy of -tex-archive/macros/latex/contrib/other/misc/boxedminipage.sty +Fancyhdr is a replacement for the old LaTeX2 package fancyheadings. That +one should not be used anymore. The package fancyheadings included here +just loads fancyhdr with a warning message. -The fixmarks.sty is now obsolete, as it is superseded by David Carlisle's -fix2col.sty (tex-archive/macros/latex/contrib/supported/carlisle/) so it is -no longer included here. +The documentation (fancyhdr.tex/fancyhdr.pdf) describes both +fancyhdr.sty and extramarks.sty. +In order to latex the documentation you need to have a copy of +boxedminipage.sty (CTAN:/macros/latex/contrib/boxedminipage) installed. -fancyhdr.sty version 3 and extramarks.sty version 2 are the packages -as described in the second edition of The LaTeX Companion. +There used to be a package fixmarks.sty, but that is obsolete. It fixed +a problem in LaTeX, but that is now solved in the LaTeX2ε system itself. +So it is no longer included. + +fancyhdr.sty version 3 and extramarks.sty version 2 are the packages as +described in the second edition of The LaTeX Companion. But that +documentation should also suffice for the newer versions. LICENCE: All files in this package may be distributed under the terms of the LaTeX Project Public License, as described in lppl.txt in the base @@ -33,7 +34,7 @@ LaTeX distribution. Either version 1 or, at your option, any later version. -- Piet van Oostrum. -<piet@cs.ruu.nl> -http://www.cs.ruu.nl/~piet +<piet@vanoostrum.org> +http://www.pietvanoostrum.com/ diff --git a/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf b/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf Binary files differindex 0d9a94b2a0c..49b2aef326c 100644 --- a/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf +++ b/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf diff --git a/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex b/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex index 3ac345cf493..910136ece15 100644 --- a/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex +++ b/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex @@ -6,18 +6,13 @@ \usepackage{array} \usepackage{a4wide} \usepackage{boxedminipage} -%%\usepackage{fancyheadings} -%%\pagestyle{fancy} -%%\lhead{\rightmark} -%%\rhead{\thepage} -%%\cfoot{} \makeindex \title{Page layout in \LaTeX} \author{Piet van Oostrum\thanks{A considerable part of this article was written by George Gr\"atzer (University of Manitoba) in \emph{Notices Amer. Math. Soc.} Thanks, George!}\\ - Dept.\ of Computer Science\\ + Dept.\ of Computer Science\thanks{This was my employer at the time I developed this package. I am now retired.}\\ Utrecht University} \def\latex/{\protect\LaTeX{}} \def\tex/{\TeX} @@ -58,12 +53,9 @@ Originally this was the documentation of the \textsf{fancyheadings} package. It did contain also other info, e.g. advanced use of marks. It has now been upgraded to include more, e.g. the handling of floats. - The fancyheadings documentation has been upgraded to conform to version 2 - of this package\footnote{this version is due to be released Real Soon Now}. For reasons of compatibility with certain operating systems, the - name of the package has been changed to \textsf{fancyhdr}. + The documentation describes version 3.6 or later of the \textsf{fancyhdr} package + and version 2.1 or later of the \textsf{extramarks} package. - Although this paper uses \LaTeXe{} commands, most of the techniques can - be used with older \LaTeX versions with appropriate changes. \end{abstract} \tableofcontents @@ -94,7 +86,7 @@ to accomplish things that cannot be done in another way. You should use these packages to get the desired result rather than fiddling with the output routine yourself. -There a a number of things that you must be aware of: +There are a number of things that you must be aware of: \begin{enumerate} \item The margins on the left are not called \Cmd{leftmargin}, but \Cmd{evensidemargin} (on even-numbered pages) and \Cmd{oddsidemargin} @@ -201,22 +193,6 @@ define: Of course, you also have complete control over fonts, uppercase and lowercase displays, etc. -%%% \section{Where to get it?}\label{get} -%%% You only need the file \verb|fancyhdr.sty| which you can find at the -%%% \index{ftp} -%%% CTAN sites: \verb|ftp.shsu.edu| (U.S.), \verb|ftp.tex.ac.uk| (U.K.), and -%%% \verb|ftp.dante.de| (Germany). -%%% You will find it in the directory\\ -%%% \verb|/tex-archive/macros/latex209/contrib/fancyhdr|. Although -%%% \textsf{fancyhdr} -%%% is a \latex/ 2.09 style file, it will work with \LaTeXe{}. Also this -%%% \TTindex{fixmarks.sty} -%%% \TTindex{extramarks.sty} -%%% article and the two packages \texttt{fixmarks} and \texttt{extramarks} can -%%% be found there. (The code for these packages given in this article is a -%%% simplified version.) - - \section{Simple use of \textsf{fancyhdr}} To use this package in a \LaTeXe\ document, place the file \verb|fancyhdr.sty| in a directory/folder where \tex/ can find it (normally in the input @@ -226,9 +202,7 @@ after \begin{verbatim} \documentclass{...} \end{verbatim} -the commands\footnote{For LaTeX2.09 you should specify \texttt{[fancyhdr]} - in the \Cmd{documentstyle} instead of the \Cmd{usepackage} - command.}: +the commands: \PSindex{fancy} \begin{verbatim} @@ -261,8 +235,8 @@ A. Smith, on ``The performance of new graduates'' with the following page layout: \begin{fblock} -\noindent\makebox[\textwidth]{\hfill\bfseries The performance of new -graduates} +\noindent\makebox[\textwidth]{\hfill\textbf{The performance of new +graduates}} \noindent\makebox[\textwidth]{\hrulefill}\\[\baselineskip] \noindent\makebox[\textwidth]{\hfill page body\hfill}\\[\baselineskip] \noindent\makebox[\textwidth]{\hrulefill} @@ -287,7 +261,7 @@ This is accomplished by these commands following \Cmd{pagestyle\{fancy\}} \begin{verbatim} \lhead{} \chead{} -\rhead{\bfseries The performance of new graduates} +\rhead{\textbf{The performance of new graduates}} \lfoot{From: K. Grant} \cfoot{To: Dean A. Smith} \rfoot{\thepage} @@ -295,7 +269,7 @@ This is accomplished by these commands following \Cmd{pagestyle\{fancy\}} \renewcommand{\footrulewidth}{0.4pt} \end{verbatim} (The \Cmd{thepage} macro displays the current page number. -\Cmd{bfseries} is the \LaTeXe's way of selecting bold face.) +\Cmd{textbf} puts it in bold face.) This is now fine, except that the first page does not need all these headers and footers. To eliminate all but the @@ -337,8 +311,8 @@ following for the even (left-side) pages: \begin{fblock} -\noindent\makebox[\textwidth]{\bfseries The performance of new -graduates\hfill} +\noindent\makebox[\textwidth]{\textbf{The performance of new +graduates}\hfill} \noindent\makebox[\textwidth]{\hrulefill}\\[\baselineskip] \noindent\makebox[\textwidth]{\hfill page body\hfill}\\[\baselineskip] \noindent\makebox[\textwidth]{\hrulefill} @@ -352,7 +326,7 @@ Here are the commands: \begin{verbatim} \fancyhead{} % clear all header fields -\fancyhead[RO,LE]{\bfseries The performance of new graduates} +\fancyhead[RO,LE]{\textbf{The performance of new graduates}} \fancyfoot{} % clear all footer fields \fancyfoot[LE,RO]{\thepage} \fancyfoot[LO,CE]{From: K. Grant} @@ -437,7 +411,7 @@ making the page number bold. \begin{verbatim} \fancypagestyle{plain}{% \fancyhf{} % clear all header and footer fields -\fancyfoot[C]{\bfseries \thepage} % except the center +\fancyfoot[C]{\textbf{\thepage}} % except the center \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}} \end{verbatim} @@ -458,7 +432,7 @@ the footer; there is no header, and there are no decorative lines. On an even page, we get the layout: \begin{fblock} -\noindent\makebox[\textwidth]{\sl 1.2 EVALUATION\hfill +\noindent\makebox[\textwidth]{\textsl{1.2 EVALUATION}\hfill CHAPTER 1. INTRODUCTION} \noindent\makebox[\textwidth]{\hrulefill}\\[\baselineskip] \noindent\makebox[\textwidth]{\hfill page body\hfill}\\[\baselineskip] @@ -469,7 +443,7 @@ On an even page, we get the layout: On an odd page, we get the layout: \begin{fblock} -\noindent\makebox[\textwidth]{\sl CHAPTER 1. INTRODUCTION\hfill +\noindent\makebox[\textwidth]{\textsl{CHAPTER 1. INTRODUCTION}\hfill 1.2 EVALUATION} \noindent\makebox[\textwidth]{\hrulefill}\\[\baselineskip] \noindent\makebox[\textwidth]{\hfill page body\hfill}\\[\baselineskip] @@ -484,8 +458,8 @@ This default layout is produced by the following commands: \CmdIndex{rightmark} \CmdIndex{leftmark} \begin{verbatim} -\fancyhead[LE,RO]{\slshape \rightmark} -\fancyhead[LO,RE]{\slshape \leftmark} +\fancyhead[LE,RO]{\textsl{\rightmark}} +\fancyhead[LO,RE]{\textsl{\leftmark}} \fancyfoot[C]{\thepage} \end{verbatim} @@ -749,11 +723,6 @@ Fortunately the \texttt{ifthen} package works well: \fancyhead[LO,RE]{\thepage} \end{verbatim} -Dictionaries are often done with two columns. Unfortunately there is a bug -in \latex/'s twocolumn option which causes some marks to be lost. If you -use David Carlisle's fix2col.sty\TTindex{fix2col.sty} this will be solved. - - \section{Fancy layouts} \index{multi-line} @@ -814,72 +783,50 @@ of the footer text line. By default it is set to 30\% of the normal line distance. You may want to adjust it if you use unusally large or small fonts in the footer. Change it with \Cmd{renewcommand}. +\section{Two book examples} +The following definitions give an approximation of the style +used in L. Lamport's \latex/ book. -\section{The width of the headers and footers} - +Lamport's header overhangs the outside margin. This is done as follows. The width of headers and footers is \Cmd{headwidth}, which by default equals the width of the text: \Cmd{textwidth}. You can make the width \CmdIndex{headwidth} -wider (or narrower) by using the commands -\CmdIndex{fancyheadoffset} -\CmdIndex{fancyfootoffset} -\CmdIndex{fancyhfoffset} -\Cmd{fancyheadoffset}, \Cmd{fancyfootoffset} and \Cmd{fancyhfoffset}% -\footnote{These commands are defined since fancyhdr version 3.0. In older - versions you just changed \Cmd{headwidth} with the -\Cmd{setlength} and \Cmd{addtolength} commands. You are encouraged to use - these newer offset commands instead. You certainly can't mix the two - approaches.}. -These are similar to \Cmd{fancyhead}, \Cmd{fancyfoot} and \Cmd{fancyhf}. -The only difference is that the offsets don't accept the C option. - -Usage: \Cmd{fancyhfoffset[place]\{length\}} -and similar for the others. - -It defines offsets to be applied to the header/footer to let it stick into -the margins if length $>$ 0 and to be smaller if length $<$ 0. -place is like in \Cmd{fancyhead}, except that only E,O,L,R (or the lowercase) -can be used. - -With these commands \Cmd{headwidth} will be dynamically calculated in -the headers/footers to be \Cmd{textwidth} + left offset + right offset, so -that e.g. you can use the following to define a red line in the header -and a blue line in the footer (please note that the width of the footer is -also called \Cmd{headwidth} although it may differ from the width of the -header): +wider (or narrower) by redefining \Cmd{headwidth} with the +\Cmd{setlength} and \Cmd{addtolength} commands. +To overhang the outside margin where the marginal notes are +\CmdIndex{marginparsep} +\CmdIndex{marginparwidth} +printed, add both \Cmd{marginparsep} and \Cmd{marginparwidth} to +\Cmd{headwidth} with the commands: \begin{verbatim} -\renewcommand{\headrule}{{\color{red}% - \hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}} - -\setlength{\footrulewidth}{\headrulewidth} - -\renewcommand{\footrule}{{\color{blue}% - \vskip-\footruleskip\vskip-\footrulewidth -\hrule width\headwidth height\footrulewidth\vskip\footruleskip}} +\addtolength{\headwidth}{\marginparsep} +\addtolength{\headwidth}{\marginparwidth} \end{verbatim} -\section{Two book examples} +\begin{flushleft} +You must issue these commands \emph{after} the first +\Cmd{pagestyle\{fancy\}} command as this +will establish the default for \Cmd{headwidth}\footnote{In version 2 of + \textsf{fancyhdr} it is usually safe to do it before, but it is still + advised to do after.}. +\end{flushleft} -The following definitions give an approximation of the style -used in Leslie Lamport's \latex/ book. - -Lamport's header overhangs the outside margin. This is done with the -offset commands described in the previous section. +And now a complete definition of Lamport's book style: \begin{verbatim} \documentclass{book} \usepackage{fancyhdr} \pagestyle{fancy} -\usepackage{calc} -\fancyheadoffset[LE,RO]{\marginparsep+\marginparwidth} +\addtolength{\headwidth}{\marginparsep} +\addtolength{\headwidth}{\marginparwidth} \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \fancyhf{} -\fancyhead[LE,RO]{\bfseries\thepage} -\fancyhead[LO]{\bfseries\rightmark} -\fancyhead[RE]{\bfseries\leftmark} +\fancyhead[LE,RO]{\textbf{\thepage}} +\fancyhead[LO]{\textbf{\rightmark}} +\fancyhead[RE]{\textbf{\leftmark}} \fancypagestyle{plain}{% \fancyhead{} % get rid of headers \renewcommand{\headrulewidth}{0pt} % and the line @@ -890,6 +837,20 @@ offset commands described in the previous section. Notice that the \Cmd{chaptermark} and \Cmd{sectionmark} commands have been redefined to eliminate the chapter numbers and the uppercaseness. +For more control about the horizontal position of the headers and/or footers, \textsf{fancyhdr} has additional commands to specify the offset of the header and/or footer elements. Use \Cmd{fancyhfoffset[place]\{length\}} +\CmdIndex{fancyhfoffset} +to offset one or more elements. The \texttt{place} parameter is like the optional parameter of \Cmd{fancyhf}, like \texttt{L R E O}, except that \texttt{C} cannot be used. It specifies for which elements the offset should be applied. The \texttt{length} parameter specifies the actual offset. Positive values move the element outward (into the margin), negative values inward. There are also specialised commands \Cmd{fancyheadoffset} and \Cmd{fancyfootoffset}, which have the \texttt{H} and \texttt{F} parameter pre-applied, respectively. +\CmdIndex{fancyheadoffset} +\CmdIndex{fancyfootoffset} + +When you use these commands, \latex/ will recalculate \Cmd{headwidth}, based on the given parameters. + +So the above example could also have been done with (N.B. You can only use such an expression as a length parameter if the \textsf{calc} package is used): + +\begin{verbatim} +\fancyheadoffset[LE,RO]{\marginparsep+\marginparwidth} +\end{verbatim} + For the second example, we take the \amslatex/ book.% \cite{gG93B}. % George Gratzer, Math into LaTeX, An Introduction to LaTeX and AMS-LaTeX, % Birkhauser Boston, ISBN 0-8176-3805-9 @@ -1034,12 +995,7 @@ page then you must redefine the \Cmd{cleardoublepage} command. \label{sec:nofm} Some document writers prefer the pages to be numbered as \textsf{n} of -\textsf{m} where \textsf{m} is the number of pages in the document. There -\TTindex{nofm.sty} -is a package \texttt{nofm.sty} available, but some versions of it are -defective, and most don't work with fancyhdr because they take over the -\TTindex{lastpage.sty} -complete page layout. For \LaTeXe{} there is a package \texttt{lastpage} +\textsf{m} where \textsf{m} is the number of pages in the document. There is a package \texttt{lastpage} available which you can use with \textsf{fancyhdr} as follows: \begin{verbatim} @@ -1048,24 +1004,11 @@ available which you can use with \textsf{fancyhdr} as follows: \cfoot{\thepage\ of \pageref{LastPage}} \end{verbatim} -If you are still using \latex/2.09 and you are not able to switch to -\LaTeXe{} you can use the \latex/2.09 compatible \texttt{lastpage209.sty}. -which is defined as -follows: - -\begin{verbatim} -\let\origenddocument=\enddocument -\def\enddocument{\clearpage\if@filesw - {\addtocounter{page}{-1} \immediate\write\@mainaux - {\string\newlabel{LastPage}{{}{\thepage}}}}\origenddocument} -\end{verbatim} - The value of the \texttt{LastPage} label can be used to make different headers or footers on the last page of a document. E.g.\ if you want the footer of every odd page, except if it is the last one, to contain the text ``please turn over'', this can be done as -follows\footnote{This requires a reasonably recent version of the - \texttt{ifthen} package.}: +follows: \begin{verbatim} \usepackage{lastpage} @@ -1080,18 +1023,30 @@ follows\footnote{This requires a reasonably recent version of the In technical documentation very often page numbers are used of the form 2-10 where the first number is the chapter number and the second is the pagenumber relative to the chapter. Sometimes section is used rather than -chapter. The package \textsf{chappg} can be used to get this format. If you -want to change the layout e.g. use a dot rather than a dash, or a section -rather than a chapter, you should make a private copy and edit it. - -This package redefines \Cmd{thepage} as -\Cmd{arabic\{chapter\}-}\Cmd{arabic\{page\}}. -Unfortunately this gives numbers rather than letters for appendices. A -better definition would be \Cmd{thechapter-}\Cmd{arabic\{page\}} but you can -give this definition yourself after the \Cmd{usepackage\{chappg\}} command. +chapter. The package \textsf{chappg} can be used to get this format. + +Basically this package redefines \Cmd{thepage} as +\Cmd{thechapter}\Cmd{chappgsep}\Cmd{arabic\{page\}}, where \Cmd{chappgsep} by default is ``-''. If you want do use a different separator, you must redefine \Cmd{chappgsep}, for example to use an en-dash: + +\begin{verbatim} +\renewcommand{\chappgsep}{--} +\end{verbatim} + +To use a different prefix, for example the section number, use the \Cmd{pagenumbering\{bychapter\}} command with an optional argument specifying the prefix. +\CmdIndex{pagenumbering} + +\begin{verbatim} +\pagenumbering[\thesection]{bychapter} +\end{verbatim} + What the package also does is reset the page number to 1 at the beginning of each chapter. +There is a caveat when you have appendixes in your document. Before the +\Cmd{appendix} command you should give a \Cmd{clearpage} or +\Cmd{cleardoublepage}. See the \textsf{chappg} documentation for +details. + There is a fundamental difference between the page numbering of the style ``\emph{m} of \emph{n}'' as described in the previous section and the current one. The \emph{m} of \emph{n} style is only used in the page header @@ -1123,7 +1078,7 @@ any of the above mentioned changes. If this is not possible you can use the \texttt{afterpage} package with:\\ \Cmd{afterpage\{}\Cmd{lhead\{new value\}\}} or \CmdIndex{pagenumbering} -\Cmd{afterpage\{}\Cmd{pagenumbering\{roman\}}. You cannot use \Cmd{afterpage} +\Cmd{afterpage\{}\Cmd{pagenumbering\{roman\}\}}. You cannot use \Cmd{afterpage} to change the \Cmd{pagestyle} as the commands issued by \Cmd{afterpage} are local in a group, and the \Cmd{pagestyle} command makes only local changes. The \Cmd{pagenumbering} and the \textsf{fancyhdr} commands @@ -1180,11 +1135,8 @@ the following: You cannot use \latex/'s mark mechanisms for this if you also want to use chapter and section information. -The fancyhdr distribution includes a package that gives you -two extra marks that can be used in this situation\footnote{After I made - this package I discovered a package \texttt{secret.sty} that does a - similar thing to mark confidential paragraphs if they cross a page - boundary. It does it, however, by changing the output routine.}. +The \textsf{extramarks} package gives you +two extra marks that can be used in this situation. Here is a way to use this package: \begin{verbatim} @@ -1207,32 +1159,24 @@ be broken at that boundary and the extramarks would come on the wrong page. There are two new marks that can be used in the page layout with this package: If commands of the form \verb|\extramarks{|$m_1$\verb|}{|$m_2$\verb|}| are given -\CmdIndex{firstleftxmark} -\Cmd{firstleftxmark}\footnote{% - In extramarks.sty before version 2.0 only the shorthand commands - \Cmd{firstxmark} and \Cmd{lastxmark} were defined.} -gives you the first $m_1$ value, +\CmdIndex{firstxmark} +\CmdIndex{lastxmark} +\Cmd{firstxmark} gives you the first $m_1$ value and +\Cmd{lastxmark} gives you the last $m_2$ value +of the current page. + +In case you want the last $m_1$ value or the first $m_2$ value, you can use the \Cmd{lastleftxmark} or \Cmd{firstrightxmark}, respectively. For symmetry reasons there are also commands \Cmd{firstleftxmark} (=\Cmd{firstxmark}), \Cmd{lastrightxmark} (=\Cmd{lastxmark}), \Cmd{topleftxmark} (=\Cmd{topxmark}) and \Cmd{toprightxmark}. \CmdIndex{lastleftxmark} -\Cmd{lastleftxmark} gives you the last $m_1$ value, \CmdIndex{firstrightxmark} -\Cmd{firstrightxmark} gives you the first $m_2$ value and +\CmdIndex{firstleftxmark} \CmdIndex{lastrightxmark} -\Cmd{lastrightxmark} gives you the last $m_2$ value -of the current page. -\CmdIndex{firstxmark} -Also for convenience (similar to the standard \latex/ marks) -\Cmd{firstxmark} is an alias for \Cmd{firstleftxmark} and -\CmdIndex{lastxmark} -\Cmd{lastxmark} is an alias for \Cmd{lastrightxmark}. -There is also a \Cmd{topxmark} or \Cmd{topleftxmark} similar to \tex/'s -\Cmd{topmark} but it probably is not of much use. +\CmdIndex{topleftxmark} +\CmdIndex{toprightxmark} +The package also gives you the \Cmd{firstleftmark} and \Cmd{lastrightmark} +commands that complement the standard \latex/ marks. \CmdIndex{firstleftmark} \CmdIndex{lastrightmark} -Finally it also gives you the \Cmd{firstleftmark} and \Cmd{lastrightmark} -commands that complement the standard \latex/ marks. - - To stress the point that marks are the correct way to do this, let me give you a ``solution'' that will not work\footnote{Actually there is @@ -1560,8 +1504,7 @@ There are a number of ways to prevent this: next page. \item use the \texttt{flafter} package which causes floats never to be placed ``backwards''. -\item use the command \Cmd{suppressfloats[t]}\footnote{This command and the - ``!'' placement parameter are not defined in \LaTeX2.09.}. This +\item use the command \Cmd{suppressfloats[t]}. This command will cause floats for the top position \emph{on this page} to be moved to the next page. This can also be done with \texttt{[b]} or without parameter for all floats on this page. @@ -1588,10 +1531,9 @@ give the command: \end{verbatim} in the preamble. Now you will be able to specify \texttt{[H]} as the position parameter, which will mean ``HERE and only -HERE''. This may cause an unwanted page break however\footnote{There used -to be a \texttt{here.sty} with the same effect, but this is incompatible -with \LaTeXe}. If you want to avoid the unwanted pagebreak, i.e. let -\LaTeX{} move the float only if it doesn't fit on the page, the use the +HERE''. This may cause an unwanted page break however. +If you want to avoid the unwanted pagebreak, i.e. let +\LaTeX{} move the float only if it doesn't fit on the page, then use the \textsf{afterpage} package with: \begin{verbatim} \afterpage{\clearpage \begin{figure}[H] ... \end{figure}} @@ -1710,13 +1652,28 @@ start your multipage figure on an even page, however. \section{Contact information} Piet van Oostrum\\ -Dept.\ of Computer Science\\ -Utrecht University\\ -P.O. Box 80.089\\ -3508 TB Utrecht, The Netherlands\\ -Telephone: +31 30 2532180 Telefax: +31 30 2513791\\ -E-mail: piet@cs.uu.nl \\ -WWW: http://www.cs.uu.nl/people/piet +E-mail: piet@vanoostrum.org \\ +WWW: http://www.pietvanoostrum.com + +\section{Version information} +\begin{itemize} +\item Version 1.0. March 11, 2003. This is the version that was distributed for a + long time on CTAN. Version history before this has been lost. +\item Version 2.0. August 27, 2016: + \begin{itemize} + \item Removed references to fixmarks.sty as that is no longer used. + \item References to older \LaTeX{} versions removed. + \item Removed obsolete source code of \texttt{extramarks.sty} + \item Changed font commands to \Cmd{textbf} and \Cmd{textsl}. + \item Added description of the \Cmd{fancy\ldots offset} commands. + \item Added various \Cmd{\ldots xmark} commands from \texttt{extramarks.sty}. + \item Various corrections applied. + \item Updated contact information. + \item Added Version information. :) + \end{itemize} + +\end{itemize} + \printindex diff --git a/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty b/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty index 4f4070d5b00..0f0a97ebb2c 100644 --- a/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty +++ b/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty @@ -1,8 +1,8 @@ -% Extra marks for latex. Version 2.0. +% Extra marks for latex. Version 2.1. % Piet van Oostrum, -% Dept of Computer and Information Sciences, University of Utrecht, -% Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands -% Telephone: +31 30 2532180. Email: piet@cs.uu.nl +% [Formerly] Dept of Computer and Information Sciences, University of Utrecht, +% Email: piet@vanoostrum.org +% WWW: http://www.pietvanoostrum.com % ======================================================================== % LICENCE: % This file may be distributed under the terms of the LaTeX Project Public @@ -24,6 +24,10 @@ % March 3, 2004 % version 2.0 % Release. +% Aug. 27, 2016 +% version 2.1 +% Added a \ProvidesPackage line. +% Updated contact information. % This package gives you two additional marks. % \extramarks{m1}{m2} define two extra marks for headers/footers @@ -58,6 +62,8 @@ % if marginpars or floats are used, as LaTeX clobbers TeX's topmark in this % case. +\NeedsTeXFormat{LaTeX2e}[1995/06/01]% +\ProvidesPackage{extramarks}[2016/08/27 2.1 Extra marks]% \newtoks\@temptokenb %Just in case. diff --git a/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty b/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty index 77ed4e3012d..11b894e713d 100644 --- a/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +++ b/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty @@ -1,9 +1,9 @@ -% fancyhdr.sty version 3.2 +% fancyhdr.sty version 3.6 % Fancy headers and footers for LaTeX. % Piet van Oostrum, -% Dept of Computer and Information Sciences, University of Utrecht, -% Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands -% Telephone: +31 30 2532180. Email: piet@cs.uu.nl +% [Formerly] Dept of Computer and Information Sciences, University of Utrecht, +% Email: piet@vanoostrum.org +% WWW: http://www.pietvanoostrum.com % ======================================================================== % LICENCE: % This file may be distributed under the terms of the LaTeX Project Public @@ -145,6 +145,29 @@ % reset \everypar (the real one) in \fancy@reset because spanish.ldf does % strange things with \everypar between << and >>. +% Aug 20, 2016 +% version 3.3 +% Replace `\@ifundefined{chapter}' with `\ifx\chapter\@undefined' +% because the former subtly make \chapter equal to \relax, which may be +% undesirable in some cases. + +% Aug 21, 2016 +% version 3.4 +% Replace \rm by \normalfont\rmfamily +% and \sl by \normalfont\slshape + +% Aug 21, 2016 +% version 3.5 +% Don't define \footruleskip if it is already defined + +% Aug. 27, 2016 +% version 3.6 +% Added a \ProvidesPackage line. +% Updated contact information. + +\NeedsTeXFormat{LaTeX2e}[1995/06/01]% +\ProvidesPackage{fancyhdr}[2016/08/27 3.6 Extensive control of page headers and footers]% + \def\ifancy@mpty#1{\def\temp@a{#1}\ifx\temp@a\@empty} \def\fancy@def#1#2{\ifancy@mpty{#2}\fancy@gbl\def#1{\leavevmode}\else @@ -299,7 +322,9 @@ \newlength{\f@ncyO@orf} \newcommand{\headrulewidth}{0.4pt} \newcommand{\footrulewidth}{0pt} -\newcommand{\footruleskip}{.3\normalbaselineskip} +%% Memoir also define \footruleskip. +%% Don't define \footruleskip if it is already defined +\@ifundefined{footruleskip}{\newcommand{\footruleskip}{.3\normalbaselineskip}}{} % Fancyplain stuff shouldn't be used anymore (rather % \fancypagestyle{plain} should be used), but it must be present for @@ -337,13 +362,13 @@ % lefthead empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages % evenhead empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages \if@twoside - \fancyhead[el,or]{\fancyplain{}{\sl\rightmark}} - \fancyhead[er,ol]{\fancyplain{}{\sl\leftmark}} + \fancyhead[el,or]{\fancyplain{}{\normalfont\slshape\rightmark}} + \fancyhead[er,ol]{\fancyplain{}{\normalfont\slshape\leftmark}} \else - \fancyhead[l]{\fancyplain{}{\sl\rightmark}} - \fancyhead[r]{\fancyplain{}{\sl\leftmark}} + \fancyhead[l]{\fancyplain{}{\normalfont\slshape\rightmark}} + \fancyhead[r]{\fancyplain{}{\normalfont\slshape\leftmark}} \fi -\fancyfoot[c]{\rm\thepage} % page number +\fancyfoot[c]{\normalfont\rmfamily\thepage} % page number % Use box 0 as a temp box and dimen 0 as temp dimen. % This can be done, because this code will always @@ -396,15 +421,18 @@ % the version 1 documentation) will still work. % \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}% -\@ifundefined{chapter}{\def\sectionmark##1{\markboth +\ifx\chapter\@undefined +\def\sectionmark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\z@ \thesection\hskip 1em\relax \fi ##1}}{}}% \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne - \thesubsection\hskip 1em\relax \fi ##1}}}% -{\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne + \thesubsection\hskip 1em\relax \fi ##1}}% +\else +\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne \@chapapp\ \thechapter. \ \fi ##1}}{}}% \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@ - \thesection. \ \fi ##1}}}}% + \thesection. \ \fi ##1}}}% +\fi %\csname ps@headings\endcsname % use \ps@headings defaults if they exist \ps@@fancy \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}% |