From 1ebe946b5d71b79e2110bbdb86c76987bfca0b90 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 1 Jan 2012 23:04:33 +0000 Subject: endheads 1.5 (31dec11) git-svn-id: svn://tug.org/texlive/trunk@24992 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/endheads/endheads.sty | 51 ++++++----------------- 1 file changed, 12 insertions(+), 39 deletions(-) (limited to 'Master/texmf-dist/tex/latex/endheads') diff --git a/Master/texmf-dist/tex/latex/endheads/endheads.sty b/Master/texmf-dist/tex/latex/endheads/endheads.sty index 24139d6601d..6463d72eb33 100644 --- a/Master/texmf-dist/tex/latex/endheads/endheads.sty +++ b/Master/texmf-dist/tex/latex/endheads/endheads.sty @@ -22,7 +22,7 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e}[1997/12/01] \ProvidesPackage{endheads} - [2009/03/12 v1.53 endheads file] + [2011/12/29 v1.5 endheads file] \providecommand*{\ifrefundefined}[1]{% \expandafter\ifx\csname r@#1\endcsname\relax \expandafter\@firstoftwo @@ -65,13 +65,11 @@ r@#2\endcsname{}{}\@nil \setcounter{#1}{\@extractpageref{#2}}% }% } -\newtoks\romannumeralholder -\long\def\localappendtomacro#1#2{% +\long\def\appendtomacro#1#2{% \begingroup -\toks@{\endgroup\def#1}% -\the\expandafter\toks@ - \expandafter{#1#2}% -}% + \toks@\expandafter{#1#2}% + \xdef#1{\the\toks@}% + \endgroup} \newcounter{allendnotes} \setcounter{allendnotes}{1} \newcounter{notepageholder} @@ -104,22 +102,13 @@ r@#2\endcsname{}{}\@nil \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}{}{}{} +\@ifclassloaded{memoir}{ \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} -\renewcommand{\footrulewidth}{0pt} -} +}{ \fancypagestyle{endnotesstyle}{% \fancyhf{} \fancyhead[CO]{{\small{\em \the\notesheadername~\mymarks}}} @@ -142,13 +131,6 @@ 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}% -}} \newif\ifnotesincontentson \notesincontentsonfalse \newcommand{\notesincontents}{\notesincontentsontrue} \newif\ifendnoteheaderson \endnoteheadersonfalse @@ -163,12 +145,8 @@ r@#2\endcsname{}{}\@nil \string{chapter\string}\string{\string\the\string\notescontentsname\string}}% \immediate\write\@enotes{\string\fi} \def\endnote{\@ifnextchar[\@xendnote{\stepcounter{endnote}% - \stepcounter{allendnotes}\label{notl\theallendnotes}% -\if@mainmatter + \stepcounter{allendnotes}\label{notl\theallendnotes}% \immediate\write\@enotes{\checknoteheaders}% -\else - \immediate\write\@enotes{\checknoteheadersroman}% -\fi \protected@xdef\@theenmark{\theendnote}% \@endnotemark\@endnotetext}} \let\oldtheendnotes=\theendnotes @@ -196,7 +174,6 @@ r@#2\endcsname{}{}\@nil \renewcommand{\styleforchapternoteend}{#1}}% \setstyleforchapternotebegin{\begin{center}} \setstyleforchapternoteend{\end{center}} - \newcommand{\resetendnotes}{% \label{chapter\thechapter}% \setcounter{endnote}{0}% @@ -205,14 +182,10 @@ r@#2\endcsname{}{}\@nil \immediate\write\@enotes{\string\goodbreak} \immediate\write\@enotes{\string\Needspace\string{5\string\baselineskip\string}} \immediate\write\@enotes{\string\styleforchapternotebegin} -\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{\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\nopagebreak} \immediate\write\@enotes{\string\endgroup} -- cgit v1.2.3