diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/endheads/endheads.sty | 52 |
1 files changed, 45 insertions, 7 deletions
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'. |