diff options
author | Karl Berry <karl@freefriends.org> | 2009-03-12 23:56:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-03-12 23:56:18 +0000 |
commit | acc836880ba7376f28c11c51041a9602b55d6a72 (patch) | |
tree | 27a6b4cbf050034b40cfc5378f54afa623a6f30c /Master/texmf-dist/source/latex/endheads | |
parent | 30349c5a4c71130214ebd146f4dfc3b51c543d8d (diff) |
endheads 1.52 (11mar09)
git-svn-id: svn://tug.org/texlive/trunk@12374 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/endheads')
-rw-r--r-- | Master/texmf-dist/source/latex/endheads/endheads.dtx | 62 |
1 files changed, 37 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/endheads/endheads.dtx b/Master/texmf-dist/source/latex/endheads/endheads.dtx index 4022536dfa5..ee7da13e200 100644 --- a/Master/texmf-dist/source/latex/endheads/endheads.dtx +++ b/Master/texmf-dist/source/latex/endheads/endheads.dtx @@ -18,7 +18,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01] %<package>\ProvidesPackage{endheads} -%<package> [2008/04/14 v1.45 endheads file] +%<package> [2009/03/12 v1.53 endheads file] % %<*driver> \documentclass{ltxdoc} @@ -32,7 +32,7 @@ %</driver> % \fi % -% \CheckSum{535} +% \CheckSum{563} % % \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 @@ -64,6 +64,9 @@ % commands for multilingual use} %\changes{v1.45}{2008/04/14}{Corrected problem with putting entry for %endnotes in table of contents} +%\changes{v1.5}{2009/03/09}{Corrected resetendnotes command for frontmatter} +%\changes{v1.52}{2009/03/11}{Endnote sections from frontmatter can put roman numerals in the running headers} +%\changes{v1.53}{2009/03/12}{Made ``appendtomacro'' local, per Ulrich Diez} % \GetFileInfo{endheads.sty} % % \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\else,\renewcommand,\makeatletter,\makeatother} @@ -99,13 +102,13 @@ % \textsc, \unskip} % \setcounter{IndexColumns}{2} % \MakeShortVerb{|} -% \def\fileversion{1.45} -% \def\filedate{14 April 2008} -% \def\docdate{14 April 2008} +% \def\fileversion{1.52} +% \def\filedate{12 March 2009} +% \def\docdate{12 March 2009} % \title{Running Headers for Endnotes\thanks{This document % corresponds to \textsf{endheads}~\fileversion, dated \filedate.}} % \author{John Burt \\ \texttt{burt@brandeis.edu}} -% \date{April 14, 2008} +% \date{March 12, 2009} % \maketitle % \begin{abstract} % \textsf{endheads} provides running headers of the form ``Notes to @@ -307,11 +310,13 @@ r@#2\endcsname{}{}\@nil \setcounter{#1}{\@extractpageref{#2}}% }% } -\long\def\appendtomacro#1#2{% +\newtoks\romannumeralholder +\long\def\localappendtomacro#1#2{% \begingroup - \toks@\expandafter{#1#2}% - \xdef#1{\the\toks@}% - \endgroup} +\toks@{\endgroup\def#1}% +\the\expandafter\toks@ + \expandafter{#1#2}% +}% % \end{macrocode} % \subsection{Building Blocks} % First, define some counters: @@ -410,6 +415,13 @@ r@#2\endcsname{}{}\@nil } } +\@ifclassloaded{memoir}{\newcommand{\checknoteheadersroman}{% +\string\romannumeralholder={\@extractpageref{notl\theallendnotes}} +\string\markboth\string{\string\the\string\romannumeralholder\string}\string{\string\the\string\romannumeralholder\string}% +}}{\newcommand{\checknoteheadersroman}{% +\string\romannumeralholder={\@extractpageref{notl\theallendnotes}} +\string\mark\string{\string\the\string\romannumeralholder\string}% +}} % \end{macrocode} % \end{macro} % \subsection{User Code} @@ -439,8 +451,12 @@ r@#2\endcsname{}{}\@nil \immediate\write\@enotes{\string\fi} \def\endnote{\@ifnextchar[\@xendnote{\stepcounter{endnote}% % my addition begins - \stepcounter{allendnotes}\label{notl\theallendnotes}% + \stepcounter{allendnotes}\label{notl\theallendnotes}% +\if@mainmatter \immediate\write\@enotes{\checknoteheaders}% +\else + \immediate\write\@enotes{\checknoteheadersroman}% +\fi % my addition ends \protected@xdef\@theenmark{\theendnote}% \@endnotemark\@endnotetext}} @@ -475,6 +491,7 @@ r@#2\endcsname{}{}\@nil \renewcommand{\styleforchapternoteend}{#1}}% \setstyleforchapternotebegin{\begin{center}} \setstyleforchapternoteend{\end{center}} + \newcommand{\resetendnotes}{% \label{chapter\thechapter}% \setcounter{endnote}{0}% @@ -483,27 +500,22 @@ r@#2\endcsname{}{}\@nil \immediate\write\@enotes{\string\goodbreak} \immediate\write\@enotes{\string\Needspace\string{5\string\baselineskip\string}} \immediate\write\@enotes{\string\styleforchapternotebegin} -% \immediate\write\@enotes{\string\begin\string{center\string}} -%\immediate\write\@enotes{\string{} -\immediate\write\@enotes{\the\chapternoteslinename\string\ \thechapter\string~} -\iftitleinnotes -\immediate\write\@enotes{\string\titleref\string{chapter\thechapter\string}} -\fi -%\immediate\write\@enotes{\string}} +\ifthenelse{\equal{\thechapter}{0}}{% + \immediate\write\@enotes{\string\titleref\string{chapter\thechapter\string}}% + }{% + \immediate\write\@enotes{\the\chapternoteslinename\string\ \thechapter\string~}% + \iftitleinnotes% + \immediate\write\@enotes{\string\titleref\string{chapter\thechapter\string}}% + \fi% + }% \immediate\write\@enotes{\string\styleforchapternoteend} -% \immediate\write\@enotes{\string\end\string{center\string}} \immediate\write\@enotes{\string\nopagebreak} \immediate\write\@enotes{\string\endgroup} -} +} % \end{macrocode} % \end{macro} % \begin{macro}{\notesbychapter} % \begin{macrocode} -% \newcommand{\notesbychapter}{% -% \appendtomacro{\chapter}{% -% \relax -% \resetendnotes}% -% } \newif\ifnotesbychapteron \notesbychapteronfalse \@ifclassloaded{memoir}{\newcommand{\notesbychapter}{\notesbychapterontrue \addtoiargdef{\chapter}{}{ \iftitleinnotes% |