summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-01-01 23:04:33 +0000
committerKarl Berry <karl@freefriends.org>2012-01-01 23:04:33 +0000
commit1ebe946b5d71b79e2110bbdb86c76987bfca0b90 (patch)
treed2ac82aa8246810b727a00e242da82785adbdfdd /Master/texmf-dist/source
parentdab53ab523cb43ac436247bddb1984994bbd6161 (diff)
endheads 1.5 (31dec11)
git-svn-id: svn://tug.org/texlive/trunk@24992 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/endheads/endheads.dtx79
1 files changed, 30 insertions, 49 deletions
diff --git a/Master/texmf-dist/source/latex/endheads/endheads.dtx b/Master/texmf-dist/source/latex/endheads/endheads.dtx
index ee7da13e200..1cd7090c6a9 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> [2009/03/12 v1.53 endheads file]
+%<package> [2011/12/29 v1.5 endheads file]
%
%<*driver>
\documentclass{ltxdoc}
@@ -32,7 +32,7 @@
%</driver>
% \fi
%
-% \CheckSum{563}
+% \CheckSum{514}
%
% \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,9 +64,8 @@
% 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}
+%\changes{v1.5}{2011/12/29}{Corrected problem with page styles for
+%first pages of chapters}
% \GetFileInfo{endheads.sty}
%
% \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\else,\renewcommand,\makeatletter,\makeatother}
@@ -102,13 +101,13 @@
% \textsc, \unskip}
% \setcounter{IndexColumns}{2}
% \MakeShortVerb{|}
-% \def\fileversion{1.52}
-% \def\filedate{12 March 2009}
-% \def\docdate{12 March 2009}
+% \def\fileversion{1.5}
+% \def\filedate{29 December 2011}
+% \def\docdate{29 December 2011}
% \title{Running Headers for Endnotes\thanks{This document
% corresponds to \textsf{endheads}~\fileversion, dated \filedate.}}
% \author{John Burt \\ \texttt{burt@brandeis.edu}}
-% \date{March 12, 2009}
+% \date{December 29, 2011}
% \maketitle
% \begin{abstract}
% \textsf{endheads} provides running headers of the form ``Notes to
@@ -310,13 +309,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}
% \end{macrocode}
% \subsection{Building Blocks}
% First, define some counters:
@@ -364,26 +361,17 @@ 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}}}
-\fancyhead[CE]{{\small{\em \the\notesheadername~\mymarks}}}
+\fancyhead[CE]{{\small{\em \the\notesheadername~\mymarks}}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[RO,LE]{{\small\textrm{\thepage}}}
@@ -415,13 +403,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}%
-}}
% \end{macrocode}
% \end{macro}
% \subsection{User Code}
@@ -451,12 +432,8 @@ r@#2\endcsname{}{}\@nil
\immediate\write\@enotes{\string\fi}
\def\endnote{\@ifnextchar[\@xendnote{\stepcounter{endnote}%
% my addition begins
- \stepcounter{allendnotes}\label{notl\theallendnotes}%
-\if@mainmatter
+ \stepcounter{allendnotes}\label{notl\theallendnotes}%
\immediate\write\@enotes{\checknoteheaders}%
-\else
- \immediate\write\@enotes{\checknoteheadersroman}%
-\fi
% my addition ends
\protected@xdef\@theenmark{\theendnote}%
\@endnotemark\@endnotetext}}
@@ -491,7 +468,6 @@ r@#2\endcsname{}{}\@nil
\renewcommand{\styleforchapternoteend}{#1}}%
\setstyleforchapternotebegin{\begin{center}}
\setstyleforchapternoteend{\end{center}}
-
\newcommand{\resetendnotes}{%
\label{chapter\thechapter}%
\setcounter{endnote}{0}%
@@ -500,22 +476,27 @@ 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{\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}}
\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%