From 6eeb064430624e8115d73f2f5157855dcb16d23e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 14 Apr 2008 23:58:45 +0000 Subject: endheads 1.4 git-svn-id: svn://tug.org/texlive/trunk@7416 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/endheads/endheads.pdf | Bin 141042 -> 144028 bytes .../texmf-dist/source/latex/endheads/endheads.dtx | 103 +++++++++++++++++---- Master/texmf-dist/tex/latex/endheads/endheads.sty | 52 +++++++++-- Master/tlpkg/bin/tlpkg-ctan-check | 5 +- 4 files changed, 131 insertions(+), 29 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/endheads/endheads.pdf b/Master/texmf-dist/doc/latex/endheads/endheads.pdf index c440ac85504..9788a8b0b1c 100644 Binary files a/Master/texmf-dist/doc/latex/endheads/endheads.pdf and b/Master/texmf-dist/doc/latex/endheads/endheads.pdf differ diff --git a/Master/texmf-dist/source/latex/endheads/endheads.dtx b/Master/texmf-dist/source/latex/endheads/endheads.dtx index 3b1006c886f..23fc0a438c4 100644 --- a/Master/texmf-dist/source/latex/endheads/endheads.dtx +++ b/Master/texmf-dist/source/latex/endheads/endheads.dtx @@ -18,7 +18,7 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e}[1997/12/01] %\ProvidesPackage{endheads} -% [2007/12/12 v1.3 endheads file] +% [2008/04/12 v1.4 endheads file] % %<*driver> \documentclass{ltxdoc} @@ -32,7 +32,7 @@ % % \fi % -% \CheckSum{392} +% \CheckSum{487} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -60,6 +60,8 @@ % \changes{v1.152}{2006/11/10}{Fixed strange white space error} % \changes{v1.2}{2006/11/10}{Added commands for multilingual use} % \changes{v1.3}{2007/12/12}{Added commands for multilingual use} +% \changes{v1.4}{2008/04/12}{Added compatibility with memoir class. Added +% commands for multilingual use} % \GetFileInfo{endheads.sty} % % \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\else,\renewcommand,\makeatletter,\makeatother} @@ -95,18 +97,18 @@ % \textsc, \unskip} % \setcounter{IndexColumns}{2} % \MakeShortVerb{|} -% \def\fileversion{1.3} -% \def\filedate{12 December 2007} -% \def\docdate{12 December 2007} +% \def\fileversion{1.4} +% \def\filedate{12 April 2008} +% \def\docdate{12 April 2008} % \title{Running Headers for Endnotes\thanks{This document % corresponds to \textsf{endheads}~\fileversion, dated \filedate.}} % \author{John Burt \\ \texttt{burt@brandeis.edu}} -% \date{December 12, 2007} +% \date{April 12, 2008} % \maketitle % \begin{abstract} % \textsf{endheads} provides running headers of the form ``Notes to % pp.~xx--yy'' for endnotes. \textsf{endheads} is designed to work -% with \textsf{endnotes} and \textsf{fancyhdr}. +% with \textsf{endnotes}. % \end{abstract} % \tableofcontents % \hfuzz=50pt @@ -120,6 +122,7 @@ % the beginning of each chapter. % % \textsf{endheads} requires the following packages to work correctly: +% with the standard document classes, or the komascript classes: % \textsf{endnotes} (obviously), \textsf{fancyhdr} (also obviously), % \textsf{ifthen} (for comparing page numbers), \textsf{needspace} (to % prevent widowed chapter titles in notes sections when resetting @@ -127,6 +130,12 @@ % |\resetendnotes|), and \textsf{titleref} (to send the chapter titles % to the notes section). % +%With \textsf{memoir} class, \textsf{endheads} requires fewer packages, +% since many of the package functions are built into \textsf{memoir} and some, +% \textsf{fancyhdr} most especially, conflict with it. Minimally, you will need \textsf{endnotes} +% and \textsf{ifthen}. You might wish to call \textsf{memoir} with the oldfontcommands +% option. +% % \section{Setup} \DescribeMacro{\setupendnoteheaders} This is the % only macro you need to call to use this package. If you use % |\setupendnoteheaders| you should remember to start your endnotes on @@ -149,9 +158,11 @@ % number}\textgreater ~ \textless\emph{chapter title}\textgreater'' in the % notes at that point. If you want only the chapter number, not its % title, issue |\titleinnotesfalse| in your preamble. Please note -% that \textsf{endheads} modifies |\@chapter|, adding a few lines on +% that with the standard classes +% \textsf{endheads} modifies |\@chapter|, adding a few lines on % to the end of the command. If some other package does the same, you -% will need to reconcile them. +% may need to reconcile them. With \textsf{memoir} class, |\chapter| is modified +% only if |\notesbychapter| is issued. % % \begin{sloppypar} % \DescribeMacro{\setstyleforchapternotebegin} @@ -168,7 +179,9 @@ % |\setstyleforchapternotebegin{\bf}| in your preamble. (It's safe, % indeed required, to use the old style font commands here, since the % chapter title line in the notes is confined to a group, which -% restricts the scope of the font style command to the line.) +% restricts the scope of the font style command to the line. If you are +% using \textsf{memoir} class, you should use the oldfontcommands option if you +% plan on issuing |\setstyleforchatpernotebegin| and |\setstyleforchapternoteend|.) % Remember that if you open an environment with % |\setstyleforchapternotebegin| you must close it in % |\setstyleforchapternoteend|. So, for instance, if you wish the @@ -197,13 +210,17 @@ % As of version 1.2 these % are easily changed. \end{sloppypar} % -% \begin{sloppypar} +% % \DescribeMacro{\changenotesname} To change the name for the endnote % section for notes (the default is Notes), issue % |\changenotesname{your version}|. To change the running header (by -% default ``Notes to'') issue |\changenotesheader{your version}|. To +% default ``Notes to'') issue |\changenotesheader{your version}|. + +%To % change the name for the notes in the table of contents ( by % default ``Notes'') issue |\changenotescontentsname{your version}|. +% +% \begin{sloppypar} % \DescribeMacro{\changesinglepageabbrev} % \DescribeMacro{\changemultiplepageabbrev} Running headers refer to % single pages with the English abbreviation ``p.'' and to multiple @@ -212,7 +229,14 @@ % |\changemultiplepageabbrev{new abbrev}| respectively. The ultimate % outcome is to translate a header of the form ``Notes to % pp.~xx-yy'' to the form appropriate for your -% language.\end{sloppypar} +% language. \end{sloppypar} +% +% \begin{sloppypar} +% \DescribeMacro{\changechapternotesline}If you are using |\resetendnotes| +% or |\setnotesbychapter| you may also want to +% change the text of the line those commands add to the endnotes so as to use some +% other word than ``Chapter.'' To change this, +% issue |\changechapternotesline{your version}|.\end{sloppypar} % % \StopEventually{\PrintChanges\PrintIndex} % \section{Implementation} @@ -290,10 +314,16 @@ r@#2\endcsname{}{}\@nil \newtoks{\multiplepageabbrev} \newcommand{\changemultiplepageabbrev}[1]{\multiplepageabbrev={#1}} \multiplepageabbrev{pp.} -\newcommand{\mymarks}{% +\@ifclassloaded{memoir}{\newcommand{\mymarks}{% + \ifthenelse{\equal{\rightmark}{\leftmark}}% + {\unskip ~\the\singlepageabbrev~\rightmark}% if equal + {\unskip ~\the\multiplepageabbrev~\rightmark--\leftmark}}%if not equal +} +{\newcommand{\mymarks}{% \ifthenelse{\equal{\firstmark}{\botmark}}% {\unskip ~\the\singlepageabbrev~\firstmark}% if equal {\unskip ~\the\multiplepageabbrev~\firstmark--\botmark}}%if not equal +} % \end{macrocode} % \end{macro} % \begin{macro}{\endnotespagestyle} @@ -311,7 +341,20 @@ r@#2\endcsname{}{}\@nil \newtoks{\notescontentsname} \notescontentsname={Notes} \newcommand{\changenotescontentsname}[1]{\textnotescontentsname={#1}} -\fancypagestyle{plain}{% +\newtoks{\chapternoteslinename} +\chapternoteslinename={Chapter} +\newcommand{\changechapternotesline}[1]{\chapternoteslinename={#1}} +\@ifclassloaded{memoir}{\makepagestyle{plain} +\makeevenhead{plain}{}{}{{\small\textrm{\thepage}}} +\makeoddhead{plain}{{\small\textrm{\thepage}}}{}{} +\makeevenfoot{plain}{}{}{} +\makeoddfoot{plain}{}{}{} +\makepagestyle{endnotesstyle} +\makeevenhead{endnotesstyle}{{\small\textrm{\thepage}}}{{\small{\em \the\notesheadername~\mymarks}}}{} +\makeoddhead{endnotesstyle}{}{{\small{\em \the\notesheadername~\mymarks}}}{{\small\textrm{\thepage}}} +\makeevenfoot{}{}{} +\makeoddfoot{}{}{} +}{\fancypagestyle{plain}{% \fancyhf{} \fancyhead[RO,LE]{{\small\textrm{\thepage}}} \renewcommand{\headrulewidth}{0pt} @@ -324,7 +367,9 @@ r@#2\endcsname{}{}\@nil \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancyhead[RO,LE]{{\small\textrm{\thepage}}} -} +} +} + % \end{macrocode} % \end{macro} % \begin{macro}{\checknoteheaders} @@ -338,11 +383,18 @@ r@#2\endcsname{}{}\@nil % |\theendnotes|, you read in the external file for the endnotes, % |\jobname.ent|, all these tokens become a command to set the |\mark|. % \begin{macrocode} -\newcommand{\checknoteheaders}{% +\@ifclassloaded{memoir}{\newcommand{\checknoteheaders}{% +\string\setcounterfrompageref\string{notepageholder\string}% +\string{notl\theallendnotes\string}% +\string\markboth\string{\string\thenotepageholder\string}\string{\string\thenotepageholder\string}% +} +}{\newcommand{\checknoteheaders}{% \string\setcounterfrompageref\string{notepageholder\string}% \string{notl\theallendnotes\string}% \string\mark\string{\string\thenotepageholder\string}% } +} + % \end{macrocode} % \end{macro} % \subsection{User Code} @@ -396,6 +448,7 @@ r@#2\endcsname{}{}\@nil \setstyleforchapternotebegin{\begin{center}} \setstyleforchapternoteend{\end{center}} \newcommand{\resetendnotes}{% +\label{chapter\thechapter}% \setcounter{endnote}{0}% \if@enotesopen \else \@openenotes \fi \immediate\write\@enotes{\string\begingroup} @@ -404,7 +457,7 @@ r@#2\endcsname{}{}\@nil \immediate\write\@enotes{\string\styleforchapternotebegin} % \immediate\write\@enotes{\string\begin\string{center\string}} %\immediate\write\@enotes{\string{} -\immediate\write\@enotes{Chapter \thechapter\string~} +\immediate\write\@enotes{\the\chapternoteslinename\string\ \thechapter\string~} \iftitleinnotes \immediate\write\@enotes{\string\titleref\string{chapter\thechapter\string}} \fi @@ -424,7 +477,15 @@ r@#2\endcsname{}{}\@nil % \resetendnotes}% % } \newif\ifnotesbychapteron \notesbychapteronfalse -\newcommand{\notesbychapter}{\notesbychapterontrue} +\@ifclassloaded{memoir}{\newcommand{\notesbychapter}{\notesbychapterontrue +\addtoiargdef{\chapter}{}{ \iftitleinnotes% +% \label{chapter\thechapter}% + \fi% + \ifnotesbychapteron% + \relax% + \resetendnotes% + \fi}} +}{\newcommand{\notesbychapter}{\notesbychapterontrue} \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne \if@mainmatter \refstepcounter{chapter}% @@ -447,12 +508,14 @@ r@#2\endcsname{}{}\@nil \@afterheading \fi \iftitleinnotes% - \label{chapter\thechapter}% +% \label{chapter\thechapter}% \fi% \ifnotesbychapteron% \relax% \resetendnotes% \fi} +} + % \end{macrocode} % \end{macro} % \Finale diff --git a/Master/texmf-dist/tex/latex/endheads/endheads.sty b/Master/texmf-dist/tex/latex/endheads/endheads.sty index e456bdd30b9..a02448bfaf2 100644 --- a/Master/texmf-dist/tex/latex/endheads/endheads.sty +++ b/Master/texmf-dist/tex/latex/endheads/endheads.sty @@ -22,7 +22,8 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e}[1997/12/01] \ProvidesPackage{endheads} - [2007/01/18 v1.2 endheads file] + [2008/04/12 v1.4 endheads file] + \providecommand*{\ifrefundefined}[1]{% \expandafter\ifx\csname r@#1\endcsname\relax \expandafter\@firstoftwo @@ -79,10 +80,16 @@ r@#2\endcsname{}{}\@nil \newtoks{\multiplepageabbrev} \newcommand{\changemultiplepageabbrev}[1]{\multiplepageabbrev={#1}} \multiplepageabbrev{pp.} -\newcommand{\mymarks}{% +\@ifclassloaded{memoir}{\newcommand{\mymarks}{% + \ifthenelse{\equal{\rightmark}{\leftmark}}% + {\unskip ~\the\singlepageabbrev~\rightmark}% if equal + {\unskip ~\the\multiplepageabbrev~\rightmark--\leftmark}}%if not equal +} +{\newcommand{\mymarks}{% \ifthenelse{\equal{\firstmark}{\botmark}}% {\unskip ~\the\singlepageabbrev~\firstmark}% if equal {\unskip ~\the\multiplepageabbrev~\firstmark--\botmark}}%if not equal +} \newtoks{\endnotesname} \endnotesname={Notes} @@ -93,7 +100,20 @@ r@#2\endcsname{}{}\@nil \newtoks{\notescontentsname} \notescontentsname={Notes} \newcommand{\changenotescontentsname}[1]{\textnotescontentsname={#1}} -\fancypagestyle{plain}{% +\newtoks{\chapternoteslinename} +\chapternoteslinename={Chapter} +\newcommand{\changechapternotesline}[1]{\chapternoteslinename={#1}} +\@ifclassloaded{memoir}{\makepagestyle{plain} +\makeevenhead{plain}{}{}{{\small\textrm{\thepage}}} +\makeoddhead{plain}{{\small\textrm{\thepage}}}{}{} +\makeevenfoot{plain}{}{}{} +\makeoddfoot{plain}{}{}{} +\makepagestyle{endnotesstyle} +\makeevenhead{endnotesstyle}{{\small\textrm{\thepage}}}{{\small{\em \the\notesheadername~\mymarks}}}{} +\makeoddhead{endnotesstyle}{}{{\small{\em \the\notesheadername~\mymarks}}}{{\small\textrm{\thepage}}} +\makeevenfoot{}{}{} +\makeoddfoot{}{}{} +}{\fancypagestyle{plain}{% \fancyhf{} \fancyhead[RO,LE]{{\small\textrm{\thepage}}} \renewcommand{\headrulewidth}{0pt} @@ -107,11 +127,20 @@ r@#2\endcsname{}{}\@nil \renewcommand{\footrulewidth}{0pt} \fancyhead[RO,LE]{{\small\textrm{\thepage}}} } -\newcommand{\checknoteheaders}{% +} + +\@ifclassloaded{memoir}{\newcommand{\checknoteheaders}{% +\string\setcounterfrompageref\string{notepageholder\string}% +\string{notl\theallendnotes\string}% +\string\markboth\string{\string\thenotepageholder\string}\string{\string\thenotepageholder\string}% +} +}{\newcommand{\checknoteheaders}{% \string\setcounterfrompageref\string{notepageholder\string}% \string{notl\theallendnotes\string}% \string\mark\string{\string\thenotepageholder\string}% } +} + \newif\ifendnoteheaderson \endnoteheadersonfalse \newcommand{\setupendnoteheaders}{% \endnoteheadersontrue @@ -150,13 +179,14 @@ r@#2\endcsname{}{}\@nil \setstyleforchapternotebegin{\begin{center}} \setstyleforchapternoteend{\end{center}} \newcommand{\resetendnotes}{% +\label{chapter\thechapter}% \setcounter{endnote}{0}% \if@enotesopen \else \@openenotes \fi \immediate\write\@enotes{\string\begingroup} \immediate\write\@enotes{\string\goodbreak} \immediate\write\@enotes{\string\Needspace\string{5\string\baselineskip\string}} \immediate\write\@enotes{\string\styleforchapternotebegin} -\immediate\write\@enotes{Chapter \thechapter\string~} +\immediate\write\@enotes{\the\chapternoteslinename\string\ \thechapter\string~} \iftitleinnotes \immediate\write\@enotes{\string\titleref\string{chapter\thechapter\string}} \fi @@ -165,7 +195,14 @@ r@#2\endcsname{}{}\@nil \immediate\write\@enotes{\string\endgroup} } \newif\ifnotesbychapteron \notesbychapteronfalse -\newcommand{\notesbychapter}{\notesbychapterontrue} +\@ifclassloaded{memoir}{\newcommand{\notesbychapter}{\notesbychapterontrue +\addtoiargdef{\chapter}{}{ \iftitleinnotes% + \fi% + \ifnotesbychapteron% + \relax% + \resetendnotes% + \fi}} +}{\newcommand{\notesbychapter}{\notesbychapterontrue} \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne \if@mainmatter \refstepcounter{chapter}% @@ -188,12 +225,13 @@ r@#2\endcsname{}{}\@nil \@afterheading \fi \iftitleinnotes% - \label{chapter\thechapter}% \fi% \ifnotesbychapteron% \relax% \resetendnotes% \fi} +} + \endinput %% %% End of file `endheads.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 3dbaa344b11..5ab019832a5 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -158,8 +158,9 @@ my @WorkingTLP = qw( sdrt sectionbox sectsty semantic semaphor seminar semioneside seqsplit setspace sf298 sffms sfg sfmath sgame shadbox shapepar shipunov shorttoc show2e showdim showexpl showlabels - si sidecap sides siggraph simplecv simplewick - SIstyle SIunits skak skaknew slideshow smalltableof smartref + SIstyle SIunits + si sidecap sides siggraph simplecv simplewick siunitx + skak skaknew slideshow smalltableof smartref snapshot songbook sort-by-letters soul sparklines spie splines splitbib splitindex spotcolor sprite srcltx sseq ssqquote stack stage staves stdclsdv stdpage stellenbosch -- cgit v1.2.3