summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-22 23:12:17 +0000
committerKarl Berry <karl@freefriends.org>2013-05-22 23:12:17 +0000
commit8720829c9cba68ab04a8d8e4f0e6e0fd31cabed7 (patch)
treec052f47a41e7ba8b85bba0b2ddcbfe5d5a97402c /Master
parentdd62e466f5d1dbca765bf38bbaeb50611345fa6a (diff)
memoir (22may13)
git-svn-id: svn://tug.org/texlive/trunk@30639 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/memoir/README130
-rw-r--r--Master/texmf-dist/doc/latex/memoir/memlays.sty158
-rw-r--r--Master/texmf-dist/doc/latex/memoir/memman.pdfbin2677557 -> 2729160 bytes
-rw-r--r--Master/texmf-dist/doc/latex/memoir/memman.tex3505
-rw-r--r--Master/texmf-dist/doc/latex/memoir/memsty.sty54
-rw-r--r--Master/texmf-dist/makeindex/memoir/basic.gst8
-rw-r--r--Master/texmf-dist/source/latex/memoir/memoir.dtx1203
-rw-r--r--Master/texmf-dist/source/latex/memoir/memoir.ins14
-rw-r--r--Master/texmf-dist/source/latex/memoir/mempatch.dtx107
-rw-r--r--Master/texmf-dist/source/latex/memoir/mempatch.ins14
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem10.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem11.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem12.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem14.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem17.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem20.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem25.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem30.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem36.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem48.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem60.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem9.clo8
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memhfixc.sty67
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memoir.cls547
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mempatch.sty6
25 files changed, 4234 insertions, 1675 deletions
diff --git a/Master/texmf-dist/doc/latex/memoir/README b/Master/texmf-dist/doc/latex/memoir/README
index f289e82b564..b4f5fb13ccd 100644
--- a/Master/texmf-dist/doc/latex/memoir/README
+++ b/Master/texmf-dist/doc/latex/memoir/README
@@ -6,21 +6,15 @@ normal fontsize and, if you have scalable fonts, 20pt, 25pt, 30pt, 36pt,
you create your particular design. The class incorporates over 30 of the
more popular packages.
- IF YOU HAVE ANY QUESTIONS PLEASE ASK THEM ON THE COMP.TEXT.TEX NEWSGROUP;
-YOU ARE LIKELY TO GET FASTER AND BETTER ANSWERS THAN IF YOU EMAIL (PETER)
-DIRECTLY AS (PETER) IS AWAY MORE OFTEN THAN NOT.
+ IF YOU HAVE ANY QUESTIONS PLEASE ASK THEM ON TEX.STACKEXCHANGE.COM
+ (PLEASE USE THE MEMOIR TAG) OR ON THE COMP.TEXT.TEX NEWSGROUP,
+ OR BY EMAIL TO THE MAINTAINER. PLEASE ADD MEMOIR TO THE SUBJECT.
-Lars Madsen <daleif+memoir@imf.au.dk> has taking over the support for memoir.
+ PLEASE DON'T WRITE PETER DIRECTLY AS HE IS AWAY MORE OFTEN THAN
+ NOT.
- NOTE: In order to provide fixes for any problems that may arise
-between major releases, you may find a file called mempatch.sty
-which contains any current fixes for the memoir class. The class
-will automatically include this so DO NOT \usepackage{mempatch}.
-The Change lists below do not neccessarily note each release of
-the patch or addendum files.
+Lars Madsen <daleif@imf.au.dk> has taking over the support for memoir.
- NOTE: Similarly, there may be file(s) called memmanadd.(tex|pdf) which
-provides amendments to the current version of the User Manual.
NOTE: If you are using the hyperref package dated earlier than 2006/11/15,
use the memhfixc package after the hyperref package, e.g.,
@@ -42,6 +36,84 @@ o Backmatter:
Bibliography, indexes ~ 50 pages
+Changed (2013/05/22)
+
+o memoir v3.7
+
+-- Emulated date for array package made to match the actual
+ package
+-- When ever the caption package is loaded we now reset
+ \abovecaptionskip to 10pt and \belowcaptionskip to 0pt
+ as in the default classes
+-- Typos in manual
+-- Fixed bug in \subbottom[]{...}. If an empty argument is given,
+ we will automatically eat the space after the (a)-part
+-- Fixed bug in \makeheadposition, the last two arguments was ignored,
+ now works as intended
+-- Removed \thanksfootextra from manual
+-- Factored the box part out of the various \<X>numberline macros
+-- The \cftXfont can now end with a macro taking one argument,
+ say \MakeTextUppercase
+-- Included a carbon copy of the textcase package by David Carlisle,
+ thus the class now provide the \MakeTextUppercase and
+ \MakeTextLowercase macros
+-- Default casing macro for the header information is now
+ \MakeTextUppercase not \MakeUppercase
+-- A hook is provided into \part, \book and \chapter which is executed
+ just before writing to the TOC. The hook is especially intended
+ when using the hyperref package and the layout dictates upper or
+ lower casing these titles in the TOC.
+-- All use of \MakeUppercase and \MakeLowercase in page styles,
+ chapter styles etc. have been changes into \MakeTextUppercase
+ and \MakeTextLowercase
+-- Added a sniplet showcasing an approach to auto adjust the numwidths
+ in the toc using calc and etoolbox
+-- Added titlingpage* which does not reset the page counter after the
+ env
+-- Added \mempreaddchaptertotochook and \mempostaddchaptertotochook
+ hooks, executed right before and right after \chapter writes to the
+ .toc file. It can be used to create a simple \chaptertoc command,
+ see sniplet appendix.
+ Added similarly named hooks to \part and \book, plus
+ \mempreaddapppagetotochook and \mempostaddapppagetotochook added to
+ \appendixpage
+-- Clarification about \maxtocdepth (turns out, it is not used in memoir),
+ related to http://tex.stackexchange.com/a/97018/3929
+-- Made sure \postchapterprecis include code such that the text after
+ \chapterprecis is indented in the same manner as it would just
+ after \chapter
+-- Added a hook at the very end of \chapter, could be used to add a
+ \clearpage or similar
+-- Added a remark about trimmarks vs. synctex.
+-- Fixed bug in \foottopagenote, now it works with \continuousnotenums
+-- Section on the \pagenotecommand moved to the chapter about page notes
+ (\footnote, \sidefootnote, \sidepar etc.)
+-- documented \cftKformatpnumhook, which could be used to auto adjust pnumwidth
+-- Added a hook enabling color change in the showlocs page style
+-- Workaround for colors leaking into paragraph footnotes (a proper
+ solution would involve fixing the color stack problem as in bigfoot)
+-- Subfloat counter reset factored out into macros, requested by Axel
+ Sommerfelt
+-- split \@makecaption into two, and inner (\@@makecaption) which
+ handles the formatting, and an outer (\@makecaption) handling the
+ space before and after
+-- longtable caption support, added only if the ltcaption package is
+ not loaded (either directly or indirectly).
+-- Added an autoadjustment feature for \marginparwidth (suggested by
+ Steffen V. Petersen), thus unless the user has used \setmarginnotes
+ a suitable choice for \marginparwidth is made.
+ More of these auto adjusting macros may be added later.
+-- rewritten how page notes are written to the .ent file
+-- added hyperref support to page notes
+
+
+o memhfixc v1.16
+
+-- restore footnote comma separation, when hyperfootnotes option is
+ active (default in current hyperref)
+-- make sure \@starttoc behave like ours, when running under hyperref
+
+
Changed (2011/03/06)
o memoir v3.6j
@@ -51,7 +123,7 @@ o memoir v3.6j
and \book such that a non-zero \parskip no longer interfer
with the title layout.
-- yet another fix for the reimplemented page notes. Now 'x x'
- only result in one line break not several.
+ only results in one line break not several.
@@ -129,15 +201,15 @@ Changes (2010/08/22)
o memoir v3.6f
--- a typo fix memoir in memoirs float handling got lost, this brings it
- back in line
+-- fixed a typo in memoirs float handling which caused floats to
+ become lost, this brings float handling back in line
Changes (2010/08/20)
o memoir v3.6e
-- changed \parnopar to make its changes inside a group
--- some clearifications in the manual
+-- some clarifications in the manual
o Memhfixc v1.15
@@ -153,7 +225,7 @@ Earlier changes are noted at the end.
-------------------------------------------------------------------
Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
Copyright 2001--2010 Peter R. Wilson
- Maintainer: Lars Madsen daleif+memoir at imf dot au dot dk
+ Maintainer: Lars Madsen daleif at imf dot au dot dk
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -263,7 +335,7 @@ o Memoir v3.6d
is no longer indented by default.
-- Fixed some typos in the manual and in the class
-- reorganized the manner by which we handle the memoir user
- manual. This enables us to add reversion numbers and dates to the
+ manual. This enables us to add revision numbers and dates to the
start of each chapter of the manual. Please note that these
revision numbers do not appear if one attempts to compile
memman.tex as it relies on a modified (and thus private) version of
@@ -275,7 +347,7 @@ o Memoir v3.6d
o Memhfixc v1.14
-- Brought memoir sections back in line with hyperref. Now a hyperlink
- to a section should end up above the section tilte, instead of below.
+ to a section should end up above the section title, instead of below.
Changes (2010/04/19)
@@ -283,7 +355,7 @@ Changes (2010/04/19)
o Memoir v3.6
-- reversioned memoir to version 3.6. The version number was tending
- towards the golden ration, but apparently this numeric value is
+ towards the golden ratio, but apparently this numeric value is
not widely known.
-- fixed \marginparmargin{left} in twoside mode
-- fixed a race condition in memhfixc
@@ -300,7 +372,7 @@ Changes (2010/02/17)
o Memoir v1.618033988b
--- fixed typo that broke \feetbelowfloats
+-- fixed typo that broke \feetbelowfloat
Changes (2010/02/16)
@@ -326,7 +398,7 @@ o Memoir v1.618033988
text now comes out flush up against the text.
-- added appendix about the picture environment. Apparently there is no
extensive freely available information about this environment. There
- is now. The chapter stem from an abandoned book project.
+ is now. The chapter stems from an abandoned book project.
-- extended the pagestyle changing macros such that they now warn if
the page style does not exist or if the page style is an alias
(trying to change an alias might lead to odd results)
@@ -350,7 +422,7 @@ o Memoir v1.61803398c
to be defined by the user. Now the user can simply define them to do
nothing if needed.
-- added visual example to the manual showing the four trim mark types
--- changed the madsen chapter style such that it now have a better
+-- changed the madsen chapter style such that it now has a better
unnumbered look
@@ -365,7 +437,7 @@ Changes (2009/09/10)
o Memoir v1.61803398
--- fixed bug with the upquotes package
+-- fixed bug with the upquote package
-- added support for the bidi package
-- added a simple page style
-- added feature to \newlistof such that \KeepFromToc will locally change say
@@ -479,9 +551,9 @@ o Memoir v1.6180339c released with minor bug fixes that could
<ltext> as a flushleft column, width <lfrac> of the textwidth, and <rtext>
as a flushright column, width <rfrac> of the textwidth, with
(1.0 - <lfrac> - <rfrac>) textwidth space between them. E.g.,
- \spring{0.4}{0.5}{On the left}{Right stuff}
+ \leftspringright{0.4}{0.5}{On the left}{Right stuff}
--- Following the declaration \linenottooshort{<length>} paragraphs will be set:
+-- Following the declaration \linenottooshort[<length>] paragraphs will be set:
As normal but the last line will not be shorter than <length> (default 4em)
-- Using \russianpar instead of \par to end a paragraph causes it to be set
@@ -559,7 +631,7 @@ o There was a mismatch between the general version of memman.pdf and the
o NO CHANGES TO THE CLASS
Changes (2008/06/02)
-o Memoir class v1.618033 released with bug fixes for \feetbelowfloats
+o Memoir class v1.618033 released with bug fixes for \feetbelowfloat
and sidebar layout for the larger font sizes.
o NO CHANGES TO THE USER MANUAL
@@ -785,3 +857,7 @@ o First public experimental alpha release
2009/08/23
Peter Wilson
herries dot press at earthlink dot net
+
+%%% Local Variables:
+%%% mode: text
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/memoir/memlays.sty b/Master/texmf-dist/doc/latex/memoir/memlays.sty
index ea7ba932dfb..030fbee8170 100644
--- a/Master/texmf-dist/doc/latex/memoir/memlays.sty
+++ b/Master/texmf-dist/doc/latex/memoir/memlays.sty
@@ -205,5 +205,163 @@
}
+\LMnote{2011/03/15}{We removed the \cs{parskip} effect on \cs{section}
+in one of the latest memoir versions, thus we need this to go away
+from the drawing}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% SECTIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewcommand{\drawheading}[1]{%
+ \l@yltoc{\textwidth}{\l@youthdi} % textwidth
+ \l@yltoc{\baselineskip}{\l@youtvdi} % baselineskip
+ \ifdrawparameters
+ \Huge \l@youtvdii=\baselineskip \normalsize % Heading baselineskip
+ \divide\l@youtvdii by \l@yonepoint
+ \l@yltoc{40pt}{\l@youtvpi} % beforeskip
+ \ifruninhead
+ \l@yltoc{-72pt}{\l@youtvpii} % afterskip
+ \l@yltoc{50pt}{\l@youthpi} % indent
+ \else
+ \l@yltoc{45pt}{\l@youtvpii} % afterskip
+ \l@yltoc{72pt}{\l@youthpi} % indent
+ \fi
+ \setbox0 = \hbox{{\Huge 3.5 Heading Title }}
+ \l@yltoc{\wd0}{\l@youthdv} % width of heading text
+ \else
+ {#1 \l@youtvdii=\baselineskip\normalfont\normalsize} % heading baselineskip
+ \divide\l@youtvdii by \l@yonepoint
+ \setbox0 = \hbox{{#1 3.5 Heading Title }}
+ \l@yltoc{\wd0}{\l@youthdv} % width of heading text
+ \fi
+ \l@youtvdiii=\l@youtvpii % afterskip + parskip + textbaselineskip
+ \advance\l@youtvdiii by \l@youtparskip
+ \advance\l@youtvdiii by \l@youtvdi
+ \l@youtvdiv=\l@youtvpi % beforeskip + parskip + headbaselineskip
+ \ifnum\l@youtvdiv < \z@
+ \l@youtvdiv = -\l@youtvdiv
+ \fi
+ \advance\l@youtvdiv by \l@youtparskip
+ \advance\l@youtvdiv by \l@youtvdii
+ \l@youtyci=\l@youtvdi % Y coord of base of after text
+ \l@youtycii=\l@youtyci % Y coord of base of heading text
+ \advance\l@youtycii by \l@youtvdiii
+ \l@youthdiv=\z@ % 0 or abs(-afterskip)
+ \ifnum\l@youtvpii < \z@
+ \l@youthdiv = -\l@youtvpii
+ \l@youtvdiii=\l@youtvdi % textbaselineskip
+ \l@youtxci=\l@youthpi % X coord of end of heading text
+ \advance\l@youtxci by \l@youthdv
+ \l@youtxcii=\l@youtxci % X coord of start of after text
+ \advance\l@youtxcii by \l@youthdiv
+ \l@youtycii=\l@youtvdi % Y coord of base of heading text
+ \fi
+ \l@youtyciii=\l@youtycii % Y coord of base of prior text
+ \advance\l@youtyciii by \l@youtvdiv
+ \l@youtyciv=\l@youtyciii % Y coord of top of prior text
+ \advance\l@youtyciv by \l@youtvdi
+ \l@youtycv=\l@youtyciv % 2*l@youtvdi + l@youtyciv
+ \advance\l@youtycv by \l@youtvdi
+ \advance\l@youtycv by \l@youtvdi
+ \l@youthdii=\l@youtvdi % a small amount
+ \l@youthdiii=\l@youthdii % half a small amount
+ \divide\l@youthdiii by \tw@
+ \begin{center}
+ \setlength{\unitlength}{\l@youtunitlength}
+ \begin{picture}(\l@youthdi,\l@youtycv)
+ \ifnum\l@youtvpii < \z@
+ \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv)
+ \put(0,0){\l@ylabelfont second line of text following the heading \ldots}
+ \ifdrawparameters
+ \put(\l@youthpi,\l@youtycii){{\Huge 3.5 Heading Title}}
+ \else
+ \put(\l@youthpi,\l@youtycii){{#1 3.5 Heading Title}}
+ \fi
+ \put(\l@youtxcii,\l@youtycii){\l@ylabelfont Start of text \ldots}
+ \put(0,\l@youtyciii){\l@ylabelfont \ldots end of last line of preceding text.}
+%% \ifdrawparameters
+ \testdrawdimensions
+ \ifl@ytempif
+ \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
+ \put(0,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
+ {\l@yparamfont \textit{$\|$beforeskip$\|$} +
+ \l@ypcmd{baselineskip}
+ (of heading font)}}
+ \end{picture}}
+ \put(0,\l@youtycii){\vector(1,0){\l@youthpi}}
+ \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdii,\l@youthdiii){\l@yparamfont \textit{indent}}
+ \end{picture}}
+ \put(\l@youtxci,\l@youtycii){\vector(1,0){\l@youthdiv}}
+ \put(\l@youtxci,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,\l@youthdii){\l@yparamfont \textit{afterskip} ($< 0$)}
+ \end{picture}}
+ \fi
+ \end{picture}}
+ \else
+ \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv)
+ \put(0,0){\l@ylabelfont second line of text following the heading \ldots}
+ \put(0,\l@youtyci){\l@ylabelfont This is the start of the after-heading text,
+ which continues on \ldots}
+ \ifdrawparameters
+ \put(\l@youthpi,\l@youtycii){{\Huge 3.5 Heading Title}}
+ \else
+ \put(\l@youthpi,\l@youtycii){{#1 3.5 Heading Title}}
+ \fi
+ \put(0,\l@youtyciii){\l@ylabelfont \ldots end of last line of preceding text.}
+%% \ifdrawparameters
+ \testdrawdimensions
+ \ifl@ytempif
+ \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
+ \put(0,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
+ {\l@yparamfont \textit{$\|$beforeskip$\|$} +
+ \l@ypcmd{baselineskip}
+ (of heading font)}}
+ \end{picture}}
+ \put(0,\l@youtycii){\vector(1,0){\l@youthpi}}
+ \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdii,\l@youthdiii){\l@yparamfont \textit{indent}}
+ \end{picture}}
+ \put(0,\l@youtycii){\vector(0,-1){\l@youtvdiii}}
+ \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
+ {\l@yparamfont \textit{afterskip} +
+ \l@ypcmd{baselineskip}
+ (of text font)}}
+ \end{picture}}
+ \fi
+ \end{picture}}
+ \fi
+ \put(0,0){\line(1,0){\l@youthdi}}
+ \put(0,\l@youtycv){\line(1,0){\l@youthdi}}
+ \end{picture}
+ \end{center}
+ \setlength{\unitlength}{1pt}
+%% \ifdrawparameters\else
+ \testprintparameters
+ \ifl@ytempif
+ \begin{center}
+ \begin{footnotesize}
+ Lengths are to the nearest pt. \\
+ \begin{ttfamily}
+ \begin{tabular}{l@{\hspace{20pt}}l}
+ \textit{beforeskip} = \number\l@youtvpi pt &
+ \textit{afterskip} = \number\l@youtvpii pt \\
+ \textit{indent} = \number\l@youthpi pt &
+ \textrm{(heading font)}
+ \l@ycmd{baselineskip} = \number\l@youtvdii pt \\
+ \l@ycmd{parskip} = \number\l@youtparskip pt &
+ \textrm{heading font} = \string#1 \\
+ \end{tabular}
+ \end{ttfamily}\end{footnotesize}
+ \end{center}
+ \fi
+}
+
+
+
\endinput
diff --git a/Master/texmf-dist/doc/latex/memoir/memman.pdf b/Master/texmf-dist/doc/latex/memoir/memman.pdf
index 0d0142bbc72..39f03cdbd39 100644
--- a/Master/texmf-dist/doc/latex/memoir/memman.pdf
+++ b/Master/texmf-dist/doc/latex/memoir/memman.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/memoir/memman.tex b/Master/texmf-dist/doc/latex/memoir/memman.tex
index 8b912a8607f..bc3492acfa4 100644
--- a/Master/texmf-dist/doc/latex/memoir/memman.tex
+++ b/Master/texmf-dist/doc/latex/memoir/memman.tex
@@ -4,6 +4,9 @@
% Author: Peter Wilson
% Copyright 2001, 2002, 2003, 2004, 2008, 2009 Peter R. wilson
%
+% This work has the LPPL maintenance status "maintained".
+% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%
%\listfiles
\documentclass[10pt,letterpaper,extrafontsizes]{memoir}
\listfiles
@@ -80,8 +83,8 @@
% \svnidlong
% {}
-% {$LastChangedDate: 2011-01-23 22:13:38 +0100 (Sun, 23 Jan 2011) $}
-% {$LastChangedRevision: 332 $}
+% {$LastChangedDate: 2013-04-26 18:44:39 +0200 (Fri, 26 Apr 2013) $}
+% {$LastChangedRevision: 447 $}
% {$LastChangedBy: daleif $}
@@ -117,7 +120,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%#% extend
-
+\usepackage[draft]{fixme}
+\fxsetup{
+ layout=marginnote
+}
+
\begin{document}
@@ -129,7 +136,7 @@
\tightlists
-%%%%\firmlists
+%\firmlists
\midsloppy
\raggedbottom
\chapterstyle{demo3}
@@ -178,8 +185,10 @@
\end{center}
\begin{center}
\LARGE\textsf{Peter Wilson}\par
-\medskip
+\bigskip
\normalsize\textsf{Maintained by Lars Madsen}\par
+\medskip
+\normalsize\textsf{Corresponding to \theclass\ version \memversion}\par
\end{center}
\vspace*{\fill}
\def\THP{T\kern-0.2em H\kern-0.4em P}% OK for CMR
@@ -202,6 +211,7 @@
\setlength{\parskip}{\baselineskip}
%%\ttfamily
\textcopyright{} 2001 --- 2010 Peter R. Wilson \\
+\textcopyright{} 2011 --- 2013 Lars Madsen \\
All rights reserved
The Herries Press, Normandy Park, WA.
@@ -314,8 +324,8 @@ Manual last changed \svnyear/\svnmonth/\svnday
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
\chapter{Preface}
@@ -569,7 +579,7 @@ have been made to both the class and this manual.
There are other more minor changes and extensions\footnote{With thanks
to, among others, Ignasi Furi\'{o} Caldentey (\url{ignasi@ipc4.uib.es}),
Daniel Richard G. (\url{skunk@mit.edu}) and
-Vladimir Ivanovic (\url{vladimir@acm.org}).}
+Vladimir G. Ivanovi\'c (\url{vladimir@acm.org}).}
which you may find if you recall the second edition.
\chapter{Introduction to the fourth edition}
@@ -706,7 +716,7 @@ Karl Berry,
Javier Bezos,
Sven Bovin,
Alan Budden,
-Ignasi Furi\'{o} Caldenty,
+Ignasi Furi\'{o} Caldentey,
Ezequiel Mart\'{\i}n C\'{a}mara,
David Carlisle,
Steven Douglas Cochran,
@@ -1238,8 +1248,8 @@ been answered.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-09-27 11:32:07 +0200 (Mon, 27 Sep 2010) $}
-{$LastChangedRevision: 282 $}
+{$LastChangedDate: 2013-05-21 16:33:04 +0200 (Tue, 21 May 2013) $}
+{$LastChangedRevision: 469 $}
{$LastChangedBy: daleif $}
\chapter{Introduction to the eighth edition}
@@ -1297,12 +1307,13 @@ this~\cite{MEMCODE}. However if you want to see exactly how some part,
or all of, \Mname\ is defined it is there for you to peruse.
The document you are now reading is the separate comprehensive
User Manual~\cite{MEMMAN} which runs to about 500 pages, and from time to
-time an Addendum~\cite{MEMADD} is released noting extensions to the class.
+time an Addendum %\cite{MEMADD}
+is released noting extensions to the class.\footnote{Currently not in use.}
Again, if you want to see how something was done in this Manual, which
of course was prepared using \Mname\ itself, the source
is available for you to read.
-There is also the \Lpack{memexsupp} package by Lars Madsen~\cite{MEMEXSUPP}
-which provides some extra facilities for the class.
+% There is also the \Lpack{memexsupp} package by Lars Madsen~\cite{MEMEXSUPP}
+% which provides some extra facilities for the class.
The previous editions of the Manual consisted of two parts. The first
discussing some aspects of book design and typography in
@@ -1765,7 +1776,7 @@ Javier Bezos,
Stefano Bianchi, % chaptersytyle
Sven Bovin,
Alan Budden,
-Ignasi Furi\'{o} Caldenty,
+Ignasi Furi\'{o} Caldentey,
Ezequiel Mart\'{\i}n C\'{a}mara,
David Carlisle, % code
Gustafo Cevolani,
@@ -1808,7 +1819,7 @@ Peter Heslin,
Timo Hoenig, % thank you letter
Morten H{\o}gholm, % code
Henrik Holm,
-Vladimir Ivanovich,
+Vladimir G. Ivanovi\'c,
Martin J{\o}rgensen, % bug report
Stefan Kahrs,
Christian Keil, % typos
@@ -1871,12 +1882,14 @@ David Wilson.
If I have inadvertently left anyone off the list I apologise,
and please let me know so that I can correct the
-omisssion.\footnote{Peter is currently occasionably reachable via email
-at \texttt{herries dot press (at) earthlink dot net}, otherwise write
-the maintainer at \texttt{daleif+memoir at imf dot au dot dk}}
-Along those lines, if you have any questions please direct them
-to the \url{comp.text.tex} newsgroup instead of directly to me as
-you are much more likely to get a satisfactory and timely response.
+omisssion.% \footnote{Peter is currently occasionably reachable via email
+% at \texttt{herries dot press (at) earthlink dot net}, otherwise write
+% the maintainer at \texttt{daleif at imf dot au dot dk}}
+\footnote{Please write the maintainer at \texttt{daleif at imf dot au
+ dot dk}} Along those lines, if you have any questions you may
+direct them to the \url{comp.text.tex} newsgroup or post them om
+\url{http://tex.stackexchange.com} as you are likely to get a
+satisfactory and timely response.
Of course, none of this would have been possible without Donald Knuth's
\tx\ system and the subsequent development of \ltx\ by Leslie Lamport.
@@ -1886,7 +1899,7 @@ you are much more likely to get a satisfactory and timely response.
\chapter{Remarks to the user}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \Lclass{memoir} gives you many ways to change the appearance of your
+ The \Lclass{memoir} class gives you many ways to change the appearance of your
document, and also provides some ready-made styles that might be
appropriate for your purposes.
@@ -1919,26 +1932,25 @@ As the years go by support for \Lclass{memoir} will devolve from one
person to another.\footnote{This is currently (July 2009) happening as
Lars Madsen is taking over from Peter Wilson.} Therefore it is
probably safer to ask questions, complain, make suggestions, etc., on
-the newsgroup called \url{comp.text.tex}, which is archived and read
-by many, than correspond directly with the maintainer, who might well
-be away for some considerable time and perhaps not notice your email
-after having returned to base.
+a Q\&A site like \url{http:://tex.stackexchange.com} or on the the
+newsgroup \url{comp.text.tex}, which is archived and read by many,
+than correspond directly with the maintainer, who might well be away
+for some considerable time and perhaps not notice your email after
+having returned to base.
-Then dealing with memoir issues on \url{comp.text.tex}, please include
-the word \texttt{memoir} in the subject. That will help the memoir
-maintainer keep track of memoir related matters.
-
-
-If you do not have access to \url{comp.text.tex} you may also email
-the current maintainer at \texttt{daleif+memoir at imf dot au dot dk}.
+In either case please include the word \texttt{\theclass} in the
+subject, and if possible, please \emph{tag} the question with the
+\texttt{\theclass} tag. That will help the memoir maintainer keep
+track of memoir related matters.
\fancybreak{}
-\textit{From the maintainer:} As I do not regularly read \LaTeX\
-related forums (like \url{www.latex-community.org} or
-\url{tex.stackexchange.com}), it will be a good idea to either write
-me directly or re-post the question on \url{comp.text.tex} if noone
-comes up with a suitable answer for questions involving \Lclass{memoir}.
+\textit{From the maintainer:} It seems that traffic on
+\url{comp.text.tex} is less frequent. So most \theclass\ related
+questions should go to \url{http:://tex.stackexchange.com}, please
+remember to tag them properly, that really helps locating the
+\theclass\ related questions. If no-one comes up with an answer, you
+can also write me directly via \texttt{daleif (at) imf dot au dot dk}.
@@ -1947,8 +1959,8 @@ comes up with a suitable answer for questions involving \Lclass{memoir}.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2153,8 +2165,8 @@ an em, often a quad is 1em.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-07-15 22:37:02 +0200 (Thu, 15 Jul 2010) $}
-{$LastChangedRevision: 256 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
\chapter{Starting off} \label{chap:starting}
@@ -2760,8 +2772,8 @@ want to put \cmd{\raggedbottom} in the preamble\index{preamble}.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2011-01-16 18:03:46 +0100 (Sun, 16 Jan 2011) $}
-{$LastChangedRevision: 329 $}
+{$LastChangedDate: 2013-05-16 17:28:08 +0200 (Thu, 16 May 2013) $}
+{$LastChangedRevision: 464 $}
{$LastChangedBy: daleif $}
\chapter{Laying out the page} \label{chap:layingpage}
@@ -3095,9 +3107,12 @@ columns.
%%%\DeleteShortVerb{\|}
\centering
\caption{Average characters per line} \label{tab:copyfitting}
-\begin{tabular}{r|rrrrrrrr} \hline
+\begin{tabular}{r !\quad rrrrrrrr} %|
+ \toprule
Pts. & \multicolumn{8}{c}{Line length in picas} \\
- & 10 & 14 & 18 & 22 & 26 & 30 & 35 & 40 \\ \hline
+\cmidrule{2-9}
+ & 10 & 14 & 18 & 22 & 26 & 30 & 35 & 40 \\
+\midrule
80 & \textit{40} & \textbf{56} & \textbf{72} & 88 & 104 & & & \\
85 & \textit{38} & \textit{53} & \textbf{68} & 83 & 98 & 113 & & \\
90 & \textit{36} & \textit{50} & \textbf{64} & 79 & 86 & 107 & & \\
@@ -3130,7 +3145,7 @@ Pts. & \multicolumn{8}{c}{Line length in picas} \\
300 & 12 & 17 & 21 & 26 & 31 & 35 & 41 & \textit{47} \\
320 & 11 & 16 & 20 & 25 & 29 & 34 & 39 & \textit{45} \\
340 & 10 & 15 & 19 & 23 & 27 & 32 & 37 & 42 \\
-\hline
+\bottomrule
\end{tabular}
%%%\MakeShortVerb{\|}
\end{table}
@@ -3359,6 +3374,16 @@ appearance as a spread\index{spread}, the spine margin\index{margin!spine}
is normally half the \foredge{} margin\index{margin!foredge?\foredge},
so that the white space is equally distributed around the sides of the text.
+\begin{note}
+ One will often find that using \cmd{\settypeblocksize} without
+ subsequent use of \cmd{\setlrmargins} and \cmd{\setulmargins} will
+ result in errors as the relationships mentioned above are not met
+ (the \lnc{\textwidth} has changed, but not the margins).
+
+ We may add auto adjustments to a later version of \theclass.
+\end{note}
+
+
There is more latitude in choosing the
proportions\index{proportion!margin}
of the upper and lower margins, though usually the upper
@@ -3610,6 +3635,14 @@ is calculated from $B_{h} = P_{h} - U - L$.
\end{tabular}
\end{table}
+\begin{note}
+ Readers may find several folio designs in \cite{MEMDESIGN}.
+\end{note}
+
+
+
+\fancybreak{}
+
\begin{syntax}
\cmd{\setcolsepandrule}\marg{colsep}\marg{thickness} \\
\end{syntax}
@@ -3766,7 +3799,20 @@ maximum width for a note, \lnc{\marginparwidth}, is set to \meta{width}
and the minimum vertical distance between notes, \lnc{\marginparpush},
is set to \meta{push}.
-\index{marginalia|)}
+\begin{note}
+ As of \theclass\ v3.6k, we have added an auto adjustment feature for
+ \lnc{\marginparwidth}, such that unless \cmd{\setmarginnotes} have
+ been used to make a specific choice, the \lnc{\marginparwidth} is
+ chosen according to the algorithm described in
+ Section~\ref{sec:auto-csmarg}. The algorithm relies on
+ \cmd{\marginparmargin} (if used) being set \emph{before}
+ \cmd{\checkandfixthelayout}.
+
+ We may add other auto adjusting features to future \theclass\ releases.
+\end{note}
+
+
+\index{marginalia|)} %|
\section{Putting it together}
@@ -3784,54 +3830,56 @@ modified.
The general process of setting up your own page layout\index{page layout}
is along these lines:
\begin{itemize}
-\item Decide on the required finished page\indextwo{page}{size} size,
- and pick a stock\indextwo{stock}{size} size that is at least as
- large as the page.
-\item Use \cmd{\setstocksize}\index{stock!specifying size} to set the
- values of \lnc{\stockheight}
- and \lnc{\stockwidth}, followed by \cmd{\settrimmedsize} to specify
- the values\ of \lnc{\paperheight} and \lnc{\paperwidth}.
-\item Decide on the location of the page\index{page!location} with respect
- to the stock\index{stock}. If the page and stock\index{stock} sizes
- are the same, then call \verb?\settrims{0pt}{0pt}?.
- If they are not the same size then decide on the appropriate
- values for \lnc{\trimtop} and \lnc{\trimedge} to position the page on
- the stock\index{stock}, and then set\index{trim!specifying} these
- through \cmd{\settrims}.
-\item Decide on the size of the typeblock\indextwo{typeblock}{size} and
- use \cmd{\settypeblocksize}\index{typeblock!specifying size}
- to specify the values of \lnc{\textheight} and \lnc{\textwidth}.
-\item If you need a binding\index{binding allowance} allowance,
- now is the time for \cmd{\setbinding}.
-\item Pick the value for the spine margin\index{margin!spine}, and use
- \cmd{\setlrmargins}\index{margin!specifying size}
- to set the values for the \lnc{\spinemargin} and \lnc{\foremargin}.
-
- An alternative sequence is to use \cmd{\setlrmarginsandblock} to
- set the \lnc{\textwidth} for a particular choice of side
- margins\index{margin}.
-
-\item Pick the value for the upper margin\index{margin!upper} and
- use \cmd{\setulmargins} to set the values\index{margin!specifying size}
- for the \lnc{\uppermargin} and \cmd{\lowermargin}.
-
- An alternative sequence is to use \cmd{\setulmarginsandblock} to
- set the \lnc{\textheight} for a particular choice of upper and
- lower margins\index{margin}.
-
- The typeblock is now located\index{typeblock!location} on the page.
+\item Decide on the required finished page\indextwo{page}{size} size,
+ and pick a stock\indextwo{stock}{size} size that is at least as
+ large as the page.
+\item If needed, use \cmd{\setstocksize}\index{stock!specifying size}
+ to set the values of \lnc{\stockheight} and \lnc{\stockwidth},
+ followed by \cmd{\settrimmedsize} to specify the values\ of
+ \lnc{\paperheight} and \lnc{\paperwidth}.
+
+ If you use and print on, say, A4, the \texttt{a4paper} class option
+ is enough, not \cmd{\setstocksize} needed.
+\item Decide on the location of the page\index{page!location} with
+ respect to the stock\index{stock}. If the page and
+ stock\index{stock} sizes are the same, then call
+ \verb?\settrims{0pt}{0pt}?. If they are not the same size then
+ decide on the appropriate values for \lnc{\trimtop} and
+ \lnc{\trimedge} to position the page on the stock\index{stock}, and
+ then set\index{trim!specifying} these through \cmd{\settrims}.
+\item Decide on the size of the typeblock\indextwo{typeblock}{size}
+ and use \cmd{\settypeblocksize}\index{typeblock!specifying size} to
+ specify the values of \lnc{\textheight} and \lnc{\textwidth}.
+\item If you need a binding\index{binding allowance} allowance, now is
+ the time for \cmd{\setbinding}.
+\item Pick the value for the spine margin\index{margin!spine}, and use
+ \cmd{\setlrmargins}\index{margin!specifying size} to set the values
+ for the \lnc{\spinemargin} and \lnc{\foremargin}.
+
+ An alternative sequence is to use \cmd{\setlrmarginsandblock} to set
+ the \lnc{\textwidth} for a particular choice of side
+ margins\index{margin}.
+
+\item Pick the value for the upper margin\index{margin!upper} and use
+ \cmd{\setulmargins} to set the values\index{margin!specifying size}
+ for the \lnc{\uppermargin} and \cmd{\lowermargin}.
+
+ An alternative sequence is to use \cmd{\setulmarginsandblock} to set
+ the \lnc{\textheight} for a particular choice of upper and lower
+ margins\index{margin}.
+
+ The typeblock is now located\index{typeblock!location} on the page.
\item Pick the values for the \lnc{\headheight} and \lnc{\footskip}
- and use \cmd{\setheadfoot}\index{header!specifying size}
- to specify these.
+ and use \cmd{\setheadfoot}\index{header!specifying size} to specify
+ these.
-\item Pick your value for \cmd{\headskip} and use \cmd{\setheaderspaces}
- to set this and \lnc{\headmargin}.
+\item Pick your value for \cmd{\headskip} and use
+ \cmd{\setheaderspaces} to set this and \lnc{\headmargin}.
-\item If you are going to have any marginal\index{marginalia} notes,
- use \cmd{\setmarginnotes}
- to specify the values for \lnc{\marginparsep}, \lnc{\marginparwidth}
- and \lnc{\marginparpush}.
+\item If you are going to have any marginal\index{marginalia} notes,
+ use \cmd{\setmarginnotes} to specify the values for
+ \lnc{\marginparsep}, \lnc{\marginparwidth} and \lnc{\marginparpush}.
\end{itemize}
@@ -3943,7 +3991,7 @@ the adjusted value, and using integer arithmetic.\footnote{In this context
`integer arithmetic' means that the result of a division will be rounded down.
For example $99/10$ in `real arithmetic' results in $9.9$, whereas with
integer arithmetic the result is 9, not 10.}
-The permissable values for \meta{algorithm} are:
+The permissible values for \meta{algorithm} are:
\begin{itemize}
\item[\texttt{fixed}] The \lnc{\textheight} is not altered.
\begin{equation} T = H \end{equation}
@@ -3952,14 +4000,20 @@ for \cmd{\flushbottom} pages.
\item[\texttt{classic}] This is the default and is the one used by the standard
classes.
\begin{equation} T = b \lfloor H/b \rfloor + t \end{equation}
-The relationship (\ref{eq:heightlines}) is maintained.
+The relationship (\ref{eq:heightlines}) is maintained. This algorithm
+gets as close to $H$ as possible from below.
\item[\texttt{lines}] This is similar to \texttt{classic}, but results in a
smaller final value.
\begin{equation} T = b \lfloor (H-b)/b \rfloor + t \end{equation}
The relationship (\ref{eq:heightlines}) is maintained.
\item[\texttt{nearest}] The calculated value is the nearest to the given value
while still maintaining the relationship (\ref{eq:heightlines}).
-\begin{equation} T = b \lfloor (H - t + b/2)/b \rfloor + t \end{equation}
+\begin{equation}
+ T = b \lfloor (H - t + b/2)/b \rfloor + t
+\end{equation}
+In contrast to \texttt{classic}, \texttt{nearest}
+will get as close to $H$ as possible even if this means that $T$ ends
+up being slightly larger than $H$.
\end{itemize}
\begin{table}
@@ -4005,7 +4059,8 @@ the following in a page layout specification:
The \cmd{\fixthelayout} macro finally implements the layout,
making due adjustement for any binding\index{binding allowance} allowance,
and calculates the values for all the standard \ltx\ layout
-parameters\index{page layout!LaTeX parameters?\ltx\ parameters}.
+parameters\index{page layout!LaTeX parameters?\ltx\ parameters} (such
+that packages can use these expected values).
If you have used the class macros to change
the layout in any way, you must call \cmd{\checkandfixthelayout} after you have
made all the necessary changes. As an aid, the final layout parameter values
@@ -4051,7 +4106,7 @@ information about the units.
In \Lopt{twoside} printing the spine margin is normally the same on
both recto and verso pages and, unless the spine and \foredge{} margins are the
same, the typeblock is shifted side to side when printing the recto and
-verso pages. Additionaly you can have different headers and footers for the
+verso pages. Additionally you can have different headers and footers for the
recto and verso pages. However, in \Lopt{oneside} printing the typeblock
is not moved and the headers and footers are the same for both odd and
even pages.
@@ -4513,8 +4568,8 @@ effect.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2011-03-06 19:39:20 +0100 (Sun, 06 Mar 2011) $}
-{$LastChangedRevision: 360 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
@@ -5643,13 +5698,192 @@ a single line of a paragraph somehow looks worse at the top of a page than
at the bottom. If all else fails, the solution is either to live with the
odd line or to reword the text.
+\section{Text case}
+\label{sec:text-case}
+
+The standard kernel \cmd{\MakeUppercase}\marg{text} and
+\cmd{\MakeLowercase}\marg{text}
+basically upper or lower case everything it can get its hands on. This
+is not particularly nice if the \meta{text} contain, say, math.
+
+In order to help with this we provide the \cmd{\MakeTextUppercase} and
+\cmd{\MakeTextLowercase} macros from the \Lpack{textcase} package
+(\cite{textcase}) by David Carlisle. The following is DCs own
+documentation of the provided code changed to match the typography we
+use.
+
+\fancybreak{}
+
+\begin{syntax}
+ \cmd{\MakeTextUppercase}\marg{text}\\
+ \cmd{\MakeTextLowercase}\marg{text}
+\end{syntax}
+\glossary(MakeTextUppercase)
+ {\cs{MakeTextUppercase}\marg{text}}
+ {Upper case \meta{text} by leave math, references, citations and
+ \cs{NoCaseChange}\marg{text} alone.}
+\glossary(MakeTextLowercase)
+ {\cs{MakeTextLowercase}\marg{text}}
+ {Lower case \meta{text} by leave math, references, citations and
+ \cs{NoCaseChange}\marg{text} alone.}
+\cmd{\MakeTextUppercase} and \cmd{\MakeTextLowercase} are versions of
+the standard \cmd{\MakeUppercase} and \cmd{\MakeLowercase} that do not
+change the case of any math sections in their arguments.
+\begin{verbatim}
+\MakeTextUppercase{abc\ae\ \( a = b \) and $\alpha \neq a$
+ or even \ensuremath{x=y} and $\ensuremath{x=y}$}
+\end{verbatim}
+Should produce:
+\begin{quotation}
+ ABC\AE\ \( a = b \) AND $\alpha \neq a$
+ OR EVEN \ensuremath{x=y} AND $\ensuremath{x=y}$
+\end{quotation}
+
+We incorporates some changes suggested by Donald Arseneau so that as
+well as math mode, the arguments of \cmd{\cite}, \cmd{\label} and
+\cmd{\ref} are also prevented from being uppercased. So you can now
+go
+\begin{verbatim}
+\MakeTextUppercase{%
+ Text in section~\ref{sec:text-case}, about \cite[pp 2--4]{textcase}}
+\end{verbatim}
+which produces
+\begin{quotation}
+\MakeTextUppercase{%
+ Text in section~\ref{sec:text-case}, about \cite[pp 2--4]{textcase}}
+\end{quotation}
+If, instead, the standard \cmd{\MakeUppercase} were used here, the keys
+`sec:text-case' and `textcase' would be uppercased and generate errors about
+undefined references to SEC:TEXT-CASE and TEXTCASE.
+
+\begin{syntax}
+ \cmd{\NoCaseChange}\marg{text}
+\end{syntax}
+\glossary(NoCaseChange)
+ {\cs{NoCaseChange}\marg{text}}
+ {The argument of this macro is not touched by \cs{MakeTextUppercase}
+ or \cs{MakeTextLowercase}.}
+Sometimes there may be a special section of text that should not be
+uppercased. This can be marked with \cmd{\NoCaseChange}, as follows.
+\begin{verbatim}
+\MakeTextUppercase{%
+ Text \NoCaseChange{More Text} yet more text}
+\end{verbatim}
+which produces
+\begin{quotation}
+\MakeTextUppercase{%
+ Text \NoCaseChange{More Text} yet more text}
+\end{quotation}
+
+\cmd{\NoCaseChange} has other uses. If for some reason you need a
+tabular environment within an uppercased section, then you need
+to ensure that the name `tabular' and the preamble (eg `ll')
+does not get uppercased:
+\begin{verbatim}
+\MakeTextUppercase{%
+ Text \NoCaseChange{\begin{tabular}{ll}}%
+ table&stuff\\goes&here
+ \NoCaseChange{\end{tabular}}
+ More text}
+\end{verbatim}
+which produces
+\begin{quotation}
+\MakeTextUppercase{%
+ Text \NoCaseChange{\begin{tabular}{ll}}%^^A
+ table&stuff\\goes&here
+ \NoCaseChange{\end{tabular}}
+ More text}
+\end{quotation}
+
+\subsection{Nested text}
+The commands defined here only skip math sections and \cmd{\ref} arguments
+if they are not `hidden' inside a \verb|{ }| brace group. All text inside
+such a group will be made uppercase just as with the standard
+\cmd{\MakeUppercase}.
+\begin{verbatim}
+\MakeTextUppercase{a b {c $d$} $e$}
+\end{verbatim}
+produces
+\begin{quotation}
+ \MakeTextUppercase{a b {c $d$} $e$}
+\end{quotation}
+Of course, this restriction does not apply to the arguments of the
+supported commands \verb|\ensuremath|, \verb|\label|, \verb|\ref|, and
+\verb|\cite|.
+
+If you cannot arrange for your mathematics to be at the outer level of
+brace grouping, you should use the following basic technique (which
+works even with the standard \cmd{\MakeUppercase} command). Define a
+new command that expands to your math expression, and then use that
+command, with \cmd{\protect}, in the text to be uppercased. Note that
+if the text being uppercased is in a section title or other moving
+argument you may need to make the definition in the document preamble,
+rather than just before the section command, so that the command is
+defined when the table of contents file is read.
+\begin{verbatim}
+\MakeTextUppercase{%
+ Text \fbox{$a=b$ and $x=y$}}%
+
+\newcommand{\mathexprone}{$a=b$}
+\newcommand{\mathexprtwo}{$x=y$}
+\MakeTextUppercase{%
+ Text \fbox{\protect\mathexprone\ and \protect\mathexprtwo}}%
+\end{verbatim}
+which produces
+\begin{quotation}
+\MakeTextUppercase{%
+ Text \fbox{$a=b$ and $x=y$}}%
+
+\newcommand{\mathexprone}{$a=b$}
+\newcommand{\mathexprtwo}{$x=y$}
+\MakeTextUppercase{%
+ Text \fbox{\protect\mathexprone\ and \protect\mathexprtwo}}%
+\end{quotation}
+
+
+\fancybreak{}
+
+See also \cite{textcase} for some information about upper casing
+citations using a non-nummeric style.
+
+
+% \subsubsection{Citations}
+% As documented above, \cmd{\cite} and \cmd{\ref} commands are not
+% uppercased by \cmd{\MakeTextUppercase}. If you are using a non-numeric
+% citation scheme you may want the replacement text for \cmd{\cite} to
+% be uppercased.
+
+% It is difficult to arrange that \cmd{\MakeTextUppercase} uppercases
+% such text, not least because this would lead to interaction with the
+% many bibliography packages which redefine \cmd{\cite} one way or
+% another. One possibility to achieve this is to use Donald Arseneau's
+% cite package and to locally redefine \cmd{\citeform} to add
+% \cmd{\MakeUppercase} around the final text string produced by \cmd{\cite}.
+% \begin{verbatim}
+% \MakeTextUppercase{%
+% Text \cite{bbb} and \cite{ccc}}
+
+% {\renewcommand\citeform{\MakeUppercase}\MakeTextUppercase{%
+% Text \cite{bbb} and \cite{ccc}}}
+% \end{verbatim}
+% which produces\footnote{This is faked, so this document does not
+% rely on \texttt{cite.sty} being installed}
+% \begin{quotation}
+% TEXT [1] AND [David Carlisle 1997]
+
+% TEXT [1] AND [DAVID CARLISLE 1997]
+% \end{quotation}
+
+
+
+
%#% extend
%#% extstart include titles.tex
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
@@ -5983,10 +6217,14 @@ in the argument to the new \cmd{\published} command.
\begin{syntax}
\senv{titlingpage} text \eenv{titlingpage} \\
+\senv{titlingpage*} text \eenv{titlingpage*}
\end{syntax}
\glossary(titlingpage)%
{\senv{titlingpage}}%
- {Environment for a title page, but I don't recommend using it.}
+ {Environment for a title page, resets the page counter to 1 after it}
+\glossary(titlingpage*)%
+ {\senv{titlingpage*}}%
+ {Like \senv{titlingpage}, but does not reset the page counter.}
When one of the standard classes is used with the \Lopt{titlepage}
option, \cmd{\maketitle} puts the title elements on an unnumbered page
and then starts a new page numbered page 1.
@@ -6003,7 +6241,8 @@ environment which falls between the \Lopt{titlepage}
option and the \Ie{titlepage} environment. Within the \Ie{titlingpage}
environment you can use the \cmd{\maketitle} command, and any others
you wish. The \pstyle{titlingpage} pagestyle is used, and
-at the end it starts another ordinary page numbered one.
+at the end it starts another ordinary page numbered one
+(\senv{titlingpage*} does note reset the page number).
The \pstyle{titlingpage} pagestyle is initially defined to be the same
as the \pstyle{empty} pagestyle.
@@ -6020,9 +6259,9 @@ with a \pstyle{plain} pagestyle:
\end{titlingpage}
\end{lcode}
- However, I suggest that you ignore the \Ie{titlingpage} environment
-and just use regular \ltx\ typesetting without any special environment.
-That is like:
+However, it is not required to use \senv{titlingpage} to create a
+title page, you can use regular \ltx\ typesetting without any special
+environment. That is like:
\begin{lcode}
\pagestyle{empty}
%%% Title, author, publisher, etc., here
@@ -6321,17 +6560,32 @@ setting is the initialised value, giving the default appearance.
{Typesets a thanks mark at the foot.}
A thanks mark in the footnote\index{footnote} region is typeset by \cmd{\thanksfootmark}.
The code for this is roughly:
+\LMnote{2012/07/02}{Text changed to reflect the actual code}
\begin{lcode}
\newcommand{\thanksfootmark}{%
\hbox to\thanksmarkwidth{\hfil\normalfont%
- \thanksscript{\thanksfootpre \thefootnote \thanksfootpost}}}
+ \thanksscript{\thefootnote}}}
\end{lcode}
-where \cmd{\thanksfootpre} and \cmd{\thanksfootpost} are specified via the
-\cmd{\thanksfootextra} macro. You should not need to change the definition
+You should not need to change the definition
of \cmd{\thanksfootmark}
but you may want to change the default definitions of one or more
of the macros it uses.
+\begin{syntax}
+\cmd{\thanksscript}\marg{text} \\
+\end{syntax}
+\glossary(thanksfootmark)%
+ {\cs{thanksfootmark}}%
+ {Handle the inner part of the thanks mark at the foot.}
+This is initially defined as:
+\begin{lcode}
+\newcommand{\thanksscript}[1]{\textsuperscript{#1}}
+\end{lcode}
+so that \cmd{\thanksscript} typesets its argument as a superscript, which
+is the default for thanks notes.
+
+
+
\begin{comment}
\begin{syntax}
@@ -6481,8 +6735,8 @@ and thanks notes are meant to be different.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
\chapter{Abstracts}
@@ -6752,8 +7006,8 @@ optional argument of the \cmd{\twocolumn} command. In fact,
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2011-02-06 17:15:11 +0100 (Sun, 06 Feb 2011) $}
-{$LastChangedRevision: 342 $}
+{$LastChangedDate: 2013-05-13 16:55:11 +0200 (Mon, 13 May 2013) $}
+{$LastChangedRevision: 459 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -6846,6 +7100,7 @@ starts at the next coming recto page. (Even when running under the
\texttt{openany} option).
+
\begin{syntax}
\cmd{\backmatter} \\
\end{syntax}
@@ -6865,10 +7120,10 @@ main- or backmatter, then you can change some internals to add these
to be numbered in the same manner as we do with figures and
tables. They are defined as
\begin{lcode}
- \newcommand\@memfront@floats{%
+\newcommand\@memfront@floats{%
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}}
-\newcommand\@memmain@floats{%
+\newcommand\@memmain@floats{%
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}}
\newcommand\@memback@floats{%
@@ -6877,6 +7132,20 @@ tables. They are defined as
\setcounter{figure}{0}
\setcounter{table}{0}}
\end{lcode}
+%
+The macros can also be changed in case you want to have consecutive
+figure numbering throughout, i.e.,
+\begin{lcode}
+\makeatletter
+\counterwithout{figure}{chapter}
+\counterwithout{table}{chapter}
+\renewcommand\@memfront@floats{}
+\renewcommand\@memmain@floats{}
+\newcommand\@memback@floats{}
+\makeatletter
+\end{lcode}
+in the preamble.
+
@@ -7026,6 +7295,7 @@ the bottom of the typeblock.
\cmd{\raggedbottomsection} \\
\cmd{\normalbottomsection} \\
\lnc{\bottomsectionskip} \\
+\cmd{\bottomsectionpenalty}
\end{syntax}
\glossary(raggedbottomsection)%
{\cs{raggedbottomsection}}%
@@ -7037,12 +7307,20 @@ the bottom of the typeblock.
\glossary(bottomsectionskip)%
{\cs{bottomsectionskip}}%
{Amount of stretch on a \cs{raggedbottomsection} short page.}
+\glossary(bottomsectionpenalty)%
+ {\cs{bottomsectionpenalty}}%
+ {Penalty on a \cs{raggedbottomsection} short page.}
The \cmd{\raggedbottomsection} declaration will typeset any pages that
are short because of a moved subhead as though \cmd{\raggedbottom}
was in effect for the short page; other pages are not affected. The
length \lnc{\bottomsectionskip} controls the amount of stretch on the short
page. Setting it to zero allows the last line to be flush with the bottom
-of the typeblock. The default setting of 10mm appears to remove any stretch.
+of the typeblock. The default setting of 10mm appears to remove any
+stretch. \cmd{\bottomsectionpenalty} control the penalty it costs to
+make a page break at this point. The detault is zero as the stretch is
+usually enough, by setting it to
+a negative integer one can be a bit more incouraging regarding a
+possible page break.
The declaration \cmd{\normalbottomsection}, which is the default,
cancels any previous \cmd{\raggedbottomsection} declaration.
@@ -7149,12 +7427,12 @@ in the body of the document will be preceded by the value of
default, may be used to switch off this behaviour.
\LMnote{2010/11/19}{Added this caveat, following a question on ctt}
-\textbf{Caveat:} The inplementation of the named subappencides make
+\textbf{Caveat:} The implementation of the named subappendices make
use of \cmd{\setsecnumformat}, thus if you have used this command to
-change the formating of the section number you will need to re-do this in
-a special nammer inside the \Ie{subappencides} environemt. Something
-like this (where a user wanted to use old style numerials for
-sectioning numbers)
+change the formating of the section number you will need to re-do this
+in a special manner inside the \Ie{subappendices}
+environemt. Something like this (where a user wanted to use old style
+numerials for sectioning numbers)
\begin{verbatim}
\begin{subappendices}
\setsecnumformat{\sectionname\
@@ -7595,7 +7873,7 @@ wish to capture the \meta{title} to use in running headers.
\section{Chapter headings}
-
+\label{sec:chapter-headings}
\index{heading!chapter|(}
The chapter headings are configurable in much the same way as book or part
@@ -7665,13 +7943,33 @@ The general layout is shown in \fref{lay:chap}.
{\cs{clearforchapter}}%
{Selects a chapter's opening page.}
The actual macro that sets the opening page for a chapter is
-\cmd{\clearforchapter}. The \cmd{\openright}, \cmd{\openleft} and
-\cmd{\openany} define \cmd{\clearforchapter} to be respectively
+\cmd{\clearforchapter}. The class options \texttt{openright},
+\texttt{openleft} and \texttt{openany} (or their macro equivalents
+\cmd{\openright}, \cmd{\openleft} and
+\cmd{\openany}) define \cmd{\clearforchapter} to be respectively
(see \S\ref{sec:moving})
\cmd{\cleartorecto}, \cmd{\cleartoverso} and \cmd{\clearpage}. You can
obviously change \cmd{\clearforchapter} to do more than just start a
new page.
+\begin{syntax}
+\cmd{\memendofchapterhook}
+\end{syntax}
+\glossary(memendofchapterhook)%
+ {\cs{memendofchapterhook}}%
+ {Hook executed at the very end of the \cs{chapter} command.}
+Where \cmd{\clearforchapter} comes at the very beginning,
+\cmd{\memendofchapterhook} comes at the very end of the \cmd{\chapter}
+command. It does nothing by default, but could be redefined to insert,
+say, \cmd{\clearpage}:
+\begin{verbatim}
+\makeatletter
+\renewcommand\memendofchapterhook{%
+ \clearpage\m@mindentafterchapter\@afterheading}
+\makeatother
+\end{verbatim}
+
+
Some books have the chapter headings on a verso page, with perhaps
an illustration\index{illustration} or epigraph\index{epigraph}, and
then the text starts on the opposite
@@ -7892,13 +8190,15 @@ headings style. To use the chapterstyle \cstyle{fred} just issue the command
Different styles can be used in the same document.
The simpler predefined styles include:
+\LMnote{2011/05/25}{I've moved the chapter style images to the
+ showcase appendix to save some space in the main part of the manual}
\begin{itemize}
\item[\cstyle{default}]
\glossary(defaultcs)%
{\Pcstyle{default}}%
{The default \Ppack{book} class chapterstyle.}
The normal \ltx\ \Lclass{book} class chapter styling; shown in \fref{dcdefault}.
-\begin{demochap}[-3\onelineskip]{default}\end{demochap}
+%\begin{demochap}[-3\onelineskip]{default}\end{demochap}
\item[\cstyle{section}]
\glossary(sectioncs)%
@@ -7908,7 +8208,7 @@ The heading is typeset like a section; that is,
there is just the number and the title on one line. This is illustrated
in \fref{dcsection}.
%% See \Cref{chap:topsandtails} on \pref{chap:topsandtails} for an example.
-\begin{demochap}[2\onelineskip]{section}\end{demochap}
+%\begin{demochap}[2\onelineskip]{section}\end{demochap}
\item[\cstyle{hangnum}]
\glossary(hangnumcs)%
@@ -7917,7 +8217,7 @@ in \fref{dcsection}.
Like the \pstyle{section} style except that the chapter
number is put in the margin\index{margin!left}, as shown in \fref{dchangnum}.
%% See \Cref{chap:captions} on \pref{chap:captions} for an example.
-\begin{demochap}[2\onelineskip]{hangnum}\end{demochap}
+%\begin{demochap}[2\onelineskip]{hangnum}\end{demochap}
\item[\cstyle{companion}]
\glossary(companioncs)%
@@ -7926,7 +8226,7 @@ number is put in the margin\index{margin!left}, as shown in \fref{dchangnum}.
This produces chapter headings like those of the
\textit{LaTeX Companion} series of books. An example is in \fref{dccompanion}.
%% See \Cref{chap:signposts} on \pref{chap:signposts} for an example.
-\begin{demochap}[2\onelineskip]{companion}\end{demochap}
+%\begin{demochap}[2\onelineskip]{companion}\end{demochap}
\item[\cstyle{article}]
\glossary(articlecs)%
@@ -7938,7 +8238,7 @@ number is put in the margin\index{margin!left}, as shown in \fref{dchangnum}.
heading in the \Lclass{article} class. This is similar to the
\cstyle{section} style but different fonts and spacings are used,
as shown in \fref{dcarticle}.
-\begin{demochap}[-1\onelineskip]{article}\end{demochap}
+%\begin{demochap}[-1\onelineskip]{article}\end{demochap}
\item[\cstyle{reparticle}]
\glossary(reparticlecs)%
@@ -8111,6 +8411,8 @@ styles~\cite{CHAPSTYLES} and shows how they were created.
\cstyle{default} style before each of the others to ensure that a previous
style's changes are not passed on to a following one.
+\LMnote{2011/05/25}{I've moved the chapter style images to the
+ showcase appendix to save some space in the main part of the manual}
\begin{itemize}
\item[\cstyle{bianchi}]
@@ -8126,7 +8428,7 @@ style's changes are not passed on to a following one.
is in \fref{dcbianchi}.
%\begin{demochap}[2\onelineskip]{bianchi}\end{demochap}
-\begin{demochap}[-2\onelineskip]{bianchi}\end{demochap}
+%\begin{demochap}[-2\onelineskip]{bianchi}\end{demochap}
\item[\cstyle{bringhurst}] The \cstyle{bringhurst} chapterstyle described
in the manual and illustrated in \fref{dcbringhurst}.
@@ -8135,7 +8437,7 @@ is in \fref{dcbianchi}.
{A raggedright, unnumbered, small caps chapterstyle with a textwidth
rule below.}
-\begin{demochap}{bringhurst}\end{demochap}
+%\begin{demochap}{bringhurst}\end{demochap}
\item[\cstyle{brotherton}]
@@ -8152,7 +8454,7 @@ except that the number is spelt out in words. It is demonstrated in
untitled i.e., via \verb?\chapter{}?.
%\begin{demochap}[2\onelineskip]{brotherton}\end{demochap}
-\begin{demochap}[-2\onelineskip]{brotherton}\end{demochap}
+%\begin{demochap}[-2\onelineskip]{brotherton}\end{demochap}
\item[\cstyle{chappell}]
@@ -8164,8 +8466,7 @@ The name and number are centered above a rule and the
title in italics is below, again centered. It is illustrated in
\fref{dcchappell}.
-\begin{demochap}{chappell}
-\end{demochap}
+%\begin{demochap}{chappell}\end{demochap}
\item[\cstyle{crosshead}]
\glossary(crossheadcs)%
@@ -8175,9 +8476,7 @@ The number and title are centered and set with a large bold font.
It is illustrated in
\fref{dccrosshead}.
-\begin{demochap}[-2\onelineskip]{crosshead}
-\end{demochap}
-
+%\begin{demochap}[-2\onelineskip]{crosshead}\end{demochap}
\item[\cstyle{culver}]
@@ -8204,7 +8503,7 @@ as shown in \fref{dcculver}.
}
\end{comment}
-\begin{demochap}[-\onelineskip]{culver}\end{demochap}
+%\begin{demochap}[-\onelineskip]{culver}\end{demochap}
He also wanted sections to just start with the number and the text to
immediately follow on the same line. That can be accomplished like this:
@@ -8228,7 +8527,7 @@ version of the regular font is used for both the number and the title.
This style is shown in \fref{dcdash}.
%\begin{demochap}[-2\onelineskip]{dash}\end{demochap}
-\begin{demochap}[-4\onelineskip]{dash}\end{demochap}
+%\begin{demochap}[-4\onelineskip]{dash}\end{demochap}
%\item[\cstyle{default}] This was already in the class but it has been revised
% to re-initialize all the settings.
@@ -8249,7 +8548,7 @@ This style is shown in \fref{dcdash}.
%\begin{demochap}[-2\onelineskip]{demo2}\end{demochap}
-\begin{demochap}[-\onelineskip]{demo2}\end{demochap}
+%\begin{demochap}[-\onelineskip]{demo2}\end{demochap}
\item[\cstyle{demo3}]
\glossary(demo3cs)%
@@ -8273,8 +8572,7 @@ is based on the design used in Dowding's \textit{Finer Points}~\cite{DOWDING96}.
It is illustrated in
\fref{dcdowding}.
-\begin{demochap}[-2\onelineskip]{dowding}
-\end{demochap}
+%\begin{demochap}[-2\onelineskip]{dowding}\end{demochap}
\item[\cstyle{ell}]
@@ -8289,7 +8587,7 @@ It is illustrated in
I will probably use this in my next book.
%\begin{demochap}[6\onelineskip]{ell}\end{demochap}
-\begin{demochap}{ell}\end{demochap}
+%\begin{demochap}{ell}\end{demochap}
\item[\cstyle{ger}]
\glossary(gercs)%
@@ -8299,11 +8597,11 @@ I will probably use this in my next book.
This style was created by
Gerardo\index{Garcia, Gerardo} Garcia\footnote{\ctt,
\textit{Fancy Headings, Chapter Headings}, 2002/04/12} and is a two line,
- raggedleft, large bold style with rules above and below. It is
+ raggedright, large bold style with rules above and below. It is
demonstrated in \fref{dcger}.
%\begin{demochap}{ger}\end{demochap}
-\begin{demochap}[-4\onelineskip]{ger}\end{demochap}
+%\begin{demochap}[-4\onelineskip]{ger}\end{demochap}
\item[\cstyle{komalike}]
\glossary(komalikecs)%
@@ -8314,8 +8612,8 @@ A section-like style set with a sans serif type. It is like that in the
It is illustrated in
\fref{dckomalike}.
-\begin{demochap}[-2\onelineskip]{komalike}
-\end{demochap}
+%\begin{demochap}[-2\onelineskip]{komalike}\end{demochap}
+
\item[\cstyle{lyhne}]
\glossary(lyhnecs)%
@@ -8330,7 +8628,7 @@ It is illustrated in
the \Lpack{graphicx} package.
%\begin{demochap}[-\onelineskip]{lyhne}\end{demochap}
-\begin{demochap}[-2\onelineskip]{lyhne}\end{demochap}
+%\begin{demochap}[-2\onelineskip]{lyhne}\end{demochap}
\item[\cstyle{madsen}]
\glossary(madsencs)%
@@ -8347,7 +8645,7 @@ It is illustrated in
\Lpack{graphicx} package.
%\begin{demochap}[2\onelineskip]{madsen}\end{demochap}
-\begin{demochap}[-2\onelineskip]{madsen}\end{demochap}
+%\begin{demochap}[-2\onelineskip]{madsen}\end{demochap}
\item[\cstyle{ntglike}]
\glossary(ntglikecs)%
@@ -8358,8 +8656,7 @@ classes (\Lclass{boek} class) developed by the Dutch \tx\ User Group.
It is illustrated in
\fref{dcntglike}.
-\begin{demochap}[-3\onelineskip]{ntglike}
-\end{demochap}
+%\begin{demochap}[-3\onelineskip]{ntglike}\end{demochap}
@@ -8391,7 +8688,7 @@ It is illustrated in
paragraph, and with a horizontal rule underneath. It is illustrated
in \fref{dcsouthall}.
-\begin{demochap}[-\onelineskip]{southall}\end{demochap}
+%\begin{demochap}[-\onelineskip]{southall}\end{demochap}
\item[\cstyle{tandh}]
\glossary(tandhcs)%
@@ -8402,8 +8699,7 @@ the Thames \& Hudson \textit{Manual of Typography}~\cite{MCLEAN80} and
is illustrated in
\fref{dctandh}.
-\begin{demochap}[-1\onelineskip]{tandh}
-\end{demochap}
+%\begin{demochap}[-1\onelineskip]{tandh}\end{demochap}
\item[\cstyle{thatcher}]
@@ -8420,7 +8716,8 @@ A style created by
I have modified the original to
cater for multiline titles, unnumbered chapters, and appendices.
-\begin{demochap}{thatcher}\end{demochap}
+%\begin{demochap}{thatcher}\end{demochap}
+
\item[\cstyle{veelo}]
@@ -8438,7 +8735,7 @@ A style created by
%%\savefigcnt=1
%\demochapcnt=8
%\begin{demochap}{veelo}\end{demochap}
-\begin{demochap}[-2\onelineskip]{veelo}\end{demochap}
+%\begin{demochap}[-2\onelineskip]{veelo}\end{demochap}
\item[\cstyle{verville}]
\glossary(vervillecs)%
@@ -8451,7 +8748,7 @@ A style created by
and below, as in \fref{dcverville}. Unlike my posted version,
this one properly caters for unnumbered chapters.
-\begin{demochap}{verville}\end{demochap}
+%\begin{demochap}{verville}\end{demochap}
\item[\cstyle{wilsondob}]
\glossary(wilsondobcs)%
@@ -8463,252 +8760,21 @@ Adrian Wilson's \textit{The Design of Books}~\cite{ADRIANWILSON93} and
is illustrated in
\fref{dcwilsondob}.
-\begin{demochap}[-1\onelineskip]{wilsondob}
-\end{demochap}
+%\begin{demochap}[-1\onelineskip]{wilsondob}\end{demochap}
\end{itemize}
- The code for some of these styles is given below.
- For details of how the other chapter styles are defined,
-look at the
-documented class code. This should give you ideas if you want to define
-your own style.
-
- Note that it is not necessary to define a new chapterstyle if you want
-to change the chapter headings --- you can just change the individual macros
-without putting them into a style.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-\subsection{Chappell}
-
- A style that includes rules is one that I based on the chapter heads
-in~\cite{CHAPPELL99} and which I have called \cstyle{chappell} after the
-first author. The style, which is shown in \fref{dcchappell}, can easily form
-the basis for general heads in non-technical books.
-\begin{lcode}
-\makechapterstyle{chappell}{%
- \setlength{\beforechapskip}{0pt}
- \renewcommand*{\chapnamefont}{\large\centering}
- \renewcommand*{\chapnumfont}{\large}
- \renewcommand*{\printchapternonum}{%
- \vphantom{\printchaptername}%
- \vphantom{\chapnumfont 1}%
- \afterchapternum
- \vskip -\onelineskip}
- \renewcommand*{\chaptitlefont}{\Large\itshape}
- \renewcommand*{\printchaptertitle}[1]{%
- \hrule\vskip\onelineskip \centering\chaptitlefont ##1}}
-\end{lcode}
-
-
-The style centers the chapter number, draws a rule across the page under
-it, and below that comes the title, again centered. All the fiddling
-in the \cs{printchapternonum} macro is to try and ensure that the rule
-above the title is at the same height whether or not the chapter is numbered
-(the ToC being an example of an unnumbered heading).
-
-\subsection{Demo, Demo2 and demo3}
-
- I created a \cstyle{demo} chapterstyle quite a time ago and used it
-on occasions in earlier editions of this Manual. Here is the original code.
-\begin{lcode}
-\makechapterstyle{demo}{%
- \renewcommand*{\printchaptername}{\centering}
- \renewcommand*{\printchapternum}{\chapnumfont \numtoName{\c@chapter}}
- \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
- \renewcommand*{\printchaptertitle}[1]{%
- \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
- \renewcommand*{\afterchaptertitle}%
- {\vskip\onelineskip \hrule\vskip \afterchapskip}
-}% end demo
-\end{lcode}
-
-This has one serious failing and what I now believe is a poor design
-decision. The failing is that if you have any appendices that use the
-\cstyle{demo} chapterstyle then they are numbered instead of being lettered.
-The poor design is that the position of the title with respect to the top
-of the page is not the same for numbered and unnumbered chapters.
- The \cstyle{demo2} chapterstyle below fixes both of these at the expense
-of simplicity (at least for me).
-\begin{lcode}
-\makechapterstyle{demo2}{%
- \renewcommand*{\printchaptername}{\centering}
- \renewcommand*{\printchapternum}{\chapnumfont
- \ifanappendix \thechapter \else \numtoName{\c@chapter}\fi}
- \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
- \renewcommand*{\printchaptertitle}[1]{%
- \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
- \renewcommand*{\afterchaptertitle}{%
- \vskip\onelineskip \hrule\vskip \afterchapskip}
- \setlength{\beforechapskip}{3\baselineskip}
- \renewcommand*{\printchapternonum}{%
- \vphantom{\chapnumfont One}
- \afterchapternum%
- \vskip\topskip}
- \setlength{\beforechapskip}{2\onelineskip}
-}% end{demo2}
-\end{lcode}
- You may find it instructive to compare the code for the \cstyle{demo} and
-\cstyle{demo2} chapterstyles.
-
- Thec \cstyle{demo} chapterstyle is still available in the class for
-backward compatibility reasons, but I strongly advise against anyone using it.
-
- By chance I inadvertantly typest a chapterstyle that was a mixture
-of the \cstyle{pedersen} and \cstyle{demo2} styles. As a result there is
-now a \cstyle{demo3} chapterstyle as well. The only difference between the
-two styles is in the definition of \cs{chapnumfont} which in \cstyle{demo3}
-is:
-\begin{lcode}
-\renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape}
-\end{lcode}
+The code for some of these styles is given in
+section~\ref{sec:chapter-styles} within the Showcase Appendix. For
+details of how the other chapter styles are defined, look at the
+documented class code. This should give you ideas if you want to
+define your own style.
-\subsection{Pedersen}
+Note that it is not necessary to define a new chapterstyle if you want
+to change the chapter headings --- you can just change the individual
+macros without putting them into a style.
- I have modified Troels Pedersen's original code to make it a little more
-efficient and flexible.
-
-\begin{lcode}
-\newcommand*{\colorchapnum}{}
-\newcommand*{\colorchaptitle}{}
-\makechapterstyle{pedersen}{%
- \setlength{\beforechapskip}{-20pt}
- \setlength{\afterchapskip}{10pt}
- \renewcommand*{\chapnamefont}{\normalfont\LARGE\itshape}
- \renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape\colorchapnum}
- \renewcommand*{\chaptitlefont}{\normalfont\huge\itshape\colorchaptitle}
- \renewcommand*{\afterchapternum}{}
- \renewcommand*{\printchaptername}{}
- \setlength{\midchapskip}{20mm}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\printchapternum}{%
- \sidebar{\raisebox{0pt}[0pt][0pt]{\makebox[0pt][l]{%
- \resizebox{!}{\midchapskip}{\chapnumfont\thechapter}}}}}
- \renewcommand*{\printchaptertitle}[1]{\chaptitlefont ##1}
-}
-\end{lcode}
-The chapter number is scaled up from its normal size and set in a
-sidebar\index{sidebar}.
-
-\begin{syntax}
-\cmd{\colorchapnum} \cmd{\colorchaptitle} \\
-\end{syntax}
-\glossary(colorchapnum)
- {\cs{colorchapnum}}%
- {Color for the number in the \Pcstyle{pedersen} chapterstyle.}
-\glossary(colorchaptitle)
- {\cs{colorchaptitle}}%
- {Color for the title in the \Pcstyle{pedersen} chapterstyle.}
- The title is set with \cmd{colorchaptitle} and the number with
-\cmd{colorchapnum}, both of which default to doing nothing.
-Lars Madsen\index{Madsen, Lars}
-has suggested an attractive red color for these:
-\begin{lcode}
-\usepackage{color}
-\definecolor{ared}{rgb}{.647,.129,.149}
-\renewcommand{\colorchapnum}{\color{ared}}
-\renewcommand{\colorchaptitle}{\color{ared}}
-\chapterstyle{pedersen}
-\end{lcode}
-
- The uncolored version is used for the chaptersyle for this chapter;
-because of setting the number in a sidebar\index{sidebar} it does not
-display well anywhere other than as a real chapter head.
-
-\subsection{Southall}
-
- On 2006/01/08 Thomas Dye\index{Dye, Thomas} posted his \cstyle{southall}
-chapterstyle on \url{comp.text.tex} and kindly gave me permission to
-include it here. It is based on the headings in a Cambridge Press
-book\footnote{Which I haven't seen} by Aidan Southall.
-It produces a simple numbered heading with the title set as a block paragraph,
-and with a horizontal rule underneath. His original code called for lining
-figures for the number but I have commented out that bit. I also changed
-the code to eliminate the need for the two new lengths that Thomas used.
-
-\begin{lcode}
-\makechapterstyle{southall}{%
- \setlength{\afterchapskip}{5\baselineskip}
- \setlength{\beforechapskip}{36pt}
- \setlength{\midchapskip}{\textwidth}
- \addtolength{\midchapskip}{-\beforechapskip}
- \renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}}
- \renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
- \renewcommand*{\chapnumfont}{\chaptitlefont}
- \renewcommand*{\printchaptername}{}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\afterchapternum}{}
- \renewcommand*{\printchapternum}{%
- \begin{minipage}[t][\baselineskip][b]{\beforechapskip}
- {\vspace{0pt}\chapnumfont%%%\figureversion{lining}
- \thechapter}
- \end{minipage}}
- \renewcommand*{\printchaptertitle}[1]{%
- \hfill\begin{minipage}[t]{\midchapskip}
- {\vspace{0pt}\chaptitlefont ##1\par}\end{minipage}}
- \renewcommand*{\afterchaptertitle}{%
- \par\vspace{\baselineskip}%
- \hrulefill \par\nobreak\noindent \vskip\afterchapskip}}
-\end{lcode}
-
-The resulting style is shown in \fref{dcsouthall}.
-
-
-\subsection{Veelo}
-
- Bastiaan Veelo
-posted the code for a new chapter style to \pixctt\ on 2003/07/22 under the
-title \textit{[memoir] [contrib] New chapter style}. His code, which
-I have slightly modified and changed the name to \cstyle{veelo},
-is below. I have also exercised editorial privilege on his comments.
-
-\begin{quote}
- I thought I'd share a new chapter style to be used with the memoir class.
- The style is tailored for documents that are to be trimmed to a smaller
- width. When the bound document is bent, black tabs will appear on the
- fore side at the places where new chapters start as a navigational aid.
- We are scaling the chapter number, which most DVI viewers
- will not display accurately. \\[0.5\onelineskip]
-Bastiaan.
-\end{quote}
-
- In the style as I modified it, \lnc{\beforechapskip} is used as the
-height of the number and \lnc{\midchapskip} is used as the length of the
-black bar.
-\begin{lcode}
-\newlength{\numberheight}
-\newlength{\barlength}
-\makechapterstyle{veelo}{%
- \setlength{\afterchapskip}{40pt}
- \renewcommand*{\chapterheadstart}{\vspace*{40pt}}
- \renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt}
- \renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
- \renewcommand*{\chapnumfont}{\normalfont\HUGE}
- \renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
- \renewcommand*{\printchaptername}{%
- \chapnamefont\MakeUppercase{\@chapapp}}
- \renewcommand*{\chapternamenum}{}
- \setlength{\beforechapskip}{18mm}
- \setlength{\midchapskip}{\paperwidth}
- \addtolength{\midchapskip}{-\textwidth}
- \addtolength{\midchapskip}{-\spinemargin}
- \renewcommand*{\printchapternum}{%
- \makebox[0pt][l]{\hspace{.8em}%
- \resizebox{!}{\numberheight}{\chapnumfont \thechapter}%
- \hspace{.8em}%
- \rule{\midchapskip}{\beforechapskip}%
- }}%
- \makeoddfoot{plain}{}{}{\thepage}}
-\end{lcode}
-
-
- If you use this style you will also need to use the \Lpack{graphicx}
-package~\cite{GRAPHICX} because of the \cmd{\resizebox} macro.
-The \cstyle{veelo} style works best for chapters that start
-on recto pages.
\index{chapterstyle|)}
@@ -9015,7 +9081,7 @@ macro that takes one argument (the number and title of the heading). So,
if for some reason you wanted \cmd{\subsubsection} titles to be all uppercase,
centered, and in the normal font, you can do
\begin{lcode}
-\setsubsubsecheadtstyle{\normalfont\centering\MakeUppercase}
+\setsubsubsecheadstyle{\normalfont\centering\MakeUppercase}
\end{lcode}
As another example, although I don't recommend this, you can draw a
@@ -9058,7 +9124,8 @@ particular level of heading, but for a \cmd{\section} (i.e., when
and for a \cmd{\subparagraph} (i.e., \verb?S = subpara?), which is a run-in
heading, it is \verb?-1em?.
-
+\fancybreak{$*$}
+\fancybreak{}
\begin{syntax}
\cmd{\@hangfrom}\marg{code} \\
@@ -9120,6 +9187,14 @@ For example, to put a colon and space after the number
Note that you have to use \verb?#1? where you want the argument
(sectional number) of \cmd{\@seccntformat} to go.
+Note that \cmd{\setsecnumformat} applies to all \cmd{\section},
+\cmd{\subsection}, etc. If you want to change it only for, say,
+\cmd{\subsection}, use the \cmd{\setsubsechook} described below.
+
+
+\fancybreak{$*$}
+\fancybreak{}
+
\begin{syntax}
\cmd{\hangsecnum} \\
\cmd{\defaultsecnum} \\
@@ -9180,15 +9255,54 @@ The macro \cmd{\Shook} is called immediately before the typesetting of the
title; its default definition does nothing. The macro \cmd{\setShook}
redefines \cmd{\Shook} to be \meta{text}. You can use this hook, for example,
to insert a \cmd{\sethangfrom} or \cmd{\setsecnumformat} command into the
-definition of a particular section division command.
+definition of a particular section division command. In that case,
+remember that if you want to refer to the \verb|#1| argument, in the
+argument for \cmd{\setsecnumformat}, then you have to double the
+\verb|#|, i.e. use \verb|##1|, see the example below.
Here are some example lower level heads and the code used to produce them.
+
+
+\newcommand*{\shortcenter}[1]{%
+ \sethangfrom{\noindent ##1}%
+ \normalfont\boldmath\bfseries
+ \centering
+ \parbox{3in}{\centering #1}\par}
+
+\begin{egsource}{egsubheads}
+\setsubsubsecheadstyle{\bfseries\raggedright}
+ \subsubsection*{Bold raggedright}
+\setsubsubsecheadstyle{\scshape\raggedright}
+ \subsubsection*{Small caps raggedright}
+\setsubsubsecheadstyle{\itshape\raggedright}
+ \subsubsection*{Italic raggedright}
+\setsubsubsecheadstyle{\Large\centering}
+ \subsubsection*{Large centered}
+\setsubsubsecheadstyle{\large\centering\MakeUppercase}
+ \subsubsection*{large centered uppercase}
+\setsubsubsecheadstyle{\bfseries\centering}
+ \subsubsection*{Bold centered}
+\setsubsubsecheadstyle{\scshape\centering}
+ \subsubsection*{Small caps centered}
+\setsubsubsecindent{2\parindent}
+\setsubsubsecheadstyle{\scshape\raggedright}
+ \subsubsection*{Small caps indented}
+\setsubsubsecindent{0pt}
+\setsubsubsecheadstyle{\itshape\raggedleft}
+ \subsubsection*{Italic flushright}
\newcommand*{\shortcenter}[1]{%
\sethangfrom{\noindent ##1}%
\normalfont\boldmath\bfseries
\centering
\parbox{3in}{\centering #1}\par}
+\setsubsubsecheadstyle{\shortcenter}
+\subsubsection*{Bold centered but taking up no more than 3 inches
+ if a long title}
+\end{egsource}
+
+\FloatBlock
+
\begin{egresult}[A variety of subhead styles]{egsubheads}
\setsubsubsecheadstyle{\bfseries\raggedright}
@@ -9232,36 +9346,6 @@ Here are some example lower level heads and the code used to produce them.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{egsource}{egsubheads}
-\setsubsubsecheadstyle{\bfseries\raggedright}
- \subsubsection*{Bold raggedright}
-\setsubsubsecheadstyle{\scshape\raggedright}
- \subsubsection*{Small caps raggedright}
-\setsubsubsecheadstyle{\itshape\raggedright}
- \subsubsection*{Italic raggedright}
-\setsubsubsecheadstyle{\Large\centering}
- \subsubsection*{Large centered}
-\setsubsubsecheadstyle{\large\centering\MakeUppercase}
- \subsubsection*{large centered uppercase}
-\setsubsubsecheadstyle{\bfseries\centering}
- \subsubsection*{Bold centered}
-\setsubsubsecheadstyle{\scshape\centering}
- \subsubsection*{Small caps centered}
-\setsubsubsecindent{2\parindent}
-\setsubsubsecheadstyle{\scshape\raggedright}
- \subsubsection*{Small caps indented}
-\setsubsubsecindent{0pt}
-\setsubsubsecheadstyle{\itshape\raggedleft}
- \subsubsection*{Italic flushright}
-\newcommand*{\shortcenter}[1]{%
- \sethangfrom{\noindent ##1}%
- \normalfont\boldmath\bfseries
- \centering
- \parbox{3in}{\centering #1}\par}
-\setsubsubsecheadstyle{\shortcenter}
-\subsubsection*{Bold centered but taking up no more than 3 inches
- if a long title}
-\end{egsource}
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{6em}{\itshape\raggedleft\mbox{} #1}}
@@ -9296,6 +9380,24 @@ typeset the heading. The format for the number is reset via
\cmd{\setparahook} and \cmd{\setsecnumformat}.
+\fancybreak{$*$}
+\fancybreak{}
+
+
+A different approach is to create new macros, each named by the type
+of sectional macro it formats, and then make the number format call
+these macros.
+In this example we will provide separate formatting for \cmd{\section} and \cmd{\subsection}.
+\begin{lcode}
+ \setsecnumformat{\csname #1secnumformat\endcsname}
+ \newcommand\sectionsecnumformat{\thesection:\quad}
+ \newcommand\subsectionsecnumformat{\fbox{\enspace\thesubsection\enspace}\enspace}
+\end{lcode}
+Since the macro is only called in the proper context, we can use
+\cmd{\thesection} directly in the code for \cmd{\section}.
+
+
+
\index{heading!sections|)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -9740,8 +9842,8 @@ normal size by the time subsubsection heads are reached, or before.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2011-01-25 18:04:45 +0100 (Tue, 25 Jan 2011) $}
-{$LastChangedRevision: 335 $}
+{$LastChangedDate: 2013-05-21 16:33:04 +0200 (Tue, 21 May 2013) $}
+{$LastChangedRevision: 469 $}
{$LastChangedBy: daleif $}
\chapterstyle{demo3}
@@ -9933,7 +10035,7 @@ For reference, the full list is given in \tref{tab:callthispagestyle}.
\begin{table}
\centering
\caption{The use of \protect\cs{thispagestyle}} \label{tab:callthispagestyle}
-\begin{tabular}{ll} \toprule
+\begin{tabular}{l !{\qquad} l} \toprule
Called from & Style \\ \midrule
\cmd{\book} & \pstyle{book} \\
\cmd{\chapter} & \pstyle{chapter} \\
@@ -9949,6 +10051,7 @@ Called from & Style \\ \midrule
\Ie{thebibliography} & \pstyle{chapter} \\
\Ie{theindex} & \pstyle{chapter} \\
\Ie{titlingpage} & \pstyle{titlingpage} \\
+\bottomrule
\end{tabular}
\end{table}
@@ -9966,6 +10069,10 @@ Called from & Style \\ \midrule
is \cmd{\uppercaseheads} which specifies that the titles are to be
automatically uppercased.
+\textbf{Change 2012:} The upper casing macro used by \cmd{\uppercaseheads} has
+been changed into \cmd{\MakeTextUppercase} such that the upper casing
+does not touch math, references or citations.
+
For the \pstyle{myheadings} pagestyle above, you have to define your own
titles to go into the header\index{header}. Each sectioning command,
@@ -10388,7 +10495,7 @@ help is at hand.
{Defines the \cs{typemark} macro using \meta{text} as the mark, where
\meta{marks} is \texttt{left}, \texttt{both} or \texttt{right}.}
\glossary(createmark)%
- {\cs{createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postix}}%
+ {\cs{createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix}}%
{Defines the \cs{secmark} macro where \meta{show} (\texttt{shownumber}
or \texttt{nonumber}) controls whether the division number will be
displayed within \cs{mainmatter}, \meta{marks} is \texttt{left},
@@ -10440,7 +10547,7 @@ reload the page style, for example with the default page style in \theclass\
\end{lcode}
- The macro \cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postix}
+ The macro \cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix}
defines the \verb?\<sec>mark? macro where \meta{sec} is a sectional division
such as \texttt{part}, \texttt{chapter}, \texttt{section}, etc.,
and \meta{show} (\texttt{shownumber}
@@ -10516,7 +10623,7 @@ titles in the header. The \pstyle{headings} pagestyle can be easily modified
to accomplish this by simply resetting the marks for part and chapter:
\begin{lcode}
\makepsmarks{headings}{%
- \creatmark{part}{left}{shownumber}{\partname\ }{. \ }
+ \createmark{part}{left}{shownumber}{\partname\ }{. \ }
\createmark{chapter}{right}{shownumber}{\@chapapp\ }{. \ }
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
@@ -10645,11 +10752,11 @@ to spot things at the \foredge\ than those nearer the spine.
The \pstyle{ruled} page style is like this. The general plan is defined as:
\begin{lcode}
\makepagestyle{ruled}
-\makeevenfootruled{\thepage}{}{} % page numbers at the outside
-\makeoddfoot{ruled}{}{}{\thepage}
-\makeheadrule{ruled}{\textwidth}{\normalrulethickness}
-\makeevenhead{ruled}{\scshape\leftmark}{}{} % small caps
-\makeoddhead{ruled}{}{}{\rightmark}
+\makeevenfoot {ruled}{\thepage}{}{} % page numbers at the outside
+\makeoddfoot {ruled}{}{}{\thepage}
+\makeheadrule {ruled}{\textwidth}{\normalrulethickness}
+\makeevenhead {ruled}{\scshape\leftmark}{}{} % small caps
+\makeoddhead {ruled}{}{}{\rightmark}
\end{lcode}
The other part of the specification has to ensure that the \cmd{\chapter}
and \cmd{\section} commands make the appropriate marks for the headers.
@@ -10905,6 +11012,7 @@ zero-sized picture starts off with \verb?begin{picture}(0,0)...?.}
\begin{syntax}
\cmd{\framepichead} \\
\cmd{\framepictextfoot} \\
+\cmd{\framepichook} \\
\cmd{\showheadfootlocoff} \\
\cmd{\showtextblockoff} \\
\end{syntax}
@@ -10916,6 +11024,10 @@ zero-sized picture starts off with \verb?begin{picture}(0,0)...?.}
{\cs{framepictextfoot}}%
{Used by the \Ppstyle{showlocs} pagestyle to draw a box around the textblock
and a line at the footer location.}
+\glossary(framepichook)%
+ {\cs{framepichook}}%
+ {First thing called inside the zero width pictures provided by
+ \cs{framepichead} and \cs{framepictextfoot}. Empty by default.}%
\glossary(showtextblockoff)%
{\cs{showtextblockoff}}%
{Prevents \cs{framepictextfoot} from drawing a box around the textblock.}
@@ -10923,7 +11035,7 @@ zero-sized picture starts off with \verb?begin{picture}(0,0)...?.}
{\cs{showheadfootlocoff}}%
{Prevents \cs{framepichead} and \cs{framepictextfoot} from drawing
lines at the header and footer locations.}
-
+%
The macro \cmd{\framepichead} creates a zero-sized\index{zero-sized picture}
picture that draws a line at the header location, and the macro
\cmd{\framepictextfoot} creates a zero-sized\index{zero-sized picture}
@@ -10934,9 +11046,16 @@ and also draws a box around the typeblock. Following the declaration
locations. The declaration \cmd{\showtextblockoff} prevents
\cmd{\framepictextfoot} from drawing a box around the textblock.
+In case you want to change the color of the \pstyle{showlocs}, simply do
+\begin{lcode}
+ \renewcommnand\framepichook{\color{red}}
+\end{lcode}
+
+
+
If you generally want a box around the textblock you may want to create
your own pagestyle using \cmd{\framepictextfoot} and the \pstyle{showlocs}
-code as a starting point.
+code as a starting point, see \path{memoir.cls} for details.
\section{Other things to do with page styles}
@@ -10985,8 +11104,8 @@ like:
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-05-22 16:29:23 +0200 (Wed, 22 May 2013) $}
+{$LastChangedRevision: 470 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11005,7 +11124,7 @@ paragraphing, like quotations\index{quotation} or lists.
\section{Paragraphs}
-\index{paragraph|(}
+\index{paragraph|(} %|
There are basically two parameters that control the appearance of normal
paragraphs.
@@ -11061,7 +11180,7 @@ page, even if the textwidths on the two pages are different.
\subsection{Hanging paragraphs}
-\index{paragraph!hanging|(}
+\index{paragraph!hanging|(} %|
A hanging paragraph is one where the length of the first few lines differs
from the length of the remaining lines. (A normal indented paragraph
@@ -11146,9 +11265,9 @@ Nyman\index{Nyman, Patrick} which he posted on \ctt{} in January 2004.
\end{lcode}
-\index{paragraph!hanging|)}
+\index{paragraph!hanging|)}%|
-\index{paragraph|)}
+\index{paragraph|)} %|
\section{Flush and ragged}
@@ -11343,7 +11462,7 @@ a line may give a surprising result. If so, the following may help.
\begin{syntax}
\cmd{\atcentercr} \\
\cmd{\break} \\
-\cmd{\memoirgdbs} \\
+\cmd{\memorigdbs} \\
\cmd{\memorigpar} \\
\end{syntax}
\glossary(atcentercr)%
@@ -11352,8 +11471,8 @@ a line may give a surprising result. If so, the following may help.
\glossary(break)%
{\cs{break}}%
{TeX macro to break a line.}
-\glossary(memoirgdbs)%
- {\cs{memoirgdbs}}%
+\glossary(memorigdbs)%
+ {\cs{memorigdbs}}%
{Stores the original definition of \texttt{\bs}\texttt{\bs}.} % not \cs{\}
\glossary(memorigpar)%
{\cs{memorigpar}}%
@@ -11366,7 +11485,7 @@ or \cmd{\break}, which is a \tx\ command to end a line.
In some cases the paragraph shaping commands change the definitions
of \cmd{\\} or \cs{par}. Just in case you need to restore them, copies
of the original definitions are in
-\cmd{\memoirgdbs} (for \cmd{\\}) and \cmd{\memorigpar} (for \cs{par}).
+\cmd{\memorigdbs} (for \cmd{\\}) and \cmd{\memorigpar} (for \cs{par}).
\begin{syntax}
\cmd{\flushleftright} \\
@@ -11616,9 +11735,9 @@ margins\index{margin!left}\index{margin!right} by equal amounts.
Generally speaking it is not a
good idea to change the textwidth but sometimes it may be called for.
- The commands and environment described below are similar to those
-in the \Lpack{chngpage} package~\cite{CHNGPAGE}, but do differ in some
-respects.
+The commands and environment described below are similar to those in
+the originally found in the \Lpack{chngpage} package, but do differ in
+some respects.
\begin{syntax}
\senv{adjustwidth}\marg{left}\marg{right} text \eenv{adjustwidth} \\
@@ -11759,7 +11878,7 @@ if necessary reset it to its original value --- the default value for
\section{Lists}
-\index{list|(}
+\index{list|(} %|
Standard \ltx\ provides four kinds of lists. There is a general \Ie{list}
environment which you can use to define your own particular kind of list,
@@ -11933,9 +12052,39 @@ counter typeset as a lowercase Roman numeral followed by a single parenthesis
\begin{lcode}
\begin{enumerate}[i)]
...
-\end{lcode}
+\end{lcode}
+
+
+\LMnote{2013/05/16}{Added hint about enumitem}
+\begin{hint}
+ \theclass\ does not provide high level interfaces to configure the
+ appearance. We provide some simple tools to adjust vertical spacing,
+ see below.
+
+ Users seeking more control can have a look at the \Lpack{enumitem}
+ package by Javier Bezos. If loaded as
+ \begin{lcode}
+ \usepackage[shortlabels]{enumitem}
+ \end{lcode}
+ then our
+ \begin{lcode}
+ \begin{enumerate}[i)]
+ \item \label{item:tst} ...
+ \end{lcode}
+ syntax will work out of the box.
+
+ One difference though: In \theclass\ \verb?\ref{item:tst}? will give you
+ `i', whereas, if \Lpack{enumitem} is loaded the full formatting is
+ returned from the cross reference, i.e., `i)'. This is fully
+ configurable in \Lpack{enumitem}.
+\end{hint}
+
+
+
+
+
+\index{list!tight|(} %|
-\index{list!tight|(}
\begin{syntax}
\cmd{\tightlists} \cmd{\defaultlists} \\
@@ -11960,6 +12109,7 @@ counter typeset as a lowercase Roman numeral followed by a single parenthesis
the environments.}
+
The normal LaTeX \Ie{description}, \Ie{itemize} and \Ie{enumerate} lists
have an open
look about them when they are typeset as there is significant vertical space
@@ -11990,7 +12140,7 @@ that list. The \cmd{\tightlist} removes all the spaces while the
\cmd{\firmlist} produces a list that still has some space but not as much
as in an ordinary list.
-\index{list!tight|)}
+\index{list!tight|)} %|
\begin{figure}
@@ -12000,7 +12150,7 @@ as in an ordinary list.
\caption{The layout parameters for general lists}\label{fig:listlay}
\end{figure}
-\index{list!new|(}
+\index{list!new|(} %|
\begin{syntax}
\senv{list}\marg{default-label}\marg{code} items \eenv{list} \\
@@ -12088,7 +12238,7 @@ It is a matter of taste whether you use the command or \verb?\begin{...}?
and \verb?\end{...}? forms, but the latter does make it more obvious that
an environment is being dealt with.
-\index{list!new|)}
+\index{list!new|)} %|
Several \ltx\ environments are defined in terms of a very simple list,
called a \Ie{trivlist}. Such a list has little internal structure
@@ -12168,7 +12318,7 @@ The example (\ref{eg:trivseps}) shows how it is possible to change the
spacing around the \Ie{center} environment, but it applies equally to the
other environments.
-\index{list|)}
+\index{list|)} %|
%#% extend
@@ -12176,8 +12326,8 @@ other environments.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-12-20 14:07:25 +0100 (Mon, 20 Dec 2010) $}
-{$LastChangedRevision: 327 $}
+{$LastChangedDate: 2013-05-08 17:14:46 +0200 (Wed, 08 May 2013) $}
+{$LastChangedRevision: 457 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -12212,18 +12362,22 @@ standard classes, the unstarred versions add their respective titles to
the \toc. The starred versions act like the standard classes' unstarred
versions as they don't add their titles to the \toc.
- This chapter explains the inner workings behind the \toc, and friends,
+ This chapter explains the inner workings behind the \toc\ and friends,
how to change their appearance and the apperance of the entries, and how to
create new \listofx. If you don't need any of these then you can
skip the remainder of the chapter.
\section{General \prtoc\ methods}
- To provide some background information this is a general description
-of how the standard \ltx\ classes process a Table of Contents (\toc).
-As the processing of List of Figures (\lof) and List of Tables (\lot) is
-similar I will just discuss the \toc. You may wish to skip this section
-on your first reading.
+ In \S\ref{sec:class-prtoc-methods} we will provide the class
+ configuration interface for the various parts of the ToC.
+
+ In order to understand how these macros are used, we start by
+ providing some background information this is a general description
+ of how the standard \ltx\ classes process a Table of Contents (\toc).
+ As the processing of List of Figures (\lof) and List of Tables (\lot)
+ is similar I will just discuss the \toc. You may wish to skip this
+ section on your first reading.
The basic process is that each sectioning command writes out information
about itself --- its number, title, and page --- to the \pixfile{toc} file.
@@ -12337,14 +12491,14 @@ which performs the actual typesetting of the \cmd{\contentsline} entry.
\end{syntax}
\glossary(@pnumwidth)%
{\cs{@pnumwidth}\marg{length}}%
- {Space for a page number in the \prtoc, etc.}
+ {Space for a page number in the \prtoc\ etc.}
\glossary(@tocrmarg)%
{\cs{@tocrmarg}\marg{length}}%
- {Right hand margin for titles in the \prtoc, etc.}
+ {Right hand margin for titles in the \prtoc\ etc.}
\glossary(@dotsep)%
{\cs{@docsep}\marg{num}}%
{Distance, as \meta{num} math units, bewteen dots in the dotted lines
- in the \prtoc, etc.}
+ in the \prtoc\ etc.}
The general layout of a typeset entry is illustrated in \fref{fig:ltoc}.
There are three
internal \ltx\ commands that are used in the typesetting. The page
@@ -12547,6 +12701,7 @@ document you have to do it like this:
\end{itemize}
\section{The class \prtoc{} methods}
+ \label{sec:class-prtoc-methods}
The class provides various means of changing the look of the \toc, etc.,
without having to go through some of the above.
@@ -12639,7 +12794,7 @@ is equivalent to \cs{listoffigures*}.
{Set the ToC, etc., in one or two columns according to the class option.}
-In the standards classes the \toc, etc., are set in one column even if the
+In the standard classes the \toc, etc., are set in one column even if the
document as a whole is set in two columns. This limitation is removed.
Following the \cmd{\onecoltocetc} declaration, which is the default, the
\toc\ and friends will be set in one column but after the \cmd{\twocoltocetc}
@@ -12657,21 +12812,23 @@ document class \Lopt{onecolumn} or \Lopt{twocolumn} option.
\glossary(settocdepth)%
{\cs{settocdepth}\marg{secname}}%
{Sets the value of the \Pcn{tocdepth} counter in the \file{toc} file.}
-The class \cmd{\maxtocdepth} command sets the maximum
-allowable value
-for the \Icn{tocdepth} counter. If used, the command must appear
-before the \cmd{\tableofcontents} command. By default, the class
-sets \verb?\maxtocdepth{section}?.
+% The class \cmd{\maxtocdepth} command sets the maximum
+% allowable value
+% for the \Icn{tocdepth} counter. If used, the command must appear
+% before the \cmd{\tableofcontents} command. By default, the class
+% sets \verb?\maxtocdepth{section}?.
+\LMnote{2013/04/24}{As far as I can see \cs{maxtocdepth} is not used
+ anywhere. Manual clarified, see http://tex.stackexchange.com/a/97018/3929}
+The class \cmd{\maxtocdepth} command sets the \Icn{tocdepth}
+counter. It is currently not used in the \Lclass{memoir} class.
+
- The \Lclass{memoir} class command \cmd{\settocdepth} is somewhat
-analagous to the \cmd{\setsecnumdepth} command
-described in \S\ref{sec:secnumbers}.
-It sets the value of the \Icn{tocdepth} counter and puts it into
-the \toc{} to (temporarily) modify what will appear.
-The command can only be used after the preamble\index{preamble}
-but may be used before calling the \cmd{\tableofcontents}.
-The \cmd{\settocdepth} and \cmd{\maxtocdepth} macros are from the
-\Lpack{tocvsec2} package~\cite{TOCVSEC2}.
+The \Lclass{memoir} class command \cmd{\settocdepth} is somewhat
+analagous to the \cmd{\setsecnumdepth} command described in
+\S\ref{sec:secnumbers}. It sets the value of the \Icn{tocdepth}
+counter and puts it into the \toc{} to (temporarily) modify what will
+appear. The \cmd{\settocdepth} and \cmd{\maxtocdepth} macros are from
+the \Lpack{tocvsec2} package~\cite{TOCVSEC2}.
\begin{syntax}
@@ -12710,7 +12867,7 @@ of the \cmd{\contentsname}, \cmd{\listfigurename} and \cmd{\listtablename}
commands.
The commands for controlling the typesetting of the \toc, \lof\ and \lot\
-titles all follow a similar pattern So for convenience (certainly mine,
+titles all follow a similar pattern, so for convenience (certainly mine,
and hopefully yours) in the following descriptions I will use \texttt{X},
as listed in \tref{tab:Xlistofxtitles},
to stand for the file extension for the appropriate \listofx. That is, any
@@ -13055,8 +13212,9 @@ margin\index{margin!left} (\textit{indent} in \fref{fig:ltoc}). It
an entry.
This is a simplified pseudo-code version for the typesetting of numbered
and unnumbered entries.
+\LMnote{2012/07/29}{Added extra brace pair}
\begin{lcode}
- {\cftKfont {\cftKname \cftKpresnum SNUM\cftKaftersnum\hfil} \cftKaftersnumb TITLE}
+ {\cftKfont {{\cftKname \cftKpresnum SNUM\cftKaftersnum\hfil} \cftKaftersnumb TITLE}}
{\cftKleader}{\cftKformatpnum{PAGE}}\cftKafterpnum\par
{\cftKfont TITLE}{\cftKleader}{\cftKformatpnum{PAGE}}\cftKafterpnum\par
@@ -13067,16 +13225,31 @@ and \texttt{PAGE}
\begin{lcode}
{\cftKpresnum SNUM\cftaftersnum\hfil}
\end{lcode}
- is typeset within a box of width \lnc{\cftKnumwidth}.
+ is typeset within a box of width \lnc{\cftKnumwidth}, see the
+ \cs{...numberlinebox} macros later on.
\begin{syntax}
\cmd{\cftKfont} \\
\end{syntax}
\glossary(cftKfont)%
- {\cs{cftKfont}}%
- {Controls the appearance of the number and title of a `K' entry in a \listofx.}
- This controls the appearance of the title (and its preceding number,
- if any). It may be changed using \cmd{\renewcommand}.
+{\cs{cftKfont}}%
+{Controls the appearance of the number and title of a `K' entry in a \listofx.}
+This controls the appearance of the title (and its preceding number,
+if any). It may be changed using \cmd{\renewcommand}.
+
+\cmd{\cftKfont} takes no arguments as such, but the the number and
+title is presented to it as an argument. Thus one may end
+\cmd{\cftKfont} with a macro taking one argument, say
+\cmd{\MakeUppercase}, and which then readjust the text as needed.
+
+\begin{caveat}
+ Please read the section entitled
+ \emph{\titleref{sec:about-upper-og}} on
+ page~\pageref{sec:about-upper-og} if you consider using upper/lower
+ cased TOC entries and especially if you are also using the
+ \Lpack{hyperref} package.
+\end{caveat}
+
\begin{syntax}
\cmd{\cftKname} \\
@@ -13121,15 +13294,29 @@ number in a \toc\ and `Fig.' before each figure number in a \lof\ do:
\begin{syntax}
-\cmd{\booknumberline}\marg{num} \\
+\cmd{\numberline}\marg{num} \\
+\cmd{\partnumberline}\marg{num} \\
\cmd{\partnumberline}\marg{num} \\
\cmd{\chapternumberline}\marg{num} \\
\end{syntax}
+\glossary(numberline)
+ {\cs{numberline}\marg{num}}
+ {Typeset sectional number for \cs{section} and siblings in ToC}
+\glossary(partnumberline)
+ {\cs{partnumberline}\marg{num}}
+ {Typeset part number in ToC}
+\glossary(booknumberline)
+ {\cs{booknumberline}\marg{num}}
+ {Typeset book number in ToC}
+\glossary(chapternumberline)
+ {\cs{chapternumberline}\marg{num}}
+ {Typeset chapter number in ToC}
In the \toc, the macros \cmd{\booknumberline}, \cmd{\partnumberline} and
\cmd{\chapternumberline}
are responsible respectively for typesetting the \cmd{\book}, \cmd{\part}
and \cmd{\chapter}
-numbers. Internally they use \cmd{\cftKpresnum}, \cmd{\cftKaftersnum}
+numbers, whereas \cmd{\numberline} does the same for the sectional
+siblings. Internally they use \cmd{\cftKpresnum}, \cmd{\cftKaftersnum}
and \cmd{\cftKaftersnumb} as above. If you do not want, say,
the \cmd{\chapter} number to appear you
can do:
@@ -13137,6 +13324,83 @@ can do:
\renewcommand{\chapternumberline}[1]{}
\end{lcode}
+
+\begin{syntax}
+ \cmd{\numberlinehook}\marg{num}\\
+ \cmd{\cftwhatismyname}\\
+ \cmd{\booknumberlinehook}\marg{num}\\
+ \cmd{\partnumberlinehook}\marg{num}\\
+ \cmd{\chapternumberlinehook}\marg{num}\\
+ \cmd{\numberlinebox}\marg{length}\marg{code}\\
+ \cmd{\booknumberlinebox}\marg{length}\marg{code}\\
+ \cmd{\partnumberlinebox}\marg{length}\marg{code}\\
+ \cmd{\chapternumberlinebox}\marg{length}\marg{code}\\
+\end{syntax}
+\glossary(numberlinehook)
+ {\cs{numberlinehook}\marg{num}}
+ {The first thing to be called within \cs{numberline}, does nothing by
+ default.}
+\glossary(cftwhatismyname)
+ {\cs{cftwhatismyname}}
+ {Since \cs{numberline} is shared by \cs{section} and siblings,
+ \cs{cftwhatismyname} can be used to tell which section type is
+ calling \cs{numberlinehook}}
+\glossary(partnumberlinehook)
+ {\cs{partnumberlinehook}\marg{num}}
+ {The first thing to be called within \cs{partnumberline}, does nothing by
+ default.}
+\glossary(booknumberlinehook)
+ {\cs{booknumberlinehook}\marg{num}}
+ {The first thing to be called within \cs{booknumberline}, does nothing by
+ default.}
+\glossary(chapternumberlinehook)
+ {\cs{chapternumberlinehook}\marg{num}}
+ {The first thing to be called within \cs{chapternumberline}, does nothing by
+ default.}
+\glossary(numberlinebox)
+ {\cs{numberlinebox}\marg{length}\marg{code}}
+ {The box command used to typeset the sectional number within the ToC,
+ note that it will automatically align to the left}
+\glossary(partnumberlinebox)
+ {\cs{partnumberlinebox}\marg{length}\marg{code}}
+ {The box command used to typeset the part number within the ToC,
+ note that it will automatically align to the left}
+\glossary(booknumberlinebox)
+ {\cs{booknumberlinebox}\marg{length}\marg{code}}
+ {The box command used to typeset the book number within the ToC,
+ note that it will automatically align to the left}
+\glossary(chapternumberlinebox)
+ {\cs{chapternumberlinebox}\marg{length}\marg{code}}
+ {The box command used to typeset the chapter number within the ToC,
+ note that it will automatically align to the left}
+Inside the four \cs{...numberline} macros, the first thing we do is to
+give the \cs{...numberline} argument to a hook. By default this hook
+does nothing. But, with the right
+tools,\footnote{Which we do not currently supply\dots, but have a look
+at Sniplet~\ref{snip:autotoc} on page~\pageref{snip:autotoc}.}
+they can be used to record the widths of the sectional number. Which then
+can be used to automatically adjust the various \meta{numwidth} and
+\meta{indent} within the \cs{cftsetindents} macro. In order to
+tell the section types apart (they all use \cmd{\numberline}), the
+value of the \cmd{\cftwhatismyname} macro will locally reflect the
+current type.
+
+As mentioned earlier, the \cmd{\book}, \cmd{\part} and \cmd{\chapter}
+numbers are typeset inside a box of certain fixed withs. Sometimes it
+can be handy \emph{not} having this box around. For this you can
+redefine one of the four \cs{...numberlinebox} macros listed
+above. For example via
+\begin{lcode}
+ \renewcommand\chapternumberlinebox[2]{#2}
+\end{lcode}
+The first argument is the width of the box to be made. All four
+macros are defined similar to this (where \texttt{\#1} is a length)
+\begin{lcode}
+\newcommand\chapternumberlinebox[2]{%
+ \hb@xt@#1{#2\hfil}}
+\end{lcode}
+
+
\begin{comment}
\Note{} Because the \Lpack{hyperref} package~\cite{HYPERREF}
does not understand
@@ -13161,13 +13425,21 @@ the \Lpack{memhfixc} package, which comes with memoir.
The spacing between any dots in the leader is controlled by \cmd{\cftKdotsep}
(\cmd{\@dotsep} in \fref{fig:ltoc}).
It can be changed by \cmd{\renewcommand} and its value must be either a
- number (e.g., 6.6 or \cmd{\cftdotsep}) or \cmd{\cftnodots} (to disable the dots).
- The spacing
- is in terms of \emph{math units} where there are 18mu to 1em.
+ number (e.g., 6.6 or \cmd{\cftdotsep}) or \cmd{\cftnodots} (to
+ disable the dots). The spacing is in terms of \emph{math units} where
+ there are 18mu to 1em.
+The default leaders macro is similar to
+\begin{lcode}
+ \newcommand{\cftsectionleader}{\normalfont\cftdotfill{\cftsectiondotsep}}
+\end{lcode}
+Note that the spacing of the dots is affected by the font size (as the
+math unit is affected by the font size). Also note that the
+\cmd{\cftchapterleader} is bold by default.
\begin{syntax}
\cmd{\cftKformatpnum}\marg{pnum} \\
+\cmd{\cftKformatpnumhook}\marg{num}\\
\cmd{\cftKpagefont} \\
\end{syntax}
\glossary(cftKformatpnum)%
@@ -13176,20 +13448,31 @@ the \Lpack{memhfixc} package, which comes with memoir.
\glossary(cftKpagefont)%
{\cs{cftKpagefont}}%
{Font for the page number of a `K' entry in a \listofx.}
+\glossary(cftKformatpnumhook)%
+ {\cs{cftKformatpnumhook}\marg{num}}%
+ {When formatting the page number in the ToC (via
+ \cs{cftKformatpnum}) this hook is given the page value. Does nothing by default}%
The macro \cmd{\cftKformatpnum} typesets an entry's page number, using
the \cmd{\cftKpagefont}.\footnote{This addition to the class was suggested
by Dan\index{Luecking, Daniel} Luecking, \ctt\ \textit{Re: setting numbers in toc in their natural width box,} 2007/08/15.}
The default definition is essentially:
\begin{lcode}
\newcommand*{\cftKformatpnum}[1]{%
+ \cftKformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cftKpagefont #1}}}
\end{lcode}
which sets the number right justified in a box \lnc{\@pnumwidth} wide.
To have, say, a \cmd{\part} page number left justified in its box, do:
\begin{lcode}
\renewcommand*{\cftpartformatpnum}[1]{%
+ \cftpartformatpnumhook{#1}%
\hbox to \@pnumwidth{{\cftpartpagefont #1}}}
\end{lcode}
+The \cmd{\cftKformatpnumhook} does nothing by default (other than
+eating the argument), but could be redefined to record the widest page
+number and report it back, even reusing it to auto adjust on the next
+run to set \cs{@pnumwidth} (see \cmd{\setpnumwidth}).
+
\begin{syntax}
\cmd{\cftKafterpnum} \\
@@ -13291,6 +13574,22 @@ Note that the same font should be used for the title, leader and page
\addtolength{\cftKnumwidth}{\mylen} % add the extra space
\end{lcode}
+\LMnote{2012/07/29}{Added this example}
+\item To set the chapter number and title as just
+ `NUM\enspace\textperiodcentered\enspace TITLE', i.e. un-boxed number
+ plus a symbolic separator, use
+ \begin{lcode}
+ \renewcommand\cftchapteraftersnumb{\enspace\textperiodcentered\enspace}
+ \renewcommand\chapternumberlinebox[2]{#2}
+ \end{lcode}
+ -- of couse, it works best, only if the TITLE is a single line.
+
+
+\item Make chapter titles lower case small caps
+ \begin{lcode}
+ \renewcommand\cftchapterfont{\scshape\MakeTextLowercase}
+ \end{lcode}
+ -- here we do not touch the case of any math.
\item To set the section numbers flushright:
\begin{lcode}
@@ -13502,9 +13801,52 @@ alterations to a \listofx\ on the fly. For example:
If you do not use \cmd{\cftinsertcode} \emph{before} calling the command to
type the \listofx\ that it is intended for then nothing will happen. No
harm will come if a matching \cmd{\cftinserthook} is never used. No harm
-occures either if you call \cmd{\cftinserthook} and there is no prior
+occurs either if you call \cmd{\cftinserthook} and there is no prior
matching \cmd{\cftinsertcode}.
+One use of these \toc{} hooks is reusing the \toc{} data to, say,
+create chapter \toc's. The code for this is shown in
+Sniplet~\ref{snip:chaptertoc} on page~\pageref{snip:chaptertoc}. In
+the sniplet we use the following two hooks that are executed right
+before and right after \cmd{\chapter}, \cmd{\part}, \cmd{\book},
+\cmd{\appendixpage} writes to the \toc{}. By default
+they do nothing.\footnote{More hooks may be added in later releases.}
+\begin{syntax}
+ \cmd{\mempreaddchaptertotochook}\\
+ \cmd{\mempostaddchaptertotochook}\\
+ \cmd{\mempreaddparttotochook}\\
+ \cmd{\mempostaddparttotochook}\\
+ \cmd{\mempreaddbooktotochook}\\
+ \cmd{\mempostaddbooktotochook}\\
+ \cmd{\mempreaddapppagetotochook}\\
+ \cmd{\mempostaddapppagetotochook}
+\end{syntax}
+\glossary(mempreaddchaptertotochook)%
+ {\cs{mempreaddchaptertotochook}}%
+ {Hook executed right \emph{before} \cs{chapter} writes to the \protect\toc{}}
+\glossary(mempostaddchaptertotochook)%
+ {\cs{mempostaddchaptertotochook}}%
+ {Hook executed right \emph{after} \cs{chapter} writes to the \protect\toc{}}
+\glossary(mempreaddparttotochook)%
+ {\cs{mempreaddparttotochook}}%
+ {Hook executed right \emph{before} \cs{part} writes to the \protect\toc{}}
+\glossary(mempostaddparttotochook)%
+ {\cs{mempostaddparttotochook}}%
+ {Hook executed right \emph{after} \cs{part} writes to the \protect\toc{}}
+\glossary(mempreaddbooktotochook)%
+ {\cs{mempreaddbooktotochook}}%
+ {Hook executed right \emph{before} \cs{book} writes to the \protect\toc{}}
+\glossary(mempostaddbooktotochook)%
+ {\cs{mempostaddbooktotochook}}%
+ {Hook executed right \emph{after} \cs{book} writes to the \protect\toc{}}
+\glossary(mempreaddapppagetotochook)%
+ {\cs{mempreaddapppagetotochook}}%
+ {Hook executed right \emph{before} \cs{appendixpage} writes to the \protect\toc{}}
+\glossary(mempostaddapppagetotochook)%
+ {\cs{mempostaddapppagetotochook}}%
+ {Hook executed right \emph{after} \cs{appendixpage} writes to the \protect\toc{}}
+
+
\LMnote{2010/06/09}{Ineffective to have this seceral places in the manual.}
\subsubsection{Extra chapter material in the ToC}
@@ -13518,6 +13860,56 @@ the \pixfile{toc} file. Further information as to the definition of
this macro can be found in section~\ref{sec:chapter-precis}.
+\LMnote{2012/09/21}{added}
+\subsubsection{About upper og lower casing TOC entries}
+\label{sec:about-upper-og}
+
+Some designs call for upper (or lower casing) TOC entries. This
+\emph{is} possible but the solution depends on whether the
+\Lpack{hyperref} package is used or not.
+
+Without \Lpack{hyperref} one can simply end the \cs{cftKfont} with say
+\cs{MakeTextUppercase} and the \texttt{K}-type entry will be upper cased.
+
+With \Lpack{hyperref} the possibilities are limited. Explanation: The
+upper/lower casing macros are not that robust, and need the content to
+be simple.\footnote{For some definition of simple.} When
+\Lpack{hyperref} is used, the hyperlink is wrapped around the entry
+before \cs{cftKfont} gains access to it, and is thus generally too
+complicated for, say, \cs{MakeTextUppercase} to handle. The follow
+workaround draw inspiration from
+\url{http://tex.stackexchange.com/q/11892/3929}.
+\begin{syntax}
+ \cmd{\settocpreprocessor}\marg{type}\marg{code}
+\end{syntax}
+\glossary(settocpreprocessor)%
+ {\cs{settocpreprocessor}\marg{type}\marg{code}}
+ {Provide a method for preprocessing certain TOC entries before they
+ are written to the \texttt{.toc} file.}
+Here \meta{type} is one of \texttt{chapter}, \texttt{part} or
+\texttt{book}.\footnote{If needed we will attempt to add a similar
+ feature to the rest of the sectional types, please write the
+ maintainer.} And \meta{code} can be something like this example:
+\begin{verbatim}
+\makeatletter
+\settocpreprocessor{chapter}{%
+ \let\tempf@rtoc\f@rtoc%
+ \def\f@rtoc{%
+ \texorpdfstring{\MakeTextUppercase{\tempf@rtoc}}{\tempf@rtoc}}%
+}
+\makeatother
+\end{verbatim}
+Where \cs{f@rtoc} is a placeholder inside \cmd{\chapter}, \cmd{\part}
+and \cmd{\book}, holding the material to be written to the actual TOC
+file before \Lpack{hyperref} accesses it. This way the upper casing is
+sneaked into the TOC file, and the bookmark part of \Lpack{hyperref}
+will not complain about the \cmd{\MakeTextUppercase} in the data. Of
+course, you will not have upper cased titles in the bookmark list.
+
+
+
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -14222,8 +14614,8 @@ before the stuff you want to have moved out of, say, a part.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2011-02-18 14:23:02 +0100 (Fri, 18 Feb 2011) $}
-{$LastChangedRevision: 352 $}
+{$LastChangedDate: 2013-05-10 17:06:52 +0200 (Fri, 10 May 2013) $}
+{$LastChangedRevision: 458 $}
{$LastChangedBy: daleif $}
@@ -14264,7 +14656,7 @@ of the float across the top of both columns\index{float!double column}
in a \Lopt{twocolumn} document. In a \Lopt{onecolumn} document there
is no difference between the starred and unstarred forms.
-\index{float!new|(}
+\index{float!new|(} %)| emacs
\begin{syntax}
\cmd{\newfloat}\oarg{within}\marg{fenv}\marg{ext}\marg{capname} \\
@@ -14466,11 +14858,11 @@ be done using the \Lpack{ragged2e} package and
-\index{float!new|)}
+\index{float!new|)} %|
\section{Setting off a float} \label{sec:floatsetoff}
-\index{float!set off|(}
+\index{float!set off|(} %|
Sometimes it is desireable to set off a float, more probably
an illustration than a tabular, from its surroundings. The \Ie{framed}
@@ -14567,11 +14959,11 @@ RULED FIGURE AND CAPTION
%\end{shaded}
\end{shadefigure}
-\index{float!set off|)}
+\index{float!set off|)}%|
\section{Multiple floats} \label{sec:multfloats}
-\index{float!multiple|(}
+\index{float!multiple|(}%|
You can effectively put what you like inside a float box. Normally there
is just a single picture or tabular in a float but you can include
@@ -14855,11 +15247,11 @@ Subcaptions are discussed below in \Sref{sec:subcaps}.
\PWnote{2009/08/23}{Improved cross references between \cs{newsubfloat}
and \cs{subcaption}.}
-\index{float!multiple|)}
+\index{float!multiple|)}%|
\section{Where \ltx\ puts floats} \label{sec:floatplace}
-\index{float!placement|(}
+\index{float!placement|(}%|
The general format for a float environment is: \\
\senv{float}\oarg{loc} ... \eenv{float}
@@ -15200,11 +15592,11 @@ must be larger than the \cmd{\floatpagefraction} by an amount sufficient
to take account of the maximum text page separation value.
-\index{float!placement|)}
+\index{float!placement|)} % |
\section{Captions}
-\index{caption|(}
+\index{caption|(} %)|
Some publishers require, and some authors prefer, captioning styles
other than the one style provided by standard \ltx.
@@ -15227,7 +15619,7 @@ those supplied by the \Lpack{ccaption} package~\cite{CCAPTION}.
\section{Caption styling}
-\index{caption!style|(}
+\index{caption!style|(} %)|
Just as a reminder, the default appearance of a caption for, say,
a table looks like this:
@@ -15265,6 +15657,19 @@ Notice that no space is put between the delimeter and the title unless
it is specified in the \meta{delim} parameter.
The class initially specifies \verb?\captiondelim{: }? to give the normal
delimeter.
+% \begin{syntax}
+% \cmd{\captiondelimnocap}\marg{code}
+% \end{syntax}
+% \glossary(captiondelimnocap)%
+% {\cs{captiondelimnocap}\marg{code}}%
+% {Used as the delimiter after the caption number when the caption is
+% empty. Empty by default.}
+% Whenever the caption text is empty, it looks a little strange to have
+% \texttt{Figure 2.3:} and nothing else. Instead, in this case we replace
+% \cmd{\captiondelim} by \cmd{\captiondelimnocap}, which is empty by
+% default, i.e., we end up with \texttt{Figure 2.3} instead.
+
+
\begin{syntax}
\cmd{\captionnamefont}\marg{fontspec} \\
@@ -15529,7 +15934,7 @@ example for the style of the caption in \tref{tab:style}:
\captionstyle{\centerlastline\\}
\captiontitlefont{\scshape}
\setlength{\belowcaptionskip}{10pt}
- \ifx \@empty#1 \caption{#2}\else \caption[#1]{#2}}
+ \ifx \@empty#1 \caption{#2}\else \caption[#1]{#2}\fi}
\end{lcode}
Remember that any code that involves the \idxatincode\texttt{@} sign must
be either in
@@ -15555,12 +15960,12 @@ The additional commands makes it work in both cases, forcing the
name to be centered as well as the last line of a multiline title,
thus giving a balanced appearence.
- \index{caption!style|)}
+ \index{caption!style|)}%|
\section{Continuation captions and legends}
-\index{caption!continued|(}
+\index{caption!continued|(}%|
\begin{syntax}
\cmd{\contcaption}\marg{text} \\
@@ -15627,10 +16032,10 @@ thus giving a balanced appearence.
\end{tabular}
\end{shadetable}
-\index{caption!continued|)}
+\index{caption!continued|)}%|
\index{legend}
-\index{caption!anonymous|(}
+\index{caption!anonymous|(}%|
\begin{syntax}
\cmd{\legend}\marg{text} \\
@@ -15813,8 +16218,8 @@ tables\index{table} as:
\addcontentsline{lot}{table}{#1}}
\end{lcode}
-\index{caption!anonymous|)}
-\index{caption!outside a float|(}
+\index{caption!anonymous|)}%|
+\index{caption!outside a float|(}%|
The \cmd{\legend} command produces a plain, unnumbered heading. It can also
be useful sometimes to have named and numbered captions outside
@@ -15823,7 +16228,7 @@ if you want the table\index{table} or picture\index{illustration}
to appear at a precise location in your document.
-\index{caption!fixed|(}
+\index{caption!fixed|(}%|
\begin{syntax}
\cmd{\newfixedcaption}\oarg{capcommand}\marg{command}\marg{float} \\
@@ -15919,14 +16324,14 @@ ordered according the
page number in the typeset document, \emph{not} your source input order).
-\index{caption!fixed|)}
+\index{caption!fixed|)}%|
-\index{caption!outside a float|)}
+\index{caption!outside a float|)}%|
\section{Bilingual captions}
-\index{caption!bilingual|(}
-\index{bilingual captions|(}
+\index{caption!bilingual|(}%|
+\index{bilingual captions|(}%|
Some documents require bilingual (or more) captions. The class
provides a set of commands for bilingual captions. Extensions to the
@@ -16118,15 +16523,15 @@ caption with respect to the first.
a post-caption line for the second caption. The class initially specifies
\verb?\midbicaption{}?.
-\index{bilingual captions|)}
-\index{caption!bilingual|)}
+\index{bilingual captions|)}%|
+\index{caption!bilingual|)}%|
\section{Subcaptions} \label{sec:subcaps}
-\index{caption!subcaption|(}
-\index{figure!subfigure|(}
-\index{table!subtable|(}
-\index{float!subfloat|(}
+\index{caption!subcaption|(}%|
+\index{figure!subfigure|(}%|
+\index{table!subtable|(}%|
+\index{float!subfloat|(}%|
The \Lpack{subfigure} package enables the captioning of
sub-figures within a larger figure\index{figure},
@@ -16401,14 +16806,14 @@ declaration, which is the default, undoes any previous \cmd{\hangsubcaption}
or \cmd{\shortsubcaption} declaration, so that subcaptions are normally
centered.
-\index{float!subfloat|)}
-\index{table!subtable|)}
-\index{figure!subfigure|)}
-\index{caption!subcaption|)}
+\index{float!subfloat|)}%|
+\index{table!subtable|)}%|
+\index{figure!subfigure|)}%|
+\index{caption!subcaption|)}%|
\section{Side captions}
-\index{caption!side|(}
+\index{caption!side|(}%|
Typically captions are put either above or below the element they
are describing. Sometimes it is desireable to put a caption at the
@@ -16711,11 +17116,11 @@ you use a sidecaption in a wrapped float from, say, the \Lpack{wrapfig}
package, make sure that the sidecaption gets placed where it won't be
overlaid by the main text.
-\index{caption!side|)}
+\index{caption!side|)}%|
- \section{How \ltx\ makes captions} \label{sec:ltx}
+ \section{How \ltx\ makes captions} \label{sec:ltx}%|
-\index{caption!\ltx\ methods|(}
+\index{caption!\ltx\ methods|(}%|
This section provides an overview of how \ltx\ creates captions and
gives some examples of how to change the captioning style directly.
@@ -16948,13 +17353,13 @@ tools that you need to make most, if not all, of any likely caption styles.
\let\fnum@figure\oldfnum@figure
\makeatother
-\index{caption!\ltx\ methods|)}
+\index{caption!\ltx\ methods|)}%|
\section{Footnotes in captions}
-\index{caption!footnote|(}
-\index{footnote!in caption|(}
+\index{caption!footnote|(}%|
+\index{footnote!in caption|(}%|
If you want to have a caption with a footnote, think long and hard
as to whether this is really essential. It is not normally considered
@@ -17018,12 +17423,37 @@ marks\index{footnote!mark} to match correctly with the
footnote\index{footnote!text} text.
At this point, you are on your own.
+\index{footnote!in caption|)}%|
+\index{caption!footnote|)}%|
+
+
+\section{The class versus the caption package (and its friends)}
+\label{sec:class-versus-caption}
+
+For some, the configurations for captions provided by the class, are
+either a bit too complicated or not complicated enough.
+
+The \Lpack{caption} package by Alex Sommerfeldt may provide a simpler
+and much more extensive configuration interface for captions. The
+package can be used with the class, but there are a few caveats:
+\begin{enumerate}[(a)]
+\item All of the special configuration macros provided by the class
+ will no longer have any effect (\Lpack{caption} overwrites the core,
+ and thus our interfaces will have no effect),
+\item \cmd{\abovecaptionskip} will be reset to 10\,pt, and
+ \cmd{\belowcaptionskip} to zero. (The class would set both to
+ 0.5\cmd{\onelineskip}, so if you need to change these, move the
+ change until after \Lpack{caption} has been loaded)
+\end{enumerate}
+
+
+
+
-\index{footnote!in caption|)}
-\index{caption!footnote|)}
-\index{caption|)}
+
+\index{caption|)}%|
%#% extend
@@ -17033,8 +17463,8 @@ footnote\index{footnote!text} text.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-09-13 11:11:29 +0200 (Mon, 13 Sep 2010) $}
-{$LastChangedRevision: 273 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
@@ -18887,7 +19317,7 @@ characters:
\item[\pixposarg{r}] right justified.
\end{itemize}
- Each column is normaly the same
+ Each column is normally the same
width,\index{tabular!automatic!column width}\index{tabular!automatic!table width}
which is large enough to accomodate
the widest entry in the list.
@@ -19004,8 +19434,8 @@ illustrate these points.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-09-17 00:43:51 +0200 (Fri, 17 Sep 2010) $}
-{$LastChangedRevision: 274 $}
+{$LastChangedDate: 2013-05-02 16:10:51 +0200 (Thu, 02 May 2013) $}
+{$LastChangedRevision: 454 $}
{$LastChangedBy: daleif $}
\chapter{Page notes} \label{chap:mnotes}
@@ -19128,7 +19558,7 @@ the separator. Its default definition is:
\glossary(feetbelowfloat)%
{\cs{feetbelowfloat}}%
{Typeset footnotes below bottom floats.}
-In the standard classes, footnotes on a page that has a float at the
+In\fxnote{this needs checking} the standard classes, footnotes on a page that has a float at the
bottom are typeset before the float. I think that this looks
peculiar. Following the \cmd{\feetbelowfloat} declaration footnotes
will be typeset at the bottom of the page below any bottom
@@ -20331,6 +20761,582 @@ In the margin you will find the result of the following code:
And several paragraphs}\sidefootnote{And number three}
+\LMnote{2013/05/02}{Moved here from backmatter.tex}
+
+\section{Endnotes}
+\label{sec:endnotes}
+
+\LMnote{2010/10/28}{several \cs{printpagenotes} was spelled wrong}
+
+\reimplemented{December 2010}{The former implementation had some
+ difficulties handling certain types of input. A few of the macros
+ used to format the output are no longer supported/used in the new
+ implementation.}
+
+
+ Endnotes are often used instead of footnotes so as not to interrupt the
+flow of the main text. Although endnotes are normally put at the end of
+the document, they may instead be put at the end of each chapter.
+
+ The \Lpack{endnotes} package already uses the command \cmd{\endnote} for
+an endnote, so the class uses \cmd{\pagenote} for an endnote so as not
+to clash if you prefer to use the package.
+\LMnote{2011/01/23}{The implementation has nothing to do with the
+ current pagenote package, thus the remark is removed}
+% The following was originally supplied as the \Lpack{pagenote}
+% package~\cite{PAGENOTE}.
+
+\begin{syntax}
+\cmd{\makepagenote} \\
+\cmd{\pagenote}\oarg{id}\marg{text} \\
+\cmd{\printpagenotes} \cmd{\printpagenotes*} \\
+\end{syntax}
+\glossary(makepagenote)%
+ {\cs{makepagenote}}%
+ {Preamble command for enabling page/end notes.}%
+\glossary(printpagenotes)%
+ {\cs{printpagenotes}}%
+ {Input the pagenote \file{ent} file for printing, then close it to any
+ more notes.}%
+\glossary(printpagenotes*)%
+ {\cs{printpagenotes*}}%
+ {Input the pagenote \file{ent} file for printing, then empty it ready for
+ further notes.}%
+
+ The general principle is that notes are written out to a file which
+is then input at the place where the notes are to be printed. The note
+file has an \pixfile{ent} extension, like the table of contents file
+has a \pixfile{toc} extension.
+
+ You have to put \cmd{\makepagenote} in your preamble if you want
+endnotes. This will open the \pixfile{ent} note file which is called
+\verb?\jobname.ent?.
+
+ In the body of the text use use \cmd{\pagenote} to create an endnote, just
+as you would use \cmd{\footnote} to create a footnote. In the books that I have
+checked there are two common methods of identifying an endnote:
+\begin{enumerate}
+\item Like a footnote, put a number in the text at the location
+of the note and use the same number to identify the note when it
+finally gets printed.\label{pagenote:id1}
+\item Put no mark in the text, but when it is finally
+ printed\pagenote[Put no mark \ldots finally printed]{This manual uses
+ both footnotes and endnotes. For identifying the endnotes I have used the
+ `words' method for identifying the parent location of an endnote, so as not
+ to start confusing the reader with two sets of note marks in the body of the
+ text. Typically either footnotes or endnotes are used, not both, so the
+ question of distinguishing them does not normally arise.}
+use a few words from the text to identify the origin of the note. The page number
+is often used as well with this method.\label{pagenote:id2}
+\end{enumerate}
+The \meta{text} argument of \cmd{\pagenote} is the contents of the note and
+if the optional \meta{id} argument is not used the
+result is similar to having used \cmd{\footnote} --- a number in the main text
+and the corresponding number in the endnotes listing (as
+in \ref{pagenote:id1} above). For the second reference style
+(\ref{pagenote:id2} above) use the
+optional \meta{id} argument for the `few words', and no mark will be put
+into the main text but \meta{id} will be used as the identification in
+the listing.
+
+ For one set of endnotes covering the whole document put
+\cmd{\printpagenotes} where you want them printed, typically before
+any bibliography or index. The \cmd{\printpagenotes} macro inputs the
+\pixfile{ent} endnote file for printing and then closes it to any further
+notes.
+
+For notes
+at the end of each chapter put \cmd{\printpagenotes*}, which inputs
+the \pixfile{ent} file for printing then empties it ready for more notes,
+at the end of each chapter.
+
+ The simple use is like this:
+\begin{lcode}
+\documentclass[...]{memoir}
+...
+\makepagenote
+...
+\begin{document}
+\chapter{One}
+...\pagenote{An end note.} ...
+...\pagenote{Fascinating information.}
+...
+\chapter{Last}% chapter 9
+...\pagenote{Another note.}% 30th note
+...
+...
+\printpagenotes
+...
+\end{document}
+\end{lcode}
+This will result in an endnote listing looking like \fref{fig:endnote}.
+
+\begin{figure}
+\centering
+\begin{minipage}{0.8\textwidth}
+\begin{framed}
+\noindent{\bfseries\Large Notes}\\[\baselineskip]
+{\bfseries Chapter 1 One} \\[\baselineskip]
+1. An end note \\
+2. Fascinating information. \\
+.............. \\[\baselineskip]
+{\bfseries Chapter 9 Last} \\[\baselineskip]
+1. Another note \\[\baselineskip]
+\end{framed}
+\end{minipage}
+\caption{Example endnote listing}\label{fig:endnote}
+\end{figure}
+
+For notes at the end of each chapter:
+\begin{lcode}
+\documentclass[...]{memoir}
+...
+\makepagenote
+...
+\begin{document}
+\chapter{One}
+...\pagenote{An end note.} ...
+...
+\printpagenotes*
+\chapter{Last}
+...\pagenote{Another note.} ...
+...
+\printpagenotes*
+%%% no more chapters
+...
+\end{document}
+\end{lcode}
+
+\begin{syntax}
+\cmd{\continuousnotenums} \\
+\cmd{\notepageref} \\
+\end{syntax}
+\glossary(continuousnotenums)%
+ {\cs{continuousnotenums}}%
+ {Declaration to make the numbering of endnotes continuous throughout the
+ document.}%
+\glossary(notepageref)%
+ {\cs{notepageref}}%
+ {Declaration that page numbers are available to notes in the endnote listing.}
+ The \Icn{pagenote} counter is used for the notes. By default the endnotes
+are numbered per chapter. If you want the numbering
+to be continuous throughout the document use the \cmd{\continuousnotenums}
+declaration. Normally the information on which page a note was created is
+discarded but will be made available to notes in the endnote listing
+following the \cmd{\notepageref} declaration. Both
+\cmd{\continuousnotenums} and \cmd{\notepageref} can only be used in
+the preamble.
+
+\LMnote{2011/01/23}{Because of the new implementation this is no
+ longer needed as the writing to file is no longer delayed.}
+% Because of how TeX writes information to files, when the
+% \cmd{\notepageref} declaration is used there must be no notes on the
+% page where \cmd{\printpagenotes} or \cmd{\printpagenotes*} closes the
+% \pixfile{ent} file. If necessary, a \cmd{\clearpage} or similar must
+% be used before the print command.
+
+\begin{syntax}
+\cmd{\notesname} \\
+\cmd{\notedivision} \\
+\end{syntax}
+\glossary(notesname)%
+ {\cs{notesname}}%
+ {Name for endnotes, default \texttt{Notes}.}%
+\glossary(notedivision)%
+ {\cs{notedivision}}%
+ {Heading printed by the \cs{printpagenotes} and \cs{printpagenotes*} macros.}
+
+ When \cmd{\printpagenotes} (or \cmd{\printpagenotes*}) is called the
+ first thing it does is call the macro \cmd{\notedivision}. By
+ default this is defined as:
+\begin{lcode}
+\newcommand*{\notedivision}{\chapter{\notesname}}
+\end{lcode}
+with
+\begin{lcode}
+ \newcommand*{\notesname}{Notes}
+\end{lcode}
+In other words, it will print out a heading for the notes that will be read
+from the \file{ent} file. \verb?\print...? then closes the \pixfile{ent} file
+for writing and after this \verb?\input?s it to get and process the notes.
+
+
+\subsection{Changing the appearance}
+
+\subsubsection{In the text}
+\label{sec:in-the-text}
+
+
+\begin{syntax}
+\cmd{\notenumintext}\marg{num} \\
+\end{syntax}
+\glossary(notenumintext)%
+ {\cs{notenumintext}\marg{num}}%
+ {Typesets the number \meta{num} of a page note in the main text.}%
+The \Icn{pagenote} counter is used for pagenotes. The macro
+\cmd{\notenumintext} is called by \cmd{\pagenote} with the value of the
+\Icn{pagenote} counter as the \meta{num} argument to print the
+value of the \Icn{pagenote} counter in the main text. By default it is
+printed as a
+superscript, but this can be changed, or even eliminated.
+\begin{lcode}
+\newcommand*{\notenumintext}[1]{\textsuperscript{#1}}
+\end{lcode}
+
+\subsubsection{In the page note list}
+\label{sec:page-note-list}
+
+
+\LMnote{2011/01/23}{Added to make the formating code easier to understand}
+
+To better understand how a page note entry is formatted in the page
+note list, we start with the following pseudo code (it is not exactly
+what you will see in the \texttt{.ent} file, but macros will end up
+being called in this manner)
+\begin{syntax}
+\cmd{\prenoteinnotes}\\
+\cmd{\noteidinnotes}\marg{notenum}\marg{id}\\
+\cmd{\pageinnotes}\marg{auto generated note label key}\\
+\cmd{\prenotetext}\\
+\quad\meta{Page note text}\\
+\cmd{\postnotetext}\\
+\cmd{\postnoteinnotes}
+\end{syntax}
+At the start and end we have the two macros \cmd{\prenoteinnotes} and
+\cmd{\postnoteinnotes}, they take care of preparing for and ending an
+entry in the list. The list is typeset in a manner where each item is
+(at least) a paragraph, so the default definition is
+\begin{lcode}
+\newcommand{\prenoteinnotes}{\par\noindent}
+\newcommand{\postnoteinnotes}{\par}
+\end{lcode}
+\glossary(prenoteinnotes)%
+ {\cs{prenoteinnotes}}%
+ {Called by \cs{noteentry} to initialise the printing of an endnote.}%
+\glossary(postnoteinnotes)%
+ {\cs{postnoteinnotes}}%
+ {Called by \cs{noteentry} to finish the printing of an endnote.}%
+A user could change this to make it look a bit more like a list
+construction. For example the following would give a hanging
+indentation
+\begin{lcode}
+\renewcommand{\prenoteinnotes}{\par\noindent\hangindent 2em}
+\end{lcode}
+
+\fancybreak{}
+
+
+The \cmd{\noteidinnotes} calls \cmd{\idtextinnotes} to print the note \meta{id}
+if it was given as the optional argument to \cmd{pagenote},
+otherwise it calls \cmd{\notenuminnotes} to print the note number.
+\begin{syntax}
+\cmd{\noteidinnotes}\marg{notenum}\marg{id} \\
+\cmd{\idtextinnotes}\marg{id} \\
+\cmd{\notenuminnotes}\marg{num} \\
+\end{syntax}
+\glossary(noteidinnotes)%
+ {\cs{noteidinnotes}\marg{notenum}\marg{id}}%
+ {Prints an endnote's number or id in the endnote listing.}%
+\glossary(idtextinnotes)%
+ {\cs{idtextinnotes}\marg{id}}%
+ {Prints an endnote's \meta{id} text}%
+\glossary(notenuminnotes)%
+ {\cs{notenuminnotes}\marg{num}}%
+ {Typesets the number \meta{num} of a page note in the note listing.}%
+These are defined respectively as:
+\begin{lcode}
+\newcommand*{\idtextinnotes}[1]{[#1]\space}
+\newcommand*{\notenuminnotes}[1]{\normalfont #1.\space}
+\end{lcode}
+
+\fancybreak{}
+
+Next we execute \cmd{\pageinnotes}\marg{note label key} which does
+nothing by default. But if \cmd{\notepageref} is issued in the
+preamble two things happen, (1) each page note issues a label such
+that we can refer back to its page, and (2) \cmd{\pageinnotes} calls
+\cmd{\printpageinnotes} (or if \Lpack{hyperref} is loaded
+\cmd{\printpageinnoteshyperref})
+\begin{syntax}
+\cmd{\pageinnotes}\marg{auto generated note label key}\\
+\cmd{\printpageinnotes}\marg{auto generated note label key}\\
+\cmd{\printpageinnoteshyperref}\marg{auto generated note label key}
+\end{syntax}
+\glossary(pageinnotes)%
+{\cs{pageinnotes}\marg{pagenum}}%
+{Controls the printing of an endnote's page reference number.}%
+\glossary(printpageinnotes)%
+{\cs{printpageinnotes}\marg{pagenum}}%
+{Prints an endnote's page reference number.}%
+\glossary(printpageinnoteshypreref)%
+{\cs{printpageinnoteshyperref}\marg{pagenum}}%
+{Prints an endnote's page reference number whenever the
+ \protect\Lpack{hyperref} package is used, it will include a
+ hyperlink back to the page in question.}%
+Default definitions
+\begin{lcode}
+\newcommand*{\printpageinnotes}[1]{%
+ (\pagerefname\ \pageref{#1})\space}
+\newcommand\printpageinnoteshyperref[1]{%
+ (\hyperref[#1]{\pagerefname\ \pageref*{#1}})\space}
+\end{lcode}
+That is if \Lpack{hyperref} is loaded the entire text \meta{page 3}
+will be the text of a hyperlink.
+
+\bigskip
+
+\begin{syntax}
+ \cmd{\prenotetext}\\
+ \cmd{\postnotetext}\\
+\end{syntax}
+\glossary(prenotetext)%
+ {\cs{prenotetext}}%
+ {Called within a page note list entry to initialise the printing
+ of the text part of an endnote.}%
+\glossary(postnotetex)%
+ {\cs{postnotetext}}%
+ {Called within a page note list entry to finish the printing of an
+ endnote.}%
+The actual text part of the page note is enclosed by
+\cmd{\prenotetext} and \cmd{postnotetext}. By default they do nothing,
+but could easily be redefined such that (only) the entry text would be
+in italic:
+\begin{lcode}
+\renewcommand\prenotetext{\begingroup\itshape}
+\renewcommand\postnotetext{\endgroup}
+\end{lcode}
+
+
+
+%%%%%%%%%%%
+
+
+\LMnote{2011/01/25}{Covered above}
+% \begin{syntax}
+% \cmd{\notenuminnotes}\marg{num} \\
+% \end{syntax}
+% \glossary(notenuminnotes)%
+% {\cs{notenuminnotes}\marg{num}}%
+% {Typesets the number \meta{num} of a page note in the note listing.}%
+% In the note listing \cmd{\notenuminnotes} is used to print the number
+% of a note. The default definitions are:
+
+% \begin{lcode}
+% \newcommand*{\notenuminnotes}[1]{\normalfont #1.\space}
+% \end{lcode}
+
+
+
+\LMnote{2011/01/25}{Covered above, \cmd{\noteentry} is not used anymore}
+% \begin{syntax}
+% \cmd{\noteentry}\marg{notenum}\marg{id}\marg{text}\marg{pagenum} \\
+% \cmd{\prenoteinnotes} \\
+% \cmd{\postnoteinnotes} \\
+% \end{syntax}
+% \glossary(noteentry)%
+% {\cs{noteentry}\marg{notenum}\marg{id}\marg{text}\marg{pagenum}}%
+% {Typesets a pagenote with number \meta{notenum}, identifier \meta{id},
+% contents \meta{text}, created on page \meta{pagenum}.}
+% \glossary(prenoteinnotes)%
+% {\cs{prenoteinnotes}}%
+% {Called by \cs{noteentry} to initialise the printing of an endnote.}
+% \glossary(postnoteinnotes)%
+% {\cs{postnoteinnotes}}%
+% {Called by \cs{noteentry} to finish the printing of an endnote.}
+% The \cmd{\pagenote} macro writes \cmd{\noteentry}, with the appropriate
+% values for the arguments, to the \pixfile{ent} file,
+% where \meta{notenum} is the note number (from the \Icn{pagenote} counter),
+% \meta{id} and \meta{text} are as supplied to
+% \cmd{\pagenote}, and if the \cmd{\notepageref} declaration option is used,
+% \meta{pagenum} is the page number, otherwise it is empty.
+% The \cmd{\noteentry} macro controls the typesetting of the note.
+
+% The default definition of \cmd{\noteentry} is
+% \begin{lcode}
+% \newcommand{\notentry}[4]{%
+% \prenoteinnotes
+% \noteidinnotes{#1}{#2}\pageinnotes{#4}\noteinnotes{#3}%
+% \postnoteinnotes}
+% \end{lcode}
+% and the definitions of other macros are:
+% \begin{lcode}
+% \newcommand{\prenoteinnotes}{\par\noindent}
+% \newcommand{\postnoteinnotes}{\par}
+% \end{lcode}
+% so that (the first paragraph of) each note is printed as a non-indented
+% paragraph.
+
+% If you would prefer, say, hanging paragraphs try:
+% \begin{lcode}
+% \renewcommand{\prenoteinnotes}{\par\noindent\hangindent 2em}
+% \end{lcode}
+
+% \begin{syntax}
+% \cmd{\noteidinnotes}\marg{notenum}\marg{id} \\
+% \cmd{\idtextinnotes}\marg{id} \\
+% \cmd{\notenuminnotes}\marg{num} \\
+% \end{syntax}
+% \glossary(noteidinnotes)%
+% {\cs{noteidinnotes}\marg{notenum}\marg{id}}%
+% {Prints an endnote's number or id in the endnote listing.}%
+% \glossary(idtextinnotes)%
+% {\cs{idtextinnotes}\marg{id}}%
+% {Prints an endnote's \meta{id} text}%
+% The \cmd{\noteidinnotes} calls \cmd{\idtextinnotes} to print the note \meta{id}
+% if it was given as the optional argument to \cmd{pagenote},
+% otherwise it calls \cmd{\notenuminnotes} to print the note number.
+% These are defined respectively as:
+% \begin{lcode}
+% \newcommand*{\idtextinnotes}[1]{[#1]\space}
+% \newcommand*{\notenuminnotes}[1]{\normalfont #1.\space}
+% \end{lcode}
+
+% \begin{syntax}
+% \cmd{\pageinnotes}\marg{pagenum} \\
+% \cmd{\printpageinnotes}\marg{pagenum} \\
+% \end{syntax}
+% \glossary(pageinnotes)%
+% {\cs{pageinnotes}\marg{pagenum}}%
+% {Controls the printing of an endnote's page reference number.}%
+% \glossary(printpageinnotes)%
+% {\cs{printpageinnotes}\marg{pagenum}}%
+% {Prints an endnote's page reference number.}%
+% The macro \cmd{\pageinnotes} controls the printing of a note's page
+% reference. If the
+% \cmd{\notepageref} declaration has been used it calls
+% \cmd{\printpageinnotes} to do the actual printing. Its definition is:
+% \begin{lcode}
+% \newcommand*{\printpageinnotes}[1]{%
+% (\pagerefname\ #1)\space}
+% \end{lcode}
+
+% \begin{syntax}
+% \cmd{\noteinnotes}\marg{text} \\
+% \end{syntax}
+% \glossary(noteinnotes)%
+% {\cs{noteinnotes}\marg{text}}%
+% {Prints the text of an endnote.}%
+% The macro \cmd{\noteinnotes}\marg{text} is simply:
+% \begin{lcode}
+% \newcommand{\noteinnotes}[1]{#1}
+% \end{lcode}
+% and is used to print the text of a note.
+
+
+
+
+\bigskip
+
+
+
+\LMnote{2011/01/25}{rewritten a bit}
+\begin{syntax}
+\cmd{\addtonotes}\marg{text} \\
+\end{syntax}
+\glossary(addtonotes)%
+ {\cs{addtonotes}\marg{text}}%
+ {Inserts \meta{text} into the endnotes \file{ent} file.}%
+The macro \cmd{\addtonotes} inserts \meta{text} into the \pixfile{ent}
+file.
+
+\begin{note}
+ As the argument to \cmd{\pagenote} and \cmd{\addtonotes} is moving
+ you may have to \cmd{\protect} any fragile commands. If you get
+ strange error messages, try using \cmd{\protect} and see if they go
+ away.
+\end{note}
+\fancybreak{}
+
+Internally in \cmd{\pagenote} \cmd{\addtonotes} is used to provide
+chapter devisions into the note list. It will detect both numbered and
+unnumbered chapters. The actual text is provided using
+\begin{syntax}
+\cmd{\pagenotesubhead}\marg{chapapp}\marg{num}\marg{title} \\
+\cmd{\pagenotesubheadstarred}\marg{chapapp}\marg{num}\marg{title} \\
+\cmd{\pnchap} \cmd{\pnschap} \\
+\end{syntax}
+\glossary(pagenotesubhead)%
+ {\cs{pagenotesubhead}\marg{chapapp}\marg{num}\marg{title}}%
+ {Typesets a subheading for notes from chapter or appendix \meta{chapapp}
+ \meta{num} called \meta{title}.}%
+\glossary(pagenotesubheadstarred)%
+ {\cs{pagenotesubheadstarred}\marg{chapapp}\marg{num}\marg{title}}%
+ {Typesets a subheading for notes from unnumbered chapter or appendix
+ \meta{chapapp} \meta{num} called \meta{title}.}%
+\glossary(pnchap)%
+ {\cs{pnchap}}%
+ {Chapter title for \cs{pagenotesubhead}. Defaults to the ToC entry.}
+\glossary(pnschap)%
+{\cs{pnschap}}%
+{Starred chapter title for \cs{pagenotesubhead}. Defaults to the regular title.}
+
+The macro \cmd{\pagenotesubhead} typesets the subheadings in an
+endnote list. The \meta{chapapp} argument is normally
+\cmd{\chaptername} but if the notes are from an appendix then
+\cmd{\appendixname} is used instead. \meta{num} is the number of the
+chapter, or blank if there is no number. Lastly, \meta{title} is
+\cmd{\pnchap} for regular chapters which defaults to the ToC entry, or
+\cmd{\pnschap} for starred chapters which defaults to the normal
+title. The default definition of \cmd{\pagenotesubhead} is very
+simply:
+\begin{lcode}
+\newcommand*{\pagenotesubhead}[3]{%
+ \section*{#1 #2 #3}}
+\newcommand\pagenotesubheadstarred{\pagenotesubhead} % i.e. the same
+\end{lcode}
+By default this means that the header for starred chapters will be
+something like >>Chapter Title<<, which may look odd. In that case
+redefine \cmd{\pagenotesubheadstarred} to something similar to
+\begin{lcode}
+\renewcommand\pagenotesubheadstarred{\section*{#3}}
+\end{lcode}
+Just remember that unless you have specified \cmd{\continuousnotenums}
+in the preamble the note counter (\Icn{pagenote}) will only be reset
+at the start of any numbered chapters (because it is tied to changes
+in the chapter counter).
+
+The scheme is set up under the assumption that notes will only be
+printed at the end of the document. If you intend to put them at the
+end of each chapter, then you will probably want to change the
+definitions of the \cmd{\notedivision} and \cmd{\pagenotesubhead}
+macros. For example:
+\begin{lcode}
+\renewcommand*{\notedivision}{\section*{\notesname}}
+\renewcommand*{\pagenotesubhead}[3]{}
+\end{lcode}
+and remember to use \cmd{\printpagenotes*} at each place you want the
+current set of notes to be printed.
+
+\fancybreak{}
+
+Say you have written a document with footnotes, but later on decide on
+using end notes (page notes) instead. In that case you can use
+\cmd{\foottopagenote} to make \cmd{\footnote}, \cmd{\footnotemark} and
+\cmd{\footnotetext} works as if it was implemented using end notes. On
+the other hand \cmd{\pagetofootnote} makes all page notes into
+footnotes (note that this might not work, because there are places
+where page notes can be issued but foot notes cannot).
+
+\begin{syntax}
+\cmd{\foottopagenote}\\ \cmd{\pagetofootnote} \\
+\end{syntax}
+\glossary(foottopagenote)%
+ {\cs{foottopagenote}}%
+ {Declaration which turns \cs{footnote}s into \cs{pagenote}s.}%
+\glossary(pagetofootnote)%
+ {\cs{pagetofootnote}}%
+ {Declaration which turns \cs{pagenote}s into \cs{footnote}s.}%
+ % You can have both footnotes and endnotes in the same
+ % document. However you may start with all footnotes and later
+ % decide you would have preferred endnotes instead, or
+ % \emph{vice-versa}. The \cmd{\foottopagenote} declaration makes
+ % \cmd{\footnote}s behave as \cmd{\pagenote}s, and
+ % \cmd{\pagetofootnote} has the opposite effect.
+In either conversion the optional argument will be
+ignored as for \cmd{\pagenote} it can be arbitrary text whereas for
+\cmd{\footnote} it must be a number.
+
+
@@ -20351,8 +21357,8 @@ In the margin you will find the result of the following code:
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
@@ -20804,8 +21810,8 @@ for epigraphs after the title (or the equivalents for \cmd{\book} pages).
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -21964,8 +22970,8 @@ and the result is shown on the next page.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-10-28 23:30:16 +0200 (Thu, 28 Oct 2010) $}
-{$LastChangedRevision: 305 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -23298,16 +24304,16 @@ currently associated with the input stream \meta{stream}. This
provides the same functionality as \cmd{\input}\marg{filename}.
\begin{syntax}
-\cmd{\readline}\marg{stream} \\
+\cmd{\readaline}\marg{stream} \\
\end{syntax}
-\glossary(readline)%
- {\cs{readline}\marg{stream}}%
+\glossary(readaline)%
+ {\cs{readaline}\marg{stream}}%
{Reads a single line from the file associated with the input \meta{stream}.}
-The \cmd{\readline} reads\index{file!read!single line} what \tx\
+The \cmd{\readaline} reads\index{file!read!single line} what \tx\
considers to be one line from
the file that is currently associated with the input stream \meta{stream}.
-Multiple lines can be read by calling \cmd{\readline} multiple times.
+Multiple lines can be read by calling \cmd{\readaline} multiple times.
A warning is issued if there are no more lines to be read (i.e., the
end of the file has been reached).
@@ -23949,8 +24955,8 @@ In increasing or decreasing order of probability (your choice) they are:
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -24316,8 +25322,8 @@ will require the use of \cmd{\titleref} and so the declaration
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2011-01-25 13:33:59 +0100 (Tue, 25 Jan 2011) $}
-{$LastChangedRevision: 334 $}
+{$LastChangedDate: 2013-05-02 16:10:51 +0200 (Thu, 02 May 2013) $}
+{$LastChangedRevision: 454 $}
{$LastChangedBy: daleif $}
@@ -26150,571 +27156,7 @@ pdflatex memman
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Endnotes}
-\label{sec:endnotes}
-
-\LMnote{2010/10/28}{several \cs{printpagenotes} was spelled wrong}
-
-\reimplemented{December 2010}{The former implementation had some
- difficulties handling certain types of input. A few of the macros
- used to format the output are no longer supported/used in the new
- implementation.}
-
-
- Endnotes are often used instead of footnotes so as not to interrupt the
-flow of the main text. Although endnotes are normally put at the end of
-the document, they may instead be put at the end of each chapter.
-
- The \Lpack{endnotes} package already uses the command \cmd{\endnote} for
-an endnote, so the class uses \cmd{\pagenote} for an endnote so as not
-to clash if you prefer to use the package.
-\LMnote{2011/01/23}{The implementation has nothing to do with the
- current pagenote package, thus the remark is removed}
-% The following was originally supplied as the \Lpack{pagenote}
-% package~\cite{PAGENOTE}.
-
-\begin{syntax}
-\cmd{\makepagenote} \\
-\cmd{\pagenote}\oarg{id}\marg{text} \\
-\cmd{\printpagenotes} \cmd{\printpagenotes*} \\
-\end{syntax}
-\glossary(makepagenote)%
- {\cs{makepagenote}}%
- {Preamble command for enabling page/end notes.}%
-\glossary(printpagenotes)%
- {\cs{printpagenotes}}%
- {Input the pagenote \file{ent} file for printing, then close it to any
- more notes.}%
-\glossary(printpagenotes*)%
- {\cs{printpagenotes*}}%
- {Input the pagenote \file{ent} file for printing, then empty it ready for
- further notes.}%
-
- The general principle is that notes are written out to a file which
-is then input at the place where the notes are to be printed. The note
-file has an \pixfile{ent} extension, like the table of contents file
-has a \pixfile{toc} extension.
-
- You have to put \cmd{\makepagenote} in your preamble if you want
-endnotes. This will open the \pixfile{ent} note file which is called
-\verb?\jobname.ent?.
-
- In the body of the text use use \cmd{\pagenote} to create an endnote, just
-as you would use \cmd{\footnote} to create a footnote. In the books that I have
-checked there are two common methods of identifying an endnote:
-\begin{enumerate}
-\item Like a footnote, put a number in the text at the location
-of the note and use the same number to identify the note when it
-finally gets printed.\label{pagenote:id1}
-\item Put no mark in the text, but when it is finally
- printed\pagenote[Put no mark \ldots finally printed]{This manual uses
- both footnotes and endnotes. For identifying the endnotes I have used the
- `words' method for identifying the parent location of an endnote, so as not
- to start confusing the reader with two sets of note marks in the body of the
- text. Typically either footnotes or endnotes are used, not both, so the
- question of distinguishing them does not normally arise.}
-use a few words from the text to identify the origin of the note. The page number
-is often used as well with this method.\label{pagenote:id2}
-\end{enumerate}
-The \meta{text} argument of \cmd{\pagenote} is the contents of the note and
-if the optional \meta{id} argument is not used the
-result is similar to having used \cmd{\footnote} --- a number in the main text
-and the corresponding number in the endnotes listing (as
-in \ref{pagenote:id1} above). For the second reference style
-(\ref{pagenote:id2} above) use the
-optional \meta{id} argument for the `few words', and no mark will be put
-into the main text but \meta{id} will be used as the identification in
-the listing.
-
- For one set of endnotes covering the whole document put
-\cmd{\printpagenotes} where you want them printed, typically before
-any bibliography or index. The \cmd{\printpagenotes} macro inputs the
-\pixfile{ent} endnote file for printing and then closes it to any further
-notes.
-
-For notes
-at the end of each chapter put \cmd{\printpagenotes*}, which inputs
-the \pixfile{ent} file for printing then empties it ready for more notes,
-at the end of each chapter.
-
- The simple use is like this:
-\begin{lcode}
-\documentclass[...]{memoir}
-...
-\makepagenote
-...
-\begin{document}
-\chapter{One}
-...\pagenote{An end note.} ...
-...\pagenote{Fascinating information.}
-...
-\chapter{Last}% chapter 9
-...\pagenote{Another note.}% 30th note
-...
-...
-\printpagenotes
-...
-\end{document}
-\end{lcode}
-This will result in an endnote listing looking like \fref{fig:endnote}.
-
-\begin{figure}
-\centering
-\begin{minipage}{0.8\textwidth}
-\begin{framed}
-\noindent{\bfseries\Large Notes}\\[\baselineskip]
-{\bfseries Chapter 1 One} \\[\baselineskip]
-1. An end note \\
-2. Fascinating information. \\
-.............. \\[\baselineskip]
-{\bfseries Chapter 9 Last} \\[\baselineskip]
-1. Another note \\[\baselineskip]
-\end{framed}
-\end{minipage}
-\caption{Example endnote listing}\label{fig:endnote}
-\end{figure}
-
-For notes at the end of each chapter:
-\begin{lcode}
-\documentclass[...]{memoir}
-...
-\makepagenote
-...
-\begin{document}
-\chapter{One}
-...\pagenote{An end note.} ...
-...
-\printpagenotes*
-\chapter{Last}
-...\pagenote{Another note.} ...
-...
-\printpagenotes*
-%%% no more chapters
-...
-\end{document}
-\end{lcode}
-
-\begin{syntax}
-\cmd{\continuousnotenums} \\
-\cmd{\notepageref} \\
-\end{syntax}
-\glossary(continuousnotenums)%
- {\cs{continuousnotenums}}%
- {Declaration to make the numbering of endnotes continuous throughout the
- document.}%
-\glossary(notepageref)%
- {\cs{notepageref}}%
- {Declaration that page numbers are available to notes in the endnote listing.}
- The \Icn{pagenote} counter is used for the notes. By default the endnotes
-are numbered per chapter. If you want the numbering
-to be continuous throughout the document use the \cmd{\continuousnotenums}
-declaration. Normally the information on which page a note was created is
-discarded but will be made available to notes in the endnote listing
-following the \cmd{\notepageref} declaration. These declarations should
-be put in your preamble.
-
-\LMnote{2011/01/23}{Because of the new implementation this is no
- longer needed as the writing to file is no longer delayed.}
-% Because of how TeX writes information to files, when the
-% \cmd{\notepageref} declaration is used there must be no notes on the
-% page where \cmd{\printpagenotes} or \cmd{\printpagenotes*} closes the
-% \pixfile{ent} file. If necessary, a \cmd{\clearpage} or similar must
-% be used before the print command.
-
-\begin{syntax}
-\cmd{\notesname} \\
-\cmd{\notedivision} \\
-\end{syntax}
-\glossary(notesname)%
- {\cs{notesname}}%
- {Name for endnotes, default \texttt{Notes}.}%
-\glossary(notedivision)%
- {\cs{notedivision}}%
- {Heading printed by the \cs{printpagenotes} and \cs{printpagenotes*} macros.}
-
- When \cmd{\printpagenotes} (or \cmd{\printpagenotes*}) is called the
- first thing it does is call the macro \cmd{\notedivision}. By
- default this is defined as:
-\begin{lcode}
-\newcommand*{\notesname}{Notes}
-\newcommand*{\notedivision}{\chapter{\notesname}}
-\end{lcode}
-In other words, it will print out a heading for the notes that will be read
-from the \file{ent} file. \verb?\print...? then closes the \pixfile{ent} file
-for writing and after this \verb?\input?s it to get and process the notes.
-
-
-\subsection{Changing the appearance}
-
-\subsubsection{In the text}
-\label{sec:in-the-text}
-
-
-\begin{syntax}
-\cmd{\notenumintext}\marg{num} \\
-\end{syntax}
-\glossary(notenumintext)%
- {\cs{notenumintext}\marg{num}}%
- {Typesets the number \meta{num} of a page note in the main text.}%
-The \Icn{pagenote} counter is used for pagenotes. The macro
-\cmd{\notenumintext} is called by \cmd{\pagenote} with the value of the
-\Icn{pagenote} counter as the \meta{num} argument to print the
-value of the \Icn{pagenote} counter in the main text. By default it is
-printed as a
-superscript, but this can be changed, or even eliminated.
-\begin{lcode}
-\newcommand*{\notenumintext}[1]{\textsuperscript{#1}}
-\end{lcode}
-
-\subsubsection{In the page note list}
-\label{sec:page-note-list}
-
-
-\LMnote{2011/01/23}{Added to make the formating code easier to understand}
-
-To better understand how a page note entry is formatted in the page
-note list, we start with the following pseudo code
-\begin{syntax}
-\cmd{\prenoteinnotes}\\
-\cmd{\noteidinnotes}\marg{notenum}\marg{id}\\
-\cmd{\pageinnotes}\marg{auto generated note label key}\\
-\cmd{\prenotetext}\\
-\quad\meta{Page note text}\\
-\cmd{\postnotetext}\\
-\cmd{\postnoteinnotes}
-\end{syntax}
-At the start and end we have the two macros \cmd{prenoteinnotes} and
-\cmd{\postnoteinnotes}, they take care of preparing for and ending an
-entry in the list. The list is typeset in a manner where each item is
-(at least) a paragraph, so the default definition is
-\begin{lcode}
-\newcommand{\prenoteinnotes}{\par\noindent}
-\newcommand{\postnoteinnotes}{\par}
-\end{lcode}
-\glossary(prenoteinnotes)%
- {\cs{prenoteinnotes}}%
- {Called by \cs{noteentry} to initialise the printing of an endnote.}
-\glossary(postnoteinnotes)%
- {\cs{postnoteinnotes}}%
- {Called by \cs{noteentry} to finish the printing of an endnote.}
-A user could change this to make it look a bit more like a list
-construction. For example the following would give a hanging
-indentation
-\begin{lcode}
-\renewcommand{\prenoteinnotes}{\par\noindent\hangindent 2em}
-\end{lcode}
-
-\fancybreak{}
-
-
-The \cmd{\noteidinnotes} calls \cmd{\idtextinnotes} to print the note \meta{id}
-if it was given as the optional argument to \cmd{pagenote},
-otherwise it calls \cmd{\notenuminnotes} to print the note number.
-\begin{syntax}
-\cmd{\noteidinnotes}\marg{notenum}\marg{id} \\
-\cmd{\idtextinnotes}\marg{id} \\
-\cmd{\notenuminnotes}\marg{num} \\
-\end{syntax}
-\glossary(noteidinnotes)%
- {\cs{noteidinnotes}\marg{notenum}\marg{id}}%
- {Prints an endnote's number or id in the endnote listing.}%
-\glossary(idtextinnotes)%
- {\cs{idtextinnotes}\marg{id}}%
- {Prints an endnote's \meta{id} text}%
-\glossary(notenuminnotes)%
- {\cs{notenuminnotes}\marg{num}}%
- {Typesets the number \meta{num} of a page note in the note listing.}%
-These are defined respectively as:
-\begin{lcode}
-\newcommand*{\idtextinnotes}[1]{[#1]\space}
-\newcommand*{\notenuminnotes}[1]{\normalfont #1.\space}
-\end{lcode}
-
-\fancybreak{}
-
-Next we execute \cmd{\pageinnotes}\marg{note label key} which does
-nothing by default. But if \cmd{\notepageref} is issued in the
-preamble two things happen, (1) each page note issues a label such
-that we can refer back to its page, and (2) \cmd{\pageinnotes} calls
-\cmd{\printpageinnotes} (or if \Lpack{hyperref} is loaded
-\cmd{\printpageinnoteshyperref})
-\begin{syntax}
-\cmd{\pageinnotes}\marg{auto generated note label key}\\
-\cmd{\printpageinnotes}\marg{auto generated note label key}\\
-\cmd{\printpageinnoteshyperref}\marg{auto generated note label key}
-\end{syntax}
-\glossary(pageinnotes)%
-{\cs{pageinnotes}\marg{pagenum}}%
-{Controls the printing of an endnote's page reference number.}%
-\glossary(printpageinnotes)%
-{\cs{printpageinnotes}\marg{pagenum}}%
-{Prints an endnote's page reference number.}%
-\glossary(printpageinnoteshypreref)%
-{\cs{printpageinnoteshyperref}\marg{pagenum}}%
-{Prints an endnote's page reference number whenever the
- \protect\Lpack{hyperref} package is used, it will include a
- hyperlink back to the page in question.}%
-Default definitions
-\begin{lcode}
-\newcommand*{\printpageinnotes}[1]{%
- (\pagerefname\ \pageref{#1})\space}
-\newcommand\printpageinnoteshyperref[1]{%
- (\hyperref[#1]{\pagerefname\ \pageref*{#1}})\space}
-\end{lcode}
-That is if \Lpack{hyperref} is loaded the entire text \meta{page 3}
-will be the text of a hyperlink.
-
-\bigskip
-
-\begin{syntax}
- \cmd{\prenotetext}\\
- \cmd{\postnotetext}\\
-\end{syntax}
-\glossary(prenotetext)%
- {\cs{prenotetext}}%
- {Called within a page note list entry to initialise the printing
- of the text part of an endnote.}%
-\glossary(postnotetex)%
- {\cs{postnotetext}}%
- {Called within a page note list entry to finish the printing of an
- endnote.}%
-The actual text part of the page note is enclosed by
-\cmd{\prenotetext} and \cmd{postnotetext}. By default they do nothing,
-but could easily be redefined such that (only) the entry text would be
-in italic:
-\begin{lcode}
-\renewcommand\prenotetext{\begingroup\itshape}
-\renewcommand\postnotetext{\endgroup}
-\end{lcode}
-
-
-
-%%%%%%%%%%%
-
-
-\LMnote{2011/01/25}{Covered above}
-% \begin{syntax}
-% \cmd{\notenuminnotes}\marg{num} \\
-% \end{syntax}
-% \glossary(notenuminnotes)%
-% {\cs{notenuminnotes}\marg{num}}%
-% {Typesets the number \meta{num} of a page note in the note listing.}%
-% In the note listing \cmd{\notenuminnotes} is used to print the number
-% of a note. The default definitions are:
-
-% \begin{lcode}
-% \newcommand*{\notenuminnotes}[1]{\normalfont #1.\space}
-% \end{lcode}
-
-
-
-\LMnote{2011/01/25}{Covered above, \cmd{\noteentry} is not used anymore}
-% \begin{syntax}
-% \cmd{\noteentry}\marg{notenum}\marg{id}\marg{text}\marg{pagenum} \\
-% \cmd{\prenoteinnotes} \\
-% \cmd{\postnoteinnotes} \\
-% \end{syntax}
-% \glossary(noteentry)%
-% {\cs{noteentry}\marg{notenum}\marg{id}\marg{text}\marg{pagenum}}%
-% {Typesets a pagenote with number \meta{notenum}, identifier \meta{id},
-% contents \meta{text}, created on page \meta{pagenum}.}
-% \glossary(prenoteinnotes)%
-% {\cs{prenoteinnotes}}%
-% {Called by \cs{noteentry} to initialise the printing of an endnote.}
-% \glossary(postnoteinnotes)%
-% {\cs{postnoteinnotes}}%
-% {Called by \cs{noteentry} to finish the printing of an endnote.}
-% The \cmd{\pagenote} macro writes \cmd{\noteentry}, with the appropriate
-% values for the arguments, to the \pixfile{ent} file,
-% where \meta{notenum} is the note number (from the \Icn{pagenote} counter),
-% \meta{id} and \meta{text} are as supplied to
-% \cmd{\pagenote}, and if the \cmd{\notepageref} declaration option is used,
-% \meta{pagenum} is the page number, otherwise it is empty.
-% The \cmd{\noteentry} macro controls the typesetting of the note.
-
-% The default definition of \cmd{\noteentry} is
-% \begin{lcode}
-% \newcommand{\notentry}[4]{%
-% \prenoteinnotes
-% \noteidinnotes{#1}{#2}\pageinnotes{#4}\noteinnotes{#3}%
-% \postnoteinnotes}
-% \end{lcode}
-% and the definitions of other macros are:
-% \begin{lcode}
-% \newcommand{\prenoteinnotes}{\par\noindent}
-% \newcommand{\postnoteinnotes}{\par}
-% \end{lcode}
-% so that (the first paragraph of) each note is printed as a non-indented
-% paragraph.
-
-% If you would prefer, say, hanging paragraphs try:
-% \begin{lcode}
-% \renewcommand{\prenoteinnotes}{\par\noindent\hangindent 2em}
-% \end{lcode}
-
-% \begin{syntax}
-% \cmd{\noteidinnotes}\marg{notenum}\marg{id} \\
-% \cmd{\idtextinnotes}\marg{id} \\
-% \cmd{\notenuminnotes}\marg{num} \\
-% \end{syntax}
-% \glossary(noteidinnotes)%
-% {\cs{noteidinnotes}\marg{notenum}\marg{id}}%
-% {Prints an endnote's number or id in the endnote listing.}%
-% \glossary(idtextinnotes)%
-% {\cs{idtextinnotes}\marg{id}}%
-% {Prints an endnote's \meta{id} text}%
-% The \cmd{\noteidinnotes} calls \cmd{\idtextinnotes} to print the note \meta{id}
-% if it was given as the optional argument to \cmd{pagenote},
-% otherwise it calls \cmd{\notenuminnotes} to print the note number.
-% These are defined respectively as:
-% \begin{lcode}
-% \newcommand*{\idtextinnotes}[1]{[#1]\space}
-% \newcommand*{\notenuminnotes}[1]{\normalfont #1.\space}
-% \end{lcode}
-
-% \begin{syntax}
-% \cmd{\pageinnotes}\marg{pagenum} \\
-% \cmd{\printpageinnotes}\marg{pagenum} \\
-% \end{syntax}
-% \glossary(pageinnotes)%
-% {\cs{pageinnotes}\marg{pagenum}}%
-% {Controls the printing of an endnote's page reference number.}%
-% \glossary(printpageinnotes)%
-% {\cs{printpageinnotes}\marg{pagenum}}%
-% {Prints an endnote's page reference number.}%
-% The macro \cmd{\pageinnotes} controls the printing of a note's page
-% reference. If the
-% \cmd{\notepageref} declaration has been used it calls
-% \cmd{\printpageinnotes} to do the actual printing. Its definition is:
-% \begin{lcode}
-% \newcommand*{\printpageinnotes}[1]{%
-% (\pagerefname\ #1)\space}
-% \end{lcode}
-
-% \begin{syntax}
-% \cmd{\noteinnotes}\marg{text} \\
-% \end{syntax}
-% \glossary(noteinnotes)%
-% {\cs{noteinnotes}\marg{text}}%
-% {Prints the text of an endnote.}%
-% The macro \cmd{\noteinnotes}\marg{text} is simply:
-% \begin{lcode}
-% \newcommand{\noteinnotes}[1]{#1}
-% \end{lcode}
-% and is used to print the text of a note.
-
-
-
-
-\bigskip
-
-
-
-\LMnote{2011/01/25}{rewritten a bit}
-\begin{syntax}
-\cmd{\addtonotes}\marg{text} \\
-\end{syntax}
-\glossary(addtonotes)%
- {\cs{addtonotes}\marg{text}}%
- {Inserts \meta{text} into the endnotes \file{ent} file.}%
-The macro \cmd{\addtonotes} inserts \meta{text} into the \pixfile{ent}
-file.
-
-\textbf{Note:} As the argument to \cmd{\pagenote} and
-\cmd{\addtonotes} is moving you may have to \cmd{\protect} any fragile
-commands. If you get strange error messages, try using \cmd{\protect}
-and see if they go away.
-
-\fancybreak{}
-
-Internally in \cmd{\pagenote} \cmd{\addtonotes} is used to provide
-chapter devisions into the note list. It will detect both numbered and
-unnumbered chapters. The actual text is provided using
-\begin{syntax}
-\cmd{\pagenotesubhead}\marg{chapapp}\marg{num}\marg{title} \\
-\cmd{\pagenotesubheadstarred}\marg{chapapp}\marg{num}\marg{title} \\
-\cmd{\pnchap} \cmd{\pnschap} \\
-\end{syntax}
-\glossary(pagenotesubhead)%
- {\cs{pagenotesubhead}\marg{chapapp}\marg{num}\marg{title}}%
- {Typesets a subheading for notes from chapter or appendix \meta{chapapp}
- \meta{num} called \meta{title}.}%
-\glossary(pagenotesubheadstarred)%
- {\cs{pagenotesubheadstarred}\marg{chapapp}\marg{num}\marg{title}}%
- {Typesets a subheading for notes from unnumbered chapter or appendix
- \meta{chapapp} \meta{num} called \meta{title}.}%
-\glossary(pnchap)%
- {\cs{pnchap}}%
- {Chapter title for \cs{pagenotesubhead}. Defaults to the ToC entry.}
-\glossary(pnschap)%
-{\cs{pnschap}}%
-{Starred chapter title for \cs{pagenotesubhead}. Defaults to the regular title.}
-
-The macro \cmd{\pagenotesubhead} typesets the subheadings in an
-endnote list. The \meta{chapapp} argument is normally
-\cmd{\chaptername} but if the notes are from an appendix then
-\cmd{\appendixname} is used instead. \meta{num} is the number of the
-chapter, or blank if there is no number. Lastly, \meta{title} is
-\cmd{\pnchap} for regular chapters which defaults to the ToC entry, or
-\cmd{\pnschap} for starred chapters which defaults to the normal
-title. The default definition of \cmd{\pagenotesubhead} is very
-simply:
-\begin{lcode}
-\newcommand*{\pagenotesubhead}[3]{%
- \section*{#1 #2 #3}}
-\newcommand\pagenotesubheadstarred{\pagenotesubhead} % i.e. the same
-\end{lcode}
-By default this means that the header for starred chapters will be
-something like >>Chapter Title<<, which may look odd. In that case
-redefine \cmd{\pagenotesubheadstarred} to something similar to
-\begin{lcode}
-\renewcommand\pagenotesubheadstarred{\section*{#3}}
-\end{lcode}
-Just remember that unless you have specified \cmd{\continuousnotenums}
-in the preamble the note counter (\Icn{pagenote}) will only be reset
-at the start of any numbered chapters (because it is tied to changes
-in the chapter counter).
-
-The scheme is set up under the assumption that notes will only be
-printed at the end of the document. If you intend to put them at the
-end of each chapter, then you will probably want to change the
-definitions of the \cmd{\notedivision} and \cmd{\pagenotesubhead}
-macros. For example:
-\begin{lcode}
-\renewcommand*{\notedivision}{\section*{\notesname}}
-\renewcommand*{\pagenotesubhead}[3]{}
-\end{lcode}
-and remember to use \cmd{\printpagenotes*} at each place you want the
-current set of notes to be printed.
-
-\fancybreak{}
-
-Say you have written a document with footnotes, but later on decide on
-using end notes (page notes) instead. In that case you can use
-\cmd{\foottopagenote} to make \cmd{\footnote}, \cmd{\footnotemark} and
-\cmd{\footnotetext} works as if it was implemented using end notes. On
-the other hand \cmd{\pagetofootnote} makes all page notes into
-footnotes (note that this might not work, because there are places
-where page notes can be issued but foot notes cannot).
-
-\begin{syntax}
-\cmd{\foottopagenote}\\ \cmd{\pagetofootnote} \\
-\end{syntax}
-\glossary(foottopagenote)%
- {\cs{foottopagenote}}%
- {Declaration which turns \cs{footnote}s into \cs{pagenote}s.}%
-\glossary(pagetofootnote)%
- {\cs{pagetofootnote}}%
- {Declaration which turns \cs{pagenote}s into \cs{footnote}s.}%
- % You can have both footnotes and endnotes in the same
- % document. However you may start with all footnotes and later
- % decide you would have preferred endnotes instead, or
- % \emph{vice-versa}. The \cmd{\foottopagenote} declaration makes
- % \cmd{\footnote}s behave as \cmd{\pagenote}s, and
- % \cmd{\pagetofootnote} has the opposite effect.
-In either conversion the optional argument will be
-ignored as for \cmd{\pagenote} it can be arbitrary text whereas for
-\cmd{\footnote} it must be a number.
+\LMnote{2013/05/02}{Section about endnotes moved page-notes.tex}
@@ -26723,8 +27165,8 @@ ignored as for \cmd{\pagenote} it can be arbitrary text whereas for
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-12-06 00:21:35 +0100 (Mon, 06 Dec 2010) $}
-{$LastChangedRevision: 315 $}
+{$LastChangedDate: 2013-05-17 16:33:35 +0200 (Fri, 17 May 2013) $}
+{$LastChangedRevision: 466 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -26790,7 +27232,7 @@ marking in the \Lclass{iso} class~\cite{ISOCLASS}.
{\cs{nochangemarks}}%
{Do not print change marks.}
The change marking macros only work properly when the \Lopt{draft} class
-option is used. Additionaly, the marks are only printed when the
+option is used. Additionally, the marks are only printed when the
\cmd{\changemarks} declaration is in effect. Using \cmd{\nochangemarks}
switches off any marking.
@@ -26827,7 +27269,7 @@ marks can be placed on each page, usually to indicate where the stock should
be trimmed to obtain the planned page size.
\begin{syntax}
-\cmd{\showtrimsoff} \cmd{\showtrimeson} \\
+\cmd{\showtrimsoff} \cmd{\showtrimson} \\
\end{syntax}
\glossary(showtrimsoff)%
{\cs{showtrimsoff}}%
@@ -26841,6 +27283,23 @@ declaration switches off the trim marks; the \cmd{\showtrimson} declaration,
which is the default, switches on the trim marks. These declarations do
nothing if the \Lopt{showtrims} option has not been used.
+\LMnote{2013/05/01}{added caveat}
+\begin{caveat}
+ Most modern \LaTeX\ editors make use of the \emph{synctex} features
+ in, say, pdf\LaTeX\ to enable \emph{reverse search} from the PDF
+ previewer back tot he source code in the editor. That is, click in a
+ certain manner in the PDF previewer and you will be taken to the
+ corresponding (or there about) line in the source code.
+
+ Apparently the \emph{synctex} feature does not like the trimmarks
+ the class provide, or the \pstyle{showlocs} page style. The code
+ line one is referred back to may be off by tens of lines.
+
+ Currently, there is no known workarounds for this deficiency.
+\end{caveat}
+
+
+
Trim marks can be placed at each corner of the (trimmed) page, and also
at the middle of each side of the page.
@@ -27500,14 +27959,15 @@ values. For example:
\section{Odd/even page checking}
- It is difficult to check robustly if the current page is odd or even but
-the class does provide a robust method based on writing out a label and then
-checking the page reference for the label. This requires at least two \ltx\
-runs to stabilise. This has been extracted from the original
-\Lpack{chngpage} package~\cite{CHNGPAGE}. (The class code and \Lpack{chngpage}
-code is similar but not identical. There is a later package,
-\Lpack{changepage}~\cite{CHANGEPAGE}
-which contains code that is identical to the class.)
+It is difficult to check robustly if the current page is odd or even
+but the class does provide a robust method based on writing out a
+label and then checking the page reference for the label. This
+requires at least two \ltx\ runs to stabilise. This has been extracted
+from the original \Lpack{chngpage} package (which is no longer
+available). (The class code and \Lpack{chngpage} code is similar but
+not identical. There is a later package,
+\Lpack{changepage}~\cite{CHANGEPAGE} which contains code that is
+identical to the class.)
\begin{syntax}
@@ -28095,6 +28555,10 @@ is equivalent to
The command \cmd{\checkifinteger} ckecks if \meta{num} is an integer
(not less than zero). If it is then \piif{ifinteger} is set \ptrue,
otherwise it is set \pfalse.
+%
+\begin{note}
+ Please note that \cmd{\checkifinteger} may only work on simple input.
+\end{note}
\section{Checking the processor}
@@ -29105,8 +29569,8 @@ The macro \cs{parg}\marg{arg} prints \parg{arg} for a parenthesized argument.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-07-01 01:44:23 +0200 (Thu, 01 Jul 2010) $}
-{$LastChangedRevision: 249 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
\chapter{For package users} \label{chap:packageusers}
@@ -29261,8 +29725,8 @@ of the standard commands needs to be replaced.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-10-01 17:39:01 +0200 (Fri, 01 Oct 2010) $}
-{$LastChangedRevision: 285 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
@@ -29841,8 +30305,8 @@ in your document's preamble\index{preamble}.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
\PWnote{2009/07/05}{Added thesis design chapter}
@@ -30869,8 +31333,8 @@ than Archibald Smythe University will permit.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
\chapter{Packages and macros}
@@ -31100,8 +31564,7 @@ serves my needs.
%#% extend
-%#% extstart include sniplets.tex
-
+%#% extstart include showcases.tex
\svnidlong
{$Ignore: $}
@@ -31109,19 +31572,359 @@ serves my needs.
{$LastChangedRevision: 210 $}
{$LastChangedBy: daleif $}
+\chapter{Showcases}
+\label{cha:showcases}
+
+The \theclass\ memoir class has several features that involve a
+\emph{style} and it provide several of these styles. This chapter is
+used to showcase these styles.
+
+\section{Chapter styles}
+\label{sec:chapter-styles}
+
+\index{chapterstyle|(}
+
+For more about defining chapter styles, see
+section~\ref{sec:chapter-headings}, page~\pageref{sec:chapter-headings}.
+
+\begin{demochap}[-3\onelineskip]{default}\end{demochap}
+
+\begin{demochap}[2\onelineskip]{section}\end{demochap}
+
+\begin{demochap}[2\onelineskip]{hangnum}\end{demochap}
+
+\begin{demochap}[2\onelineskip]{companion}\end{demochap}
+
+\begin{demochap}[-1\onelineskip]{article}\end{demochap}
+
+\begin{demochap}[-2\onelineskip]{bianchi}\end{demochap}
+
+\begin{demochap}{bringhurst}\end{demochap}
+
+\begin{demochap}[-2\onelineskip]{brotherton}\end{demochap}
+
+\begin{demochap}{chappell}\end{demochap}
+
+\begin{demochap}[-2\onelineskip]{crosshead}\end{demochap}
+
+\begin{demochap}[-\onelineskip]{culver}\end{demochap}
+
+\begin{demochap}[-4\onelineskip]{dash}\end{demochap}
+
+\begin{demochap}[-\onelineskip]{demo2}\end{demochap}
+
+\begin{demochap}[-2\onelineskip]{dowding}\end{demochap}
+
+\begin{demochap}{ell}\end{demochap}
+
+\begin{demochap}[-4\onelineskip]{ger}\end{demochap}
+
+\begin{demochap}[-2\onelineskip]{komalike}\end{demochap}
+
+\begin{demochap}[-2\onelineskip]{lyhne}\end{demochap}
+
+\clearpage
+
+\begin{demochap}[-2\onelineskip]{madsen}\end{demochap}
+
+\begin{demochap}[-3\onelineskip]{ntglike}\end{demochap}
+
+\begin{demochap}[-\onelineskip]{southall}\end{demochap}
+
+\begin{demochap}[-1\onelineskip]{tandh}\end{demochap}
+
+\begin{demochap}{thatcher}\end{demochap}
+
+\begin{demochap}[-2\onelineskip]{veelo}\end{demochap}
+
+\begin{demochap}{verville}\end{demochap}
+
+\FloatBlock
+
+
+\begin{demochap}[-1\onelineskip]{wilsondob}\end{demochap}
+
+
+The code for some of these styles is given in below. For details of
+how the other chapter styles are defined, look at the documented class
+code. This should give you ideas if you want to define your own style.
+
+Note that it is not necessary to define a new chapterstyle if you want
+to change the chapter headings --- you can just change the individual
+macros without putting them into a style.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\subsection{Chappell}
+
+ A style that includes rules is one that I based on the chapter heads
+in~\cite{CHAPPELL99} and which I have called \cstyle{chappell} after the
+first author. The style, which is shown in \fref{dcchappell}, can easily form
+the basis for general heads in non-technical books.
+\begin{lcode}
+\makechapterstyle{chappell}{%
+ \setlength{\beforechapskip}{0pt}
+ \renewcommand*{\chapnamefont}{\large\centering}
+ \renewcommand*{\chapnumfont}{\large}
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\printchaptername}%
+ \vphantom{\chapnumfont 1}%
+ \afterchapternum
+ \vskip -\onelineskip}
+ \renewcommand*{\chaptitlefont}{\Large\itshape}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \centering\chaptitlefont ##1}}
+\end{lcode}
+
+
+The style centers the chapter number, draws a rule across the page under
+it, and below that comes the title, again centered. All the fiddling
+in the \cs{printchapternonum} macro is to try and ensure that the rule
+above the title is at the same height whether or not the chapter is numbered
+(the ToC being an example of an unnumbered heading).
+
+\subsection{Demo, Demo2 and demo3}
+
+ I created a \cstyle{demo} chapterstyle quite a time ago and used it
+on occasions in earlier editions of this Manual. Here is the original code.
+\begin{lcode}
+\makechapterstyle{demo}{%
+ \renewcommand*{\printchaptername}{\centering}
+ \renewcommand*{\printchapternum}{\chapnumfont \numtoName{\c@chapter}}
+ \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
+ \renewcommand*{\afterchaptertitle}%
+ {\vskip\onelineskip \hrule\vskip \afterchapskip}
+}% end demo
+\end{lcode}
+
+This has one serious failing and what I now believe is a poor design
+decision. The failing is that if you have any appendices that use the
+\cstyle{demo} chapterstyle then they are numbered instead of being lettered.
+The poor design is that the position of the title with respect to the top
+of the page is not the same for numbered and unnumbered chapters.
+ The \cstyle{demo2} chapterstyle below fixes both of these at the expense
+of simplicity (at least for me).
+\begin{lcode}
+\makechapterstyle{demo2}{%
+ \renewcommand*{\printchaptername}{\centering}
+ \renewcommand*{\printchapternum}{\chapnumfont
+ \ifanappendix \thechapter \else \numtoName{\c@chapter}\fi}
+ \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
+ \renewcommand*{\afterchaptertitle}{%
+ \vskip\onelineskip \hrule\vskip \afterchapskip}
+ \setlength{\beforechapskip}{3\baselineskip}
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\chapnumfont One}
+ \afterchapternum%
+ \vskip\topskip}
+ \setlength{\beforechapskip}{2\onelineskip}
+}% end{demo2}
+\end{lcode}
+ You may find it instructive to compare the code for the \cstyle{demo} and
+\cstyle{demo2} chapterstyles.
+
+ Thec \cstyle{demo} chapterstyle is still available in the class for
+backward compatibility reasons, but I strongly advise against anyone using it.
+
+ By chance I inadvertantly typest a chapterstyle that was a mixture
+of the \cstyle{pedersen} and \cstyle{demo2} styles. As a result there is
+now a \cstyle{demo3} chapterstyle as well. The only difference between the
+two styles is in the definition of \cs{chapnumfont} which in \cstyle{demo3}
+is:
+\begin{lcode}
+\renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape}
+\end{lcode}
+
+\subsection{Pedersen}
+
+ I have modified Troels Pedersen's original code to make it a little more
+efficient and flexible.
+
+\begin{lcode}
+\newcommand*{\colorchapnum}{}
+\newcommand*{\colorchaptitle}{}
+\makechapterstyle{pedersen}{%
+ \setlength{\beforechapskip}{-20pt}
+ \setlength{\afterchapskip}{10pt}
+ \renewcommand*{\chapnamefont}{\normalfont\LARGE\itshape}
+ \renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape\colorchapnum}
+ \renewcommand*{\chaptitlefont}{\normalfont\huge\itshape\colorchaptitle}
+ \renewcommand*{\afterchapternum}{}
+ \renewcommand*{\printchaptername}{}
+ \setlength{\midchapskip}{20mm}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\printchapternum}{%
+ \sidebar{\raisebox{0pt}[0pt][0pt]{\makebox[0pt][l]{%
+ \resizebox{!}{\midchapskip}{\chapnumfont\thechapter}}}}}
+ \renewcommand*{\printchaptertitle}[1]{\chaptitlefont ##1}
+}
+\end{lcode}
+The chapter number is scaled up from its normal size and set in a
+sidebar\index{sidebar}.
+
+\begin{syntax}
+\cmd{\colorchapnum} \cmd{\colorchaptitle} \\
+\end{syntax}
+\glossary(colorchapnum)
+ {\cs{colorchapnum}}%
+ {Color for the number in the \Pcstyle{pedersen} chapterstyle.}
+\glossary(colorchaptitle)
+ {\cs{colorchaptitle}}%
+ {Color for the title in the \Pcstyle{pedersen} chapterstyle.}
+ The title is set with \cmd{colorchaptitle} and the number with
+\cmd{colorchapnum}, both of which default to doing nothing.
+Lars Madsen\index{Madsen, Lars}
+has suggested an attractive red color for these:
+\begin{lcode}
+\usepackage{color}
+\definecolor{ared}{rgb}{.647,.129,.149}
+\renewcommand{\colorchapnum}{\color{ared}}
+\renewcommand{\colorchaptitle}{\color{ared}}
+\chapterstyle{pedersen}
+\end{lcode}
+
+ The uncolored version is used for the chaptersyle for this chapter;
+because of setting the number in a sidebar\index{sidebar} it does not
+display well anywhere other than as a real chapter head.
+
+\subsection{Southall}
+
+ On 2006/01/08 Thomas Dye\index{Dye, Thomas} posted his \cstyle{southall}
+chapterstyle on \url{comp.text.tex} and kindly gave me permission to
+include it here. It is based on the headings in a Cambridge Press
+book\footnote{Which I haven't seen} by Aidan Southall.
+It produces a simple numbered heading with the title set as a block paragraph,
+and with a horizontal rule underneath. His original code called for lining
+figures for the number but I have commented out that bit. I also changed
+the code to eliminate the need for the two new lengths that Thomas used.
+
+\begin{lcode}
+\makechapterstyle{southall}{%
+ \setlength{\afterchapskip}{5\baselineskip}
+ \setlength{\beforechapskip}{36pt}
+ \setlength{\midchapskip}{\textwidth}
+ \addtolength{\midchapskip}{-\beforechapskip}
+ \renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}}
+ \renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
+ \renewcommand*{\chapnumfont}{\chaptitlefont}
+ \renewcommand*{\printchaptername}{}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\afterchapternum}{}
+ \renewcommand*{\printchapternum}{%
+ \begin{minipage}[t][\baselineskip][b]{\beforechapskip}
+ {\vspace{0pt}\chapnumfont%%%\figureversion{lining}
+ \thechapter}
+ \end{minipage}}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \hfill\begin{minipage}[t]{\midchapskip}
+ {\vspace{0pt}\chaptitlefont ##1\par}\end{minipage}}
+ \renewcommand*{\afterchaptertitle}{%
+ \par\vspace{\baselineskip}%
+ \hrulefill \par\nobreak\noindent \vskip\afterchapskip}}
+\end{lcode}
+
+The resulting style is shown in \fref{dcsouthall}.
+
+
+\subsection{Veelo}
+
+ Bastiaan Veelo
+posted the code for a new chapter style to \pixctt\ on 2003/07/22 under the
+title \textit{[memoir] [contrib] New chapter style}. His code, which
+I have slightly modified and changed the name to \cstyle{veelo},
+is below. I have also exercised editorial privilege on his comments.
+
+\begin{quote}
+ I thought I'd share a new chapter style to be used with the memoir class.
+ The style is tailored for documents that are to be trimmed to a smaller
+ width. When the bound document is bent, black tabs will appear on the
+ fore side at the places where new chapters start as a navigational aid.
+ We are scaling the chapter number, which most DVI viewers
+ will not display accurately. \\[0.5\onelineskip]
+Bastiaan.
+\end{quote}
+
+ In the style as I modified it, \lnc{\beforechapskip} is used as the
+height of the number and \lnc{\midchapskip} is used as the length of the
+black bar.
+\begin{lcode}
+\newlength{\numberheight}
+\newlength{\barlength}
+\makechapterstyle{veelo}{%
+ \setlength{\afterchapskip}{40pt}
+ \renewcommand*{\chapterheadstart}{\vspace*{40pt}}
+ \renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt}
+ \renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
+ \renewcommand*{\chapnumfont}{\normalfont\HUGE}
+ \renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
+ \renewcommand*{\printchaptername}{%
+ \chapnamefont\MakeUppercase{\@chapapp}}
+ \renewcommand*{\chapternamenum}{}
+ \setlength{\beforechapskip}{18mm}
+ \setlength{\midchapskip}{\paperwidth}
+ \addtolength{\midchapskip}{-\textwidth}
+ \addtolength{\midchapskip}{-\spinemargin}
+ \renewcommand*{\printchapternum}{%
+ \makebox[0pt][l]{\hspace{.8em}%
+ \resizebox{!}{\numberheight}{\chapnumfont \thechapter}%
+ \hspace{.8em}%
+ \rule{\midchapskip}{\beforechapskip}%
+ }}%
+ \makeoddfoot{plain}{}{}{\thepage}}
+\end{lcode}
+
+
+ If you use this style you will also need to use the \Lpack{graphicx}
+package~\cite{GRAPHICX} because of the \cmd{\resizebox} macro.
+The \cstyle{veelo} style works best for chapters that start
+on recto pages.
+
+\index{chapterstyle|)}
+
+
+%#% extend
+%#% extstart include sniplets.tex
+
+
+\svnidlong
+{$Ignore: $}
+{$LastChangedDate: 2013-05-16 17:28:08 +0200 (Thu, 16 May 2013) $}
+{$LastChangedRevision: 464 $}
+{$LastChangedBy: daleif $}
+
+
+\defaultlists
+
+
\LMnote{2010/02/09}{Started the sniplet chapter}
\chapter{Sniplets}
\label{cha:sniplets}
+\cftinserthook{toc}{start-sniplets}
+
+
This chapter is (over time) meant to hold various pieces of code for
\theclass\ that we have gathered over the years or others have
-contributed, and which we think might be useful for others.
+contributed, and which we think might be useful for others. In some
+cases they will have been moved from the text to this place, in order
+to make the manual less cluttered.
+
-If you have some \theclass\ related code you would like to share feel
-free to send it to \verb?daleif+memoir@imf.au.dk?.
+If you have some \theclass\ related code you would like to share, feel
+free to send it to \verb?daleif@imf.au.dk?.
-\begin{sniplet}\label{snip:1}
+
+\sniplettoc
+
+
+\begin{sniplet}[Mirroring the output]\label{snip:1}
The \theclass\ class is not quite compatible with the \Lpack{crop}
package. This is usually not a problem as we provide our own
crop marks. But \Lpack{crop} provide one feature that we do not:
@@ -31143,7 +31946,7 @@ free to send it to \verb?daleif+memoir@imf.au.dk?.
\end{lcode}
\end{sniplet}
-\begin{sniplet}\label{snip:2}
+\begin{sniplet}[Remove pagenumber if only one page]\label{snip:2}
Memoir counts all the pages used. You can use this information
in various ways. For example, say you are preparing a setup to write
small assignments in, these may or may not be just one page. How do
@@ -31155,7 +31958,7 @@ free to send it to \verb?daleif+memoir@imf.au.dk?.
\end{lcode}
\end{sniplet}
-\begin{sniplet}\label{snip:veelo}
+\begin{sniplet}[A kind of draft note]\label{snip:veelo}
Bastiaan Veelo\index{Veelo, Bastiaan} has kindly provided example code
for another form of a side note, as follows.
\begin{lcode}
@@ -31202,7 +32005,7 @@ file) without the \cs{makeat...} commands.
\LMnote{2010/03/12}{Added this sniplet inspired by a thread on ctt}
-\begin{sniplet}
+\begin{sniplet}[Adding indentation to footnotes]
At times a document design calls for a footnote configuration equal to
the default but everything indented more to the right. This can be
@@ -31221,7 +32024,7 @@ since it is reset in the footnotes.
\LMnote{2010/03/12}{Added this sniplet inspired by a thread on ctt}
-\begin{sniplet}
+\begin{sniplet}[Background image and trimmarks]
This sniplet comes from another problem described in \textsc{ctt}. If
one use the \Lpack{eso-pic} package to add a background image, this
image ends up on top of the trim marks. To get it \emph{under} the
@@ -31234,21 +32037,316 @@ trim marks Rolf Niepraschk suggested the following trick
...
\end{lcode}
+\end{sniplet}
+
+
+\LMnote{2012/09/21}{Sniplet showcasing autoadjusting numwidths in the toc}
+\begin{sniplet}[Autoadjusted number widths in the ToC]
+ \label{snip:autotoc}
+
+ When the \toc{} is typeset the chapter, section etc. number is
+ typeset within a box of a certain fixed with (one width for each
+ sectional type). If this width is too small for the current
+ document, the user have to manually adjust this width.
+
+ In this sniplet we present a method where we automatically record
+ the widest.
+
+ It a later \theclass\ version, we may add similar code to the core.
+
+ There are two ways to record the widest entries of the various
+ types, either preprocess the entire \toc{} or measure it as a part
+ of the \toc{} typesetting, store it in the \texttt{.aux} and reuse
+ it on the next run. We will use the later approach. There is one
+ caveat: The \texttt{.aux} file is read at \verb|\begin{document}|,
+ so we need to postpone our adjustments via \verb|\AtBeginDocument|.
+
+ The following solution use some \toc{} related hooks within the
+ class, plus the \Lpack{etoolbox} and \Lpack{calc} packages.
+
+ First we create some macros to store information within the
+ \texttt{.aux} file, and retrieve it again.
+
+ \begin{lcode}
+ \makeatletter
+ \newcommand\mem@auxrestore[2]{\csgdef{stored@value@#1}{#2}}
+ \newcommand\memstorevalue[2]{%
+ \@bsphack%
+ \immediate\write\@mainaux{\string\mem@auxrestore{#1}{#2}}%
+ \@esphack}
+ \newcommand\RetrieveStoredLength[1]{%
+ \ifcsdef{stored@value@#1}{\csuse{stored@value@#1}}{0pt}}%
+ \makeatletter
+ \end{lcode}
+ Here \cs{RetrieveStoredLength} can be used in most \cmd{\setlength}
+ cases, at least when the \Lpack{calc} package is loaded. The
+ argument will be the name of the variable one asked to be stored. If
+ no corresponding value has been found for a given name, 0\,pt is returned.
+
+ Next we need to prepare the hooks. In this case we will show how to
+ take care of \cmd{\chapter}, \cmd{\section} and \cmd{\subsection}.
+ \cmd{\chapter} is relatively easy:\footnote{In some cases you may
+ want to use \texttt{%
+ \{%
+ \cs{@chapapp@head}%
+ \cs{@cftbsnum}
+ \#1%
+ \cs{@cftasnum}%
+ \}%
+ }}
+ \begin{lcode}
+ \newlength\tmplen % scratch length
+ \newlength\widestchapter % guess, they are zero by default
+ \renewcommand\chapternumberlinehook[1]{%
+ \settowidth\tmplen{\hbox{\cftchapterfont#1}}%
+ \ifdimgreater\tmplen\widestchapter{%
+ \global\widestchapter=\tmplen}{}}
+ \end{lcode}
+ We use an alternative syntax to make the \cs{widestchapter} global.
+
+ Handling \cmd{\section} and \cmd{\subsection} is slightly more
+ tricky, as they both use \cmd{numberline}. Instead we rely on the
+ local value of the magic macro \cmd{\cftwhatismyname}.
+ \begin{lcode}
+ \newlength\widestsection
+ \newlength\widestsubsection
+ \renewcommand\numberlinehook[1]{%
+ % use a loop handler to loop over a list of possible
+ % types. \forcsvlist comes from etoolbox
+ \forcsvlist{\ToCHookListHandler{#1}}{section,subsection,subsubsection,%
+ paragraph,subparagraph,figure,table}}
+ % the actual handler.
+ \newcommand\ToCHookListHandler[2]{%
+ \edef\tmpstr{#2}%
+ \ifdefstrequal{\cftwhatismyname}{\tmpstr}{%
+ \settowidth\tmplen{\hbox{\csuse{cft\cftwhatismyname font}#1}}%
+ \ifcslength{widest#2}{% is this length defined?
+ \ifdimgreater\tmplen{\csuse{widest#2}}{%
+ \global\csuse{widest#2}=\tmplen}{}}{}}{}}
+ \end{lcode}
+ Even though the list mention more macros, we only use those we have
+ added corresponding lengths for.
+
+ Next we need to store the values at the end of the document
+ \begin{lcode}
+ \AtBeginDocument{\AtEndDocument{
+ \memstorevalue{widestchapter}{\the\widestchapter}
+ \memstorevalue{widestsection}{\the\widestsection}
+ \memstorevalue{widestsubsection}{\the\widestsubsection}
+ }}
+ \end{lcode}
+
+ Here is how to get the standard class setup for a three level
+ TOC. We also add a little extra padding to the boxes. Remember that
+ it may take a few compilations before the \toc{} settles down.
+ \begin{lcode}
+ \newlength\cftnumpad % padding
+ \setlength\cftnumpad{0.5em}
+ \AtBeginDocument{
+ \cftsetindents{chapter}{0pt}{%
+ \RetrieveStoredLength{widestchapter}+\cftnumpad}
+ \cftsetindents{section}{%
+ \cftchapterindent+\cftchapternumwidth}{%
+ \RetrieveStoredLength{widestsection}+\cftnumpad}
+ \cftsetindents{subsection}{%
+ \cftsectionindent+\cftsectionnumwidth}{%
+ \RetrieveStoredLength{widestsubsection}+\cftnumpad}
+ }
+ \end{lcode}
+\end{sniplet}
+
+
+\begin{sniplet}[Using class tools to make a chapter ToC]
+ \label{snip:chaptertoc}
+
+ By using a few hooks, we will be able to create a simple chapter
+ toc. First a few notes:
+ \begin{enumerate}[(a)]
+ \setlength\itemsep{0.5em}
+ \item In this class, the TOC data can be reused, thus we can load
+ the TOC data as many times as we would like.
+ \item Data in the TOC is stored as arguments the \cs{contentsline}
+ macro, say (see also \fref{fig:tocloflotfiles} on
+ page~\pageref{fig:tocloflotfiles})
+\begin{verbatim}
+\contentsline{chapter}{\chapternumberline {1}Test}{3}
+\end{verbatim}
+ where the first argument determins which macro is used to process
+ the data. Each of these macros look at the value of the \Pcn{tocdepth}
+ counter to know whether to typeset or not.
+ \item Using some hooks we can insert local changes to \Pcn{tocdepth}
+ in order to only typeset the sections from the current chapter.
+ \end{enumerate}
+
+The idea is to be able to add hooks at key points in the \toc{} data,
+and then use these hooks to enable and disable typesetting.
+
+We will need to add hooks just after a chapter line (like the one
+above), and we will need to be able to insert hooks just before items
+that mark the end of a chapter, that is the next \cmd{\chapter},
+\cmd{\part}, \cmd{\book}, plus a macro like \cmd{\appendixpage} which
+also write to the \toc{}.
+
+
+
+
+
+ First we define hooks that add hooks into the TOC. We use a counter
+ to make each start and end hook unique. We add \emph{end markers}
+ above the \toc{} entries for \cs{chapter}, \cs{part} and
+ \cs{book}.
+\begin{lcode}
+\newcounter{tocmarker}
+\renewcommand\mempreaddchaptertotochook{\cftinserthook{toc}{end-\thetocmarker}}
+\renewcommand\mempreaddparttotochook {\cftinserthook{toc}{end-\thetocmarker}}
+\renewcommand\mempreaddbooktotochook {\cftinserthook{toc}{end-\thetocmarker}}
+\renewcommand\mempreaddapppagetotochook{\cftinserthook{toc}{end-\thetocmarker}}
+% start marker
+\renewcommand\mempostaddchaptertotochook{%
+ \stepcounter{tocmarker}\cftinserthook{toc}{start-\thetocmarker}}
+\let\normalchangetocdepth\changetocdepth % for later
+\end{lcode}
+The hooks inserted into the TOC file, does nothing by default. You
+will notice that the line above will now look like:
+\begin{verbatim}
+\cftinsert {end-0}
+\contentsline{chapter}{\chapternumberline {1}Test}{3}
+\cftinsert {start-1}
+...
+\cftinsert {end-1}
+\contentsline{chapter}{\chapternumberline {2}Test}{5}
+\end{verbatim}
+Thus to get a chapter toc command we need to make sure that (1) all
+entries are disabled, (2) at \texttt{start-1} we reenable TOC entries,
+and (3) at \texttt{end-1} disable TOC entries again. Here is the rest
+of the code, explained via comments.
+\begin{lcode}
+\makeatletter
+\newcommand\chaptertoc{
+ % make changes local, remember counters a global
+ \begingroup
+ % store current value, to be restored later
+ \setcounter{@memmarkcntra}{\value{tocdepth}}
+ % when ever \settocdepth is used, it adds the new value to the
+ % ToC data. This cause problems when we want to disable all
+ % entries. Luckily the data is added via a special macro, we we
+ % redefine it, remember we stored the original value earlier.
+ \let\changetocdepth\@gobble
+ % disable all entries (using our copy from above)
+ \normalchangetocdepth{-10}
+ % enable toc data within our block, we go as far as subsubsection
+ \cftinsertcode{start-\thetocmarker}{\normalchangetocdepth{3}}
+ % when the block is done, disable the remaining
+ \cftinsertcode{end-\thetocmarker}{\normalchangetocdepth{-10}}
+ % remove the spacing above the toc title
+ \let\tocheadstart\relax
+ % remove the toc title itself
+ \let\printtoctitle\@gobble
+ % remove space below title
+ \let\aftertoctitle\relax
+ % reformat TOC entries:
+ \setlength{\cftsectionindent}{0pt}
+ \setlength{\cftsubsectionindent}{\cftsectionnumwidth}
+ \setlength{\cftsubsubsectionindent}{\cftsubsectionindent}
+ \addtolength{\cftsubsubsectionindent}{\cftsubsectionnumwidth}
+ \renewcommand\cftsectionfont{\small}
+ \renewcommand\cftsectionpagefont{\small}
+ \renewcommand\cftsubsectionfont{\small}
+ \renewcommand\cftsubsectionpagefont{\small}
+ \renewcommand\cftsubsubsectionfont{\small}
+ \renewcommand\cftsubsubsectionpagefont{\small}
+ % include the actual ToC data
+ \tableofcontents*
+ \endgroup
+ % restore tocdepth
+ \setcounter{tocdepth}{\value{@memmarkcntra}}
+ % to indent or not after the chapter toc
+ \m@mindentafterchapter
+ % space between chapter toc and text
+ \par\bigskip
+ % handles indentation after the macro
+ \@afterheading}
+\makeatother
+\end{lcode}
\end{sniplet}
+Note that if the \cmd{\chapterprecistoc} or \cmd{\chapterprecis} has
+been used then that data is also added to the \toc{} data, and we will
+need to locally disable it in the chapter \toc{}. This can be done by
+adding
+\begin{lcode}
+ \let\precistoctext\@gobble
+\end{lcode}
+to the \cmd{\chaptertoc} definition above, just make sure it is added
+before calling
+before \cmd{\tableofcontents*}.
+
+
+%%%%%
+%% Appendix ToC
+%%%%
+
+
+\begin{sniplet}[An appendix ToC]
+ \label{snip:apptoc}
+ Here we assume a structure like
+\begin{verbatim}
+\tableofcontents*
+\chapter
+\chapter
+\chapter
+\appendix
+\appendixpage
+\appendixtableofcontents
+\chapter
+\chapter
+\chapter
+\end{verbatim}
+where the first \toc{} should just show until (and including)
+\cmd{\appendixpage}, and \cmd{\appendixtableofcontents} should only
+list the appendices.
+
+We also assume that no \cmd{\settocdepth}'s have been issued after
+\cmd{\appendixpage}.
+
+
+We only need a single hook after \cmd{\appendixpage}.
+\begin{lcode}
+\renewcommand\mempostaddapppagetotochook{\cftinserthook{toc}{BREAK}}
+\cftinsertcode{BREAK}{\changetocdepth{-10}}
+\let\normalchangetocdepth\changetocdepth % needed for later
+\end{lcode}
+Then the definition of the actual appendix \toc{}:
+\begin{lcode}
+\makeatletter
+\newcommand\appendixtableofcontents{
+ \begingroup
+ \let\changetocdepth\@gobble
+ \normalchangetocdepth{-10}
+ \cftinsertcode{BREAK}{\normalchangetocdepth{3}}
+ \renewcommand\contentsname{Appendices overview}
+ \tableofcontents*
+ \endgroup
+}
+\makeatother
+\end{lcode}
+
+
+\end{sniplet}
+\cftinserthook{toc}{end-sniplets}
%#% extend
%#% extstart include pictures.tex
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-09-13 11:11:29 +0200 (Mon, 13 Sep 2010) $}
-{$LastChangedRevision: 273 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -32619,8 +33717,8 @@ exactly how many blobs to use for the curve.
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
@@ -33989,8 +35087,8 @@ but in this case the best place to look for further information is in the
\svnidlong
{$Ignore: $}
-{$LastChangedDate: 2010-05-13 17:10:00 +0200 (Thu, 13 May 2010) $}
-{$LastChangedRevision: 210 $}
+{$LastChangedDate: 2013-04-24 17:14:15 +0200 (Wed, 24 Apr 2013) $}
+{$LastChangedRevision: 442 $}
{$LastChangedBy: daleif $}
@@ -36450,6 +37548,64 @@ recognized.
\Iclasssub{memoir}{warning|)}
%#% extend
+%#% extstart include comments.tex
+
+\svnidlong
+{$Ignore: $}
+{$LastChangedDate: 2013-05-15 17:07:24 +0200 (Wed, 15 May 2013) $}
+{$LastChangedRevision: 463 $}
+{$LastChangedBy: daleif $}
+
+\chapter{Comments}
+\label{cha:comments}
+
+\section{Algorithms}
+\label{sec:algorithms}
+
+Over time we may use this section to explain, or list some of the
+algorithms for some of the macros in the class. The information may be
+useful to some.
+
+\subsection{Autoadjusting \cs{marginparwidth}}
+\label{sec:auto-csmarg}
+
+This algorithm is used within \cmd{\fixthelayout} unless the user have
+used \cmd{\setmarginnotes}.
+
+\noindent
+\begin{framed}
+ \vskip-2\baselineskip
+ \begin{small}
+\begin{verbatim}
+if twocolumn then
+ marginparwidth = min{inner margin,outer margin}
+else
+ if twoside then
+ if marginpar always left or always right then
+ marginparwidth = min{inner margin,outer margin}
+ else if marginpar in outer margin then
+ marginparwidth = outer margin
+ else if marginpar in inner margin then
+ marginparmargin = inner margin
+ end if
+ else
+ if marginpar in left margin then
+ marginparwidth = inner margin
+ else
+ marginparwidth = outer margin
+ end if
+ end if
+end if
+marginparwidth = marginparwidth - 2marginparsep
+if marginparwidth < 1pt then
+ marginparwidth = 1pt
+end if
+\end{verbatim}
+ \end{small}
+\end{framed}
+
+
+%#% extend
%#% extstart input backend.tex
@@ -36684,6 +37840,15 @@ access CTAN is available at \url{http://www.tug.org}.
\newblock (Available from CTAN via
\CTANurl{/macros/latex/required/tools/})
+\bibitem[Car04]{textcase} % casing intentional
+ David Carlisle.
+\newblock \emph{The \Lpack{textcase} package}.
+\newblock October, 2004.
+\newblock (Available from CTAN in
+ \texttt{/macros/latex/contrib/textcase})
+
+
+
%%% keep
\bibitem[Car05]{COLOR}
David Carlisle.
@@ -37861,5 +39026,5 @@ Computer Modern family.
%%% mode: latex
%%% TeX-master: t
%%% TeX-source-specials-mode: t
-%%% TeX-PDF-mode: nil
+%%% TeX-PDF-mode: t
%%% End:
diff --git a/Master/texmf-dist/doc/latex/memoir/memsty.sty b/Master/texmf-dist/doc/latex/memoir/memsty.sty
index f829b130c4b..c5a23dc52c8 100644
--- a/Master/texmf-dist/doc/latex/memoir/memsty.sty
+++ b/Master/texmf-dist/doc/latex/memoir/memsty.sty
@@ -56,7 +56,7 @@
\changeglossactual{?}
\changeglossnum{\@currentlabel}
\changeglossnum{\thepage}
-\changeglossnumformat{|hyperpage}
+\changeglossnumformat{|hyperpage} %|
\renewcommand*{\glossaryname}{Command summary}
\renewcommand{\glossitem}[4]{%
\sbox\@tempboxa{#1 \space #2 #3 \makebox[2em]{#4}}%
@@ -154,6 +154,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{graphicx}
\ifpdf
\usepackage[pdftex,
plainpages=false,
@@ -163,16 +164,16 @@
% colorlinks,
% ocgcolorlinks, % this only works for pdflatex
]{hyperref}
- \usepackage{graphicx}
\DeclareGraphicsRule{*}{mps}{*}{}
\else
\usepackage[plainpages=false,
- pdfpagelabels,
+ pdfpagelabels,
%%% hyperfootnotes=false,
- bookmarksnumbered,
-% colorlinks,
- ]{hyperref}
- \usepackage{graphicx}
+ bookmarksnumbered,
+ breaklinks,
+ % colorlinks,
+ ]{hyperref}
+ \usepackage{breakurl}
\DeclareGraphicsRule{*}{eps}{*}{}
\fi
%%% \usepackage{memhfixc} %% now called by hyperref
@@ -297,7 +298,7 @@
%%% \seeonceidx{main}{sub} %% index main (see sub), and index sub
\newcommand*{\seeonceidx}[2]{%
\@ifundefined{s1#2s1}%
- {\global\@namedef{s1#2s1}{?!?}\index{#1!#2|see{#2}}\index{#2}}%
+ {\global\@namedef{s1#2s1}{?!?}\index{#1!#2|see{#2}}\index{#2}}% %|
{\index{#2}}}
%%% \facesubseeidx{sub} %% index typeface (see sub), and index sub
\newcommand*{\facesubseeidx}[1]{\seeonceidx{typeface}{#1}}
@@ -494,7 +495,7 @@ official r\^ole in fluffy souffl\'es?' }
\newcommand*{\tightcenter}{%
\topsep=0.25\onelineskip\trivlist \centering\item\relax}
\def\endtightcenter{\endtrivlist}
-\LMnote{2010/06/25}{Added a \cs{crcr} here, a bit of a tric, but now
+\LMnote{2010/06/25}{Added a \cs{crcr} here, a bit of a trick, but now
the last line in syntax does not longer need to end with \\}
\newenvironment{syntax}{\begin{tightcenter}
\begin{tabular}{|p{0.9\linewidth}|} \hline}%
@@ -518,6 +519,8 @@ chapterstyle. It is one of several styles that come as part of the
\newcount\savefigcnt
\newcount\saveftncnt
\newcommand*{\demochapcolor}{\definecolor{shadecolor}{gray}{0.75}}
+\LMnote{2011/05/25}{I've moved the demochaps to an appendix, so
+ \cs{@chapapp} need a little redoing}
\newenvironment{demochap}[2][\onelineskip]{%
\savechapcnt=\c@chapter
\saveseccnt=\c@section
@@ -526,14 +529,16 @@ chapterstyle. It is one of several styles that come as part of the
\c@chapter=\demochapcnt
%% \stepcounter{demochapcnt}
\counterwithout*{figure}{chapter}
- \begin{figure}
+ \begin{figure}[htbp]
%%% \definecolor{shadecolor}{gray}{0.75}
\demochapcolor
\begin{shaded}
\savefigcnt=\c@figure
\begingroup
%% \hrule
+ \let\@chapapp\chaptername% such that appendix does not disturb
\renewcommand{\theHchapter}{\thepage.\thechapter}
+ \renewcommand\thechapter{\arabic{chapter}}
\vspace*{#1}
\chapterstyle{#2}
\let\clearforchapter\relax
@@ -1056,7 +1061,7 @@ it to use the new width for the margin par}
\edef\mem@e{\@ifnotmtarg{#1}{~(#1)}}
\section*{\snipletname~\thesniplet\mem@e}
\phantomsection
- \addcontentsline{toc}{section}{\snipletname~\thesniplet}
+ \addcontentsline{toc}{section}{\snipletname\ \thesniplet\mem@e}
\renewenvironment{lcode}{%\@zeroseps
\renewcommand{\verbatim@startline}{\verbatim@line{\hskip\gparindent}}
\small\setlength{\baselineskip}{\onelineskip}\verbatim}%
@@ -1065,6 +1070,27 @@ it to use the new width for the margin par}
\noindent}
}{}
+\let\normalchangetocdepth\changetocdepth
+\newcommand\sniplettoc{%
+ \setcounter{@memmarkcntra}{\value{tocdepth}}%
+ \begingroup%
+ \let\changetocdepth\@gobble%
+ \normalchangetocdepth{-10}%
+ \cftinsertcode{start-sniplets}{\normalchangetocdepth{3}}%
+ \cftinsertcode{end-sniplets}{\normalchangetocdepth{-10}}%
+ \let\tocheadstart\relax%\@gobble
+ % \printtoctitle\@gobble
+ \renewcommand\printtoctitle[1]{\section*{Sniplet overview}}%
+ \let\aftertoctitle\relax%
+ \let\printtocnonum\relax%
+ \let\precistoctext\@gobble%
+ \setlength\cftsectionindent{0pt}%
+ \tableofcontents*
+ \endgroup
+ \setcounter{tocdepth}{\value{@memmarkcntra}}
+}
+
+
%%% CTAN links
\providecommand\CTANurl{}
@@ -1082,6 +1108,12 @@ it to use the new width for the margin par}
\fancybreak{}
}
+\newenvironment{caveat}{\par\medskip\noindent\textbf{\textit{Caveat.}}\enskip\itshape}{\par\medskip}
+\newenvironment{note}{\par\medskip\noindent\textbf{\textit{Note.}}\enskip\itshape}{\par\medskip}
+\newenvironment{hint}{\par\medskip\noindent\textbf{\textit{Hint.}}\enskip\itshape}{\par\medskip}
+\renewcommand{\cmdprint}[1]{\textup{\texttt{\string#1}}}
+
+
\typeout{End memsty.sty}
\endinput
diff --git a/Master/texmf-dist/makeindex/memoir/basic.gst b/Master/texmf-dist/makeindex/memoir/basic.gst
index 27acc30bfb1..f73c9c9fc2e 100644
--- a/Master/texmf-dist/makeindex/memoir/basic.gst
+++ b/Master/texmf-dist/makeindex/memoir/basic.gst
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/source/latex/memoir/memoir.dtx b/Master/texmf-dist/source/latex/memoir/memoir.dtx
index 1eee2800c4e..037a064042d 100644
--- a/Master/texmf-dist/source/latex/memoir/memoir.dtx
+++ b/Master/texmf-dist/source/latex/memoir/memoir.dtx
@@ -1,9 +1,10 @@
% \iffalse meta-comment
%
-% memoir.dtx
-% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-% Maintainer: Lars Madsen (daleif+memoir at imf dot au dot dk)
+% memoir.dtx
+% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
+% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
% Copyright 2001--2010 Peter R. Wilson
+% Copyright 2011--2013 Lars Madsen
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -19,7 +20,7 @@
% This work consists of the files listed in the README file.
%
% \fi
-% \CheckSum{30174}
+% \CheckSum{30566}
%
% \changes{v0.1}{2001/05/20}{First public alpha release}
% \changes{v0.2}{2001/06/03}{First beta release}
@@ -106,6 +107,8 @@
% \changes{v3.6h}{2011/02/13}{Various things}
% \changes{v3.6i}{2011/02/18}{Two bug fixes}
% \changes{v3.6j}{2011/03/06}{Bug fixes}
+% \changes{v3.6k}{2013/05/17}{Various fixes and long overdue maintenance}
+% \changes{v3.7}{2013/05/22}{Bumped version}
%
% \def\dtxfile{memoir.dtx}
%
@@ -153,15 +156,17 @@
% \def\fileversion{v3.6h} \def\filedate{2011/02/13}
% \def\fileversion{v3.6i} \def\filedate{2011/02/18}
% \def\fileversion{v3.6j} \def\filedate{2011/03/06}
+% \def\fileversion{v3.6k} \def\filedate{2013/05/17}
+% \def\fileversion{v3.7} \def\filedate{2013/05/22}
% \title{The LaTeX \Lpack{memoir} class for configurable book
% typesetting: Source code\thanks{This
% file (\texttt{\dtxfile}) has version number \fileversion, last revised
% \filedate.}}
%
% \author{%
-% Peter Wilson\thanks{\texttt{herries dot press at earthlink dot net}}\\
+% Peter Wilson\\ ^^A\thanks{\texttt{herries dot press at earthlink dot net}}\\
% Herries Press \\
-% (with the assistance of Lars Madsen)}
+% (maintained by Lars Madsen\thanks{\texttt{daleif at imf dot au dot dk}}\ )}
% \date{\filedate}
% \maketitle
%
@@ -309,7 +314,7 @@
\DeleteShortVerb{\|}
\raggedbottom
\raggedright
-\DocInput{memoir.dtx}
+\DocInput{\jobname.dtx}
\PrintIndex
%% \PrintChanges
\end{document}
@@ -382,7 +387,11 @@
% Announce the name, option files and version for LaTeX2e files:
% \begin{macrocode}
%<class>\ProvidesClass{memoir}%
-%<class> [2011/03/06 v3.6j configurable book, report, article document class]
+%<class> [2013/05/22 v3.7 configurable book, report, article document class]
+% \end{macrocode}
+% In the manual it is useful to know the current version.
+% \begin{macrocode}
+%<class>\newcommand\memversion{v3.7, 2013/05/22}
%<9pt>\ProvidesFile{mem9.clo}%
%<9pt> [2008/01/30 v0.4 memoir class 9pt size option]
%<10pt>\ProvidesFile{mem10.clo}%
@@ -731,6 +740,45 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \changes{v3.6k}{2013/05/14}{Added macro used macros}
+% \begin{macro}{\memsetmacroused}
+% \begin{macro}{\memsetmacrounused}
+% \begin{macro}{\memifmacroused}
+% We may want to make auto adjustment to the layout unless the user
+% has used certain macros (in which case the user is responsible for
+% their own actions). To make this macro test easier, we provide a
+% few utility macros. Their use should be self explanatory. Though
+% note that the macro being marked as used, is given in full, i.e.,
+% \begin{verbatim}
+% \memsetmacroused\setlrmargins
+% \end{verbatim}
+% \begin{macrocode}
+\newcommand\memsetmacroused[1]{%
+ \@namedef{mem@macro@used@\expandafter\@gobble\string#1}{00}}
+\newcommand\memsetmacrounused[1]{%
+ \@namedef{mem@macro@used@\expandafter\@gobble\string#1}{01}}
+\newcommand\memifmacroused[1]{%
+ \if\@nameuse{mem@macro@used@\expandafter\@gobble\string#1}%
+ \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\memsetlengthmin}
+% \begin{macro}{\memsetlengthmax}
+% Returns the min or max of two lengths. Note we may alter this in
+% the future to use \cs{dimexpr}.
+% \begin{macrocode}
+\newcommand\memsetlengthmin[3]{\ifdim#2<#3\setlength{#1}{#2}\else\setlength{#1}{#3}\fi}
+\newcommand\memsetlengthmax[3]{\ifdim#2>#3\setlength{#1}{#2}\else\setlength{#1}{#3}\fi}
+
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
%
% \subsection{Classes, Packages and Files}
%
@@ -1617,11 +1665,13 @@
% headers, i.e. the `left' part of the header is typeset as the
% `right' part.
% \changes{v3.6h}{2010/10/22}{Added \cs{mem@RTLmainraggedX} macros}
+% \changes{v3.6k}{2011/06/24}{the \cs{mem@RTLvX} macros should point
+% at \cs{vX} not \cs{X}}
% \begin{macrocode}
\newcommand*{\memRTLleftskip}{\leftskip}
\newcommand*{\memRTLrightskip}{\rightskip}
-\newcommand*{\memRTLvleftskip}{\leftskip}
-\newcommand*{\memRTLvrightskip}{\rightskip}
+\newcommand*{\memRTLvleftskip}{\vleftskip}
+\newcommand*{\memRTLvrightskip}{\vrightskip}
\newcommand*{\memRTLraggedright}{\raggedright}
\newcommand*{\memRTLraggedleft}{\raggedleft}
\newcommand*{\memRTLmainraggedright}{\raggedright}
@@ -4243,8 +4293,10 @@
% \cs{settypeblocksize}\marg{height}\marg{width}\marg{ratio}
% calulates the \cs{textheight} and \cs{textwidth} from two out of the
% three arguments.
+% \changes{v3.6k}{2013/05/14}{Marked \cs{settypeblocksize} as being used}
% \begin{macrocode}
\newcommand{\settypeblocksize}[3]{%
+ \memsetmacroused\settypeblocksize%
\setrectanglesize{#1}{#2}{#3}%
\setlength{\textheight}{\@tempdima}%
\setlength{\textwidth}{\@tempdimb}}
@@ -4273,10 +4325,12 @@
% \cs{setlrmargins}\marg{L}\marg{R}\marg{r} sets the Left (spine)
% and Right (fore edge) margins with constant typeblock.
% \changes{v1.6180339c}{2008/12/29}{Added binding to \cs{setlrmargins}}
+% \changes{v3.6k}{2013/05/14}{Marked \cs{setlrmargins} as being used}
% \begin{macrocode}
\newlength{\spinemargin}
\newlength{\foremargin}
\newcommand{\setlrmargins}[3]{%
+ \memsetmacroused\setlrmargins%
\advance\paperwidth -\binding
\setfillsize{\paperwidth}{\textwidth}{#1}{#2}{#3}%
\setlength{\textwidth}{\@tempdimc}%
@@ -4312,10 +4366,12 @@
% \begin{macro}{\setulmargins}
% \cs{setulmargins}\marg{L}\marg{R}\marg{r} sets the Left (upper)
% and Right (lower) margins with constant typeblock.
+% \changes{v3.6k}{2013/05/14}{Marked \cs{setulmargins} as being used}
% \begin{macrocode}
\newlength{\uppermargin}
\newlength{\lowermargin}
\newcommand{\setulmargins}[3]{%
+ \memsetmacroused\setulmargins%
\setfillsize{\paperheight}{\textheight}{#1}{#2}{#3}%
\setlength{\textheight}{\@tempdimc}%
\setlength{\uppermargin}{\@tempdima}%
@@ -4382,8 +4438,10 @@
% \begin{macro}{\setmarginnotes}
% \cs{setmarginnotes}\marg{sep}\marg{width}\marg{push}
% sets the marginpar parameters.
+% \changes{v3.6k}{2013/05/14}{Marked \cs{setmarginnotes} as being used}
% \begin{macrocode}
\newcommand{\setmarginnotes}[3]{%
+ \memsetmacroused\setmarginnotes%
\setlength{\marginparsep}{#1}%
\setlength{\marginparwidth}{#2}%
\setlength{\marginparpush}{#3}}
@@ -4642,6 +4700,59 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\mem@autoadjust@marginparwidth}
+% This macro implements an algorithm, to automatically adjust
+% \cs{marginparwidth} to the current values of \cs{spinemargin} and
+% \cs{foremargin} (i.e., the inner and outer margins). It may be used
+% within \cs{fixthelayout} in case the user has not changed
+% \cs{marginparwidth} using \cs{setmarginnotes}.
+% \begin{macrocode}
+\newcommand\mem@autoadjust@marginparwidth{%
+ \if@twocolumn
+ \memsetlengthmin\marginparwidth\spinemargin\foremargin
+ \else
+ \if@twoside
+ \ifcase\m@mmpar@margin\relax% 0 - left
+ \memsetlengthmin\marginparwidth\spinemargin\foremargin
+ \or% 1 - right
+ \memsetlengthmin\marginparwidth\spinemargin\foremargin
+ \or% 2 - outer
+ \setlength\marginparwidth{\foremargin}
+ \or% 3 - inner
+ \setlength\marginparwidth{\spinemargin}
+ \fi
+ \else % oneside
+ \ifnum\m@mmpar@margin=0% left
+ \setlength\marginparwidth{\spinemargin}
+ \else% right
+ \setlength\marginparwidth{\foremargin}
+ \fi
+ \fi
+ \fi
+ \addtolength\marginparwidth{-2\marginparsep}
+ \ifdim\marginparwidth<1pt\setlength\marginparwidth{1pt}\fi%
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mem@reset@used@macros}
+% This macro is used to unset used macros. It is a manually
+% maintained macro. A better version would have been to let
+% \cs{memsetmacroused} record its use in a list, and then loop over
+% this list. Maybe some other time.
+% \begin{macrocode}
+\newcommand\mem@reset@used@macros{%
+ \memsetmacrounused\setmarginnotes
+ \memsetmacrounused\settypeblocksize
+ \memsetmacrounused\setulmargins
+ \memsetmacrounused\setlrmargins
+}
+
+% \end{macrocode}
+%
+% \end{macro}
+%
% \begin{macro}{\checkthelayout}
% \cs{checkthelayout}\oarg{text} is the user level macro for
% checking the layout. The \meta{text} argument controls which
@@ -4829,7 +4940,16 @@
% Fix standard page layouts after possible change of \cs{textwidth}.
% \changes{v1.6180339f}{2009/03/16}{Added \cs{fixheaderwidths} to \cs{fixthelayout}}
% \begin{macrocode}
- \fixheaderwidths}
+ \fixheaderwidths
+% \end{macrocode}
+% Autoadjust \cs{marginparwidth} unless the user have used
+% \cs{setmarginnotes}. Plus add a reset of the recordedmacros, just in
+% case \cs{fixthelayout} is being used several times.
+% \changes{v3.6k}{2013/05/15}{Added autoadjust}
+% \begin{macrocode}
+ \memifmacroused\setmarginnotes{}{\mem@autoadjust@marginparwidth}
+ \mem@reset@used@macros
+}
% \end{macrocode}
% \end{macro}
@@ -5676,13 +5796,13 @@
% \begin{macrocode}
\nametest{flushleft}{#2}
\ifsamename
- \@namedef{#1evenhpl}{\relax} \@namedef{#1evenhpr}{\hss}
+ \@namedef{#1evenheadpl}{\relax} \@namedef{#1evenheadpr}{\hss}
\else
\nametest{flushright}{#2}
\ifsamename
- \@namedef{#1evenhpl}{\hss} \@namedef{#1evenhpr}{\relax}
+ \@namedef{#1evenheadpl}{\hss} \@namedef{#1evenheadpr}{\relax}
\else
- \@namedef{#1evenhpl}{\hss} \@namedef{#1evenhpr}{\hss}
+ \@namedef{#1evenheadpl}{\hss} \@namedef{#1evenheadpr}{\hss}
\fi
\fi
% \end{macrocode}
@@ -5690,35 +5810,35 @@
% \begin{macrocode}
\nametest{flushleft}{#3}
\ifsamename
- \@namedef{#1oddhpl}{\relax} \@namedef{#1oddhpr}{\hss}
+ \@namedef{#1oddheadpl}{\relax} \@namedef{#1oddheadpr}{\hss}
\else
\nametest{flushright}{#3}
\ifsamename
- \@namedef{#1oddhpl}{\hss} \@namedef{#1oddhpr}{\relax}
+ \@namedef{#1oddheadpl}{\hss} \@namedef{#1oddheadpr}{\relax}
\else
- \@namedef{#1oddhpl}{\hss} \@namedef{#1oddhpr}{\hss}
+ \@namedef{#1oddheadpl}{\hss} \@namedef{#1oddheadpr}{\hss}
\fi
\fi
\nametest{flushleft}{#4}
\ifsamename
- \@namedef{#1evenfpl}{\relax} \@namedef{#1evenfpr}{\hss}
+ \@namedef{#1evenfootpl}{\relax} \@namedef{#1evenfootpr}{\hss}
\else
\nametest{flushright}{#4}
\ifsamename
- \@namedef{#1evenfpl}{\hss} \@namedef{#1evenfpr}{\relax}
+ \@namedef{#1evenfootpl}{\hss} \@namedef{#1evenfootpr}{\relax}
\else
- \@namedef{#1evenfpl}{\hss} \@namedef{#1evenfpr}{\hss}
+ \@namedef{#1evenfootpl}{\hss} \@namedef{#1evenfootpr}{\hss}
\fi
\fi
\nametest{flushleft}{#5}
\ifsamename
- \@namedef{#1oddfpl}{\relax} \@namedef{#1oddfpr}{\hss}
+ \@namedef{#1oddfootpl}{\relax} \@namedef{#1oddfootpr}{\hss}
\else
\nametest{flushright}{#5}
\ifsamename
- \@namedef{#1oddfpl}{\hss} \@namedef{#1oddfpr}{\relax}
+ \@namedef{#1oddfootpl}{\hss} \@namedef{#1oddfootpr}{\relax}
\else
- \@namedef{#1oddfpl}{\hss} \@namedef{#1oddfpr}{\hss}
+ \@namedef{#1oddfootpl}{\hss} \@namedef{#1oddfootpr}{\hss}
\fi
\fi}
@@ -5870,13 +5990,16 @@
%
% \end{macro}
% \begin{macro}{\mem@ps@HLH}
-% \changes{v3.6d}{201010/06/24}{Factored \cs{makepagestyle}}
+% \changes{v3.6d}{2010/10/06/24}{Factored \cs{makepagestyle}}
% The entries in the header used in \cs{makepagestyle} (below) are
% more or less the same. It depends on \emph{head/foot},
% \emph{odd/even} and a shorter \emph{o/e}. So to make the code more
% maintainable we factor this out into a generator macro. The
% explanation for the code being used is kept below (see
% \cs{makepagestyle}).
+% \changes{v3.6k}{2012/05/31}{Forgot to separate head/foot position into the
+% factorization, propblem reported by Wybo Dekker on
+% http://tex.stackexchange.com/q/56141/3929}
% \begin{macrocode}
\newcommand\mem@ps@HLH[4]{%
% #1 ps name
@@ -5884,7 +6007,7 @@
% #3 odd/even
% #4 odd/even short (o,e)
\@namedef{#1@#3#2}{%
- \@nameuse{#1#3hpl}\hb@xt@\@nameuse{#1#2runwidth}{\m@mhe@dreset%
+ \@nameuse{#1#3#2pl}\hb@xt@\@nameuse{#1#2runwidth}{\m@mhe@dreset%
% \end{macrocode}
% In footers the line goes before the text, so we test and add the
% footline if \texttt{\#2} equals \texttt{foot}.
@@ -5917,9 +6040,11 @@
% \end{macrocode}
% In the header the line goes under the text, so we test and add the
% headline if \texttt{\#2} equals \texttt{head}.
+% \changes{v3.6k}{2012/05/31}{Forgot to separate head/foot position into the
+% factorization}
% \begin{macrocode}
\nametest{#2}{head}\ifsamename\@nameuse{#1#2rule}\fi%
- }}\@nameuse{#1#3hpr}}%
+ }}\@nameuse{#1#3#2pr}}%
% \end{macrocode}
% And end by letting the LaTeX head/foot use our version
% \begin{macrocode}
@@ -6140,11 +6265,12 @@
\makerunningwidth{#1}[\@nameuse{#2footrunwidth}]{\@nameuse{#2headrunwidth}}%
% \end{macrocode}
% Specify the \cs{headposition}.
+% \changes{v3.6k}{2012/05/31}{some macro renaming}
% \begin{macrocode}
- \@namedef{#1evenhpl}{\@nameuse{#2evenhpl}}%
- \@namedef{#1oddhpl}{\@nameuse{#2oddhpl}}%
- \@namedef{#1evenhpr}{\@nameuse{#2evenhpr}}%
- \@namedef{#1oddhpr}{\@nameuse{#2oddhpr}}%
+ \@namedef{#1evenheadpl}{\@nameuse{#2evenheadpl}}%
+ \@namedef{#1oddheadpl}{\@nameuse{#2oddheadpl}}%
+ \@namedef{#1evenheadpr}{\@nameuse{#2evenheadpr}}%
+ \@namedef{#1oddheadpr}{\@nameuse{#2oddheadpr}}%
% \end{macrocode}
% Also vertically
% \changes{v1.6180339c}{2008/01/13}{Also copy the vertical positions}
@@ -6154,11 +6280,12 @@
\makeheadfootvposition{#1}{\@nameuse{#2headvplacement}}{\@nameuse{#2footvplacement}}%
% \end{macrocode}
% Specify the feet
+% \changes{v3.6k}{2012/05/31}{some macro renaming}
% \begin{macrocode}
- \@namedef{#1evenfpl}{\@nameuse{#2evenfpl}}%
- \@namedef{#1oddfpl}{\@nameuse{#2oddfpl}}%
- \@namedef{#1evenfpr}{\@nameuse{#2evenfpr}}%
- \@namedef{#1oddfpr}{\@nameuse{#2oddfpr}}%
+ \@namedef{#1evenfootpl}{\@nameuse{#2evenfootpl}}%
+ \@namedef{#1oddfootpl}{\@nameuse{#2oddfootpl}}%
+ \@namedef{#1evenfootpr}{\@nameuse{#2evenfootpr}}%
+ \@namedef{#1oddfootpr}{\@nameuse{#2oddfootpr}}%
% \end{macrocode}
% Specify the head and foot rules and the prefixes.
% \changes{v3.6h}{2011/01/25}{Added the \cs{makeheadfootruleprefix}}
@@ -6285,12 +6412,16 @@
% \begin{macro}{\uppercaseheads}
% \begin{macro}{\memUChead}
% Spurred by Lars Madsen's \Lpack{memexsupp} v0.5 package here is a
-% way of switching uppercasing in the headings pagestyle.
+% way of switching uppercasing in the headings pagestyle.
% \changes{v1.61803}{2008/01/30}{Added \cs{(no)uppercaseheads} and
% \cs{memUChead} (mempatch v4.9)}
+% \changes{v3.6k}{2011/05/20}{Making \cs{memUChead} equal to
+% \cs{relax} can cause problems when users want to \cs{provide} it in
+% other applications. It is now redefined into the empty string.}
+% \changes{v3.6k}{2012/09/13}{Default upper case now \cs{MakeTextUppercase}}
% \begin{macrocode}
-\newcommand*{\nouppercaseheads}{\let\memUChead\relax}
-\newcommand*{\uppercaseheads}{\let\memUChead\MakeUppercase}
+\newcommand*{\nouppercaseheads}{\def\memUChead{}}
+\newcommand*{\uppercaseheads}{\def\memUChead{\MakeTextUppercase}}
\uppercaseheads
% \end{macrocode}
@@ -6809,15 +6940,29 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+% \begin{macro}{\framepichook}
+% \changes{v3.6k}{2013/05/08}{Added \cs{framepichook}}
+% The two macros \cs{framepichead} and \cs{framepictextfoot} are used
+% to make up the \texttt{showlocs} page style. They are both zero
+% width \texttt{picture} environments. The very first thing in these
+% \texttt{picture} environments, is a call to \cs{framepichook}
+% (empty by default), which could be used to change the color of the
+% frame.
+% \begin{macrocode}
+\newcommand\framepichook{}
+% \end{macrocode}
+%
+% \end{macro}
% \begin{macro}{\framepichead}
% For producing a zero-sized picture of a line at the base of the header.
% It is meant to be used as the left part of the header for a pagestyle.
% \changes{v1.6180339c}{2008/12/28}{Added \cs{framepichead}}
+% \changes{v3.6k}{2013/05/08}{Added \cs{framepichook}}
% \begin{macrocode}
\newcommand*{\framepichead}{%
\ifshowheadfootloc
\begin{picture}(0,0)
+ \framepichook
\unitlength 1pt
\put(0,0){\line(1,0){\strip@pt\textwidth}}
\end{picture}%
@@ -6831,9 +6976,11 @@
% and a frame around the text block. It is meant to be used as the left
% part of a footer for a pagestyle.
% \changes{v1.6180339c}{2008/12/28}{Added \cs{framepictextfoot}}
+% \changes{v3.6k}{2013/05/08}{Added \cs{framepichook}}
% \begin{macrocode}
\newcommand*{\framepictextfoot}{%
\begin{picture}(0,0)
+ \framepichook
\unitlength 1pt
\ifshowheadfootloc
\put(0,0){\line(1,0){\strip@pt\textwidth}}
@@ -7687,13 +7834,17 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{mem@titlingpage}
% \begin{environment}{titlingpage}
+% \begin{environment}{titlingpage*}
% The \Lenv{titlingpage} environment sets the pagestyle to be \pstyle{titlingpage},
% disables the footnote rule and ensures that the page is single
% column. At the end it switches back to twocolumn if neccessary,
-% and then starts a new page as number 1.
+% and then starts a new page as number 1. On the other hand
+% \Lenv{titlingpage*}, does \emph{not} reset the page counter.
+% \changes{v3.6k}{2012/12/24}{Added \Lenv{titlingpage*} env}
% \begin{macrocode}
-\newenvironment{titlingpage}%
+\newenvironment{mem@titlingpage}%
{\let\footnoterule\relax
\let\footnotesize\small
\if@twocolumn
@@ -7702,16 +7853,26 @@
\@restonecolfalse
\fi
\thispagestyle{titlingpage}%
- \setcounter{page}{\@ne}%
+ \if\mem@titlpg@reset\setcounter{page}{\@ne}\fi%
}{%
\thispagestyle{titlingpage}%
\if@restonecol \twocolumn \fi
\if@twoside \cleardoublepage \else \clearpage \fi
- \setcounter{page}{\@ne}}
+ \if\mem@titlpg@reset\setcounter{page}{\@ne}\fi}
+\newenvironment{titlingpage}{%
+ \def\mem@titlpg@reset{00}%
+ \begin{mem@titlingpage}}{%
+ \end{mem@titlingpage}}
+\newenvironment{titlingpage*}{%
+ \def\mem@titlpg@reset{01}%
+ \begin{mem@titlingpage}}{%
+ \end{mem@titlingpage}}
\aliaspagestyle{titlingpage}{empty}
% \end{macrocode}
% \end{environment}
+% \end{environment}
+% \end{environment}
%
% \begin{macro}{\emptythanks}
% This macro discards all prior \cs{thanks} texts.
@@ -7735,6 +7896,8 @@
% \begin{macro}{\@bsmtitlempty}
% \cs{@bsmtitlempty} is a helper macro to save some macro space.
% It empties some elements of \cs{maketitle}.
+% \changes{v3.6k}{2012/07/01}{Removed \cs{thanksfootextra}, seems to
+% have been forgotten back in 2003.}
% \begin{macrocode}
\newcommand{\@bsmtitlempty}{%
\global\let\maketitle\relax
@@ -7743,7 +7906,6 @@
\global\let\author\relax
\global\let\date\relax
\global\let\thanksmarkseries\relax
- \global\let\thanksheadextra\relax
\global\let\thanksfootextra\relax
\global\let\thanksmark\relax
\global\let\thanksgap\relax}
@@ -7910,7 +8072,7 @@
% To get a normal paragraphed title you can do: \\
% \verb?\renewcommand{\@hangfrom}[1]{#1}? \\
% or as a block paragraph: \\
-% \verb?\renewcommand{\@hangfrom}[1]{\noindent #1}}? \\
+% \verb?\renewcommand{\@hangfrom}[1]{\noindent #1}? \\
%
% \DescribeMacro{\@seccntformat}
% The \cs{@startsection} macro also uses \verb?\@seccntformat{NUM}? to format
@@ -8189,7 +8351,7 @@
% \end{macro}
%
% \begin{macro}{\@memmain@floats}
-% \changes{v1.6180339f}{Added \cs{@memmain@floats}}
+% \changes{v1.6180339f}{}{Added \cs{@memmain@floats}}
% Factoring out the float counter domination, in case someone wants
% something added or changed
% \begin{macrocode}
@@ -8402,16 +8564,27 @@
% \begin{macrocode}
\long\def\@book[#1]#2{%
\M@gettitle{#1}%
+% \end{macrocode}
+% For continuity we store the toc entry in \verb?\f@rtoc? before
+% writing it to the \verb?.toc? file. We also provide a hook to be
+% able to transform it.
+% \changes{v3.6k}{2012/09/18}{Provided \cs{f@rtoc} and hook}
+% \changes{v3.6k}{2013/04/24}{Added \cs{mempreaddbooktotochook} and \cs{mempostaddbooktotochook}}
+% \begin{macrocode}
+ \def\f@rtoc{#1}%
+ \@nameuse{book@f@rtoc@before@write@hook}%
\phantomsection
+ \mempreaddbooktotochook
\ifnum \c@secnumdepth >-3\relax
\refstepcounter{book}%
\addcontentsline{toc}{book}%
- {\protect\booknumberline{\thebook}#1}%
- \membookinfo{\thebook}{#1}{#2}%
+ {\protect\booknumberline{\thebook}\f@rtoc}%
+ \membookinfo{\thebook}{\f@rtoc}{#2}%
\else
- \addcontentsline{toc}{book}{#1}%
- \membookinfo{}{#1}{#2}%
+ \addcontentsline{toc}{book}{\f@rtoc}%
+ \membookinfo{}{\f@rtoc}{#2}%
\fi
+ \mempostaddbooktotochook
% \end{macrocode}
% Empty the marks, center the title on the page, and set the normal font.
% \changes{v3.6j}{2011/03/03}{Set \cs{parskip} to zero, such that a
@@ -8436,6 +8609,18 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\mempreaddbooktotochook}
+% \begin{macro}{\mempostaddbooktotochook}
+% Hooks executed just before and just after \cs{book} adds something
+% to the ToC. Does nothing by default
+% \begin{macrocode}
+\newcommand\mempreaddbooktotochook{}
+\newcommand\mempostaddbooktotochook{}
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\@sbook}
% \cs{@sbook}\marg{long} formats the title of a \cs{book*} book. It is
% simpler than \cs{@book} because there is no number to print.
@@ -8625,16 +8810,27 @@
% \begin{macrocode}
\long\def\@part[#1]#2{%
\M@gettitle{#1}%
+% \end{macrocode}
+% For continuity we store the toc entry in \verb?\f@rtoc? before
+% writing it to the \verb?.toc? file. We also provide a hook to be
+% able to transform it.
+% \changes{v3.6k}{2012/09/18}{Provided \cs{f@rtoc} and hook}
+% \changes{v3.6k}{2013/04/24}{Added \cs{mempreaddparttotochook} and \cs{mempostaddparttotochook}}
+% \begin{macrocode}
+ \def\f@rtoc{#1}%
+ \@nameuse{part@f@rtoc@before@write@hook}%
\phantomsection
+ \mempreaddparttotochook
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}%
- {\protect\partnumberline{\thepart}#1}%
- \mempartinfo{\thepart}{#1}{#2}%
+ {\protect\partnumberline{\thepart}\f@rtoc}%
+ \mempartinfo{\thepart}{\f@rtoc}{#2}%
\else
- \addcontentsline{toc}{part}{#1}%
- \mempartinfo{}{#1}{#2}%
+ \addcontentsline{toc}{part}{\f@rtoc}%
+ \mempartinfo{}{\f@rtoc}{#2}%
\fi
+ \mempostaddparttotochook
% \end{macrocode}
% Empty the marks, center the title on the page, and set the normal font.
% \changes{v3.6j}{2011/03/03}{Set \cs{parskip} to zero inside the
@@ -8660,6 +8856,18 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\mempreaddparttotochook}
+% \begin{macro}{\mempostaddparttotochook}
+% Hooks executed just before and just after \cs{part} adds something
+% to the ToC. Does nothing by default
+% \begin{macrocode}
+\newcommand\mempreaddparttotochook{}
+\newcommand\mempostaddparttotochook{}
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\@spart}
% \cs{@spart}\marg{long} formats the title of a \cs{part*} part. It is
% simpler than \cs{@part} because there is no number to print.
@@ -8848,7 +9056,7 @@
% \begin{macro}{\ifm@mpn@new@schap}
% \begin{macro}{\m@mpn@new@schapfalse}
% \begin{macro}{\m@mpn@new@schaptrue}
-% These are for supporting the [age/end notes, flagging that a
+% These are for supporting the page/end notes, flagging that a
% \verb?\chapter(*)? has been called.
% \changes{v1.61803}{2008/01/30}{Added \cs{ifm@mpn@new@chap} and
% \cs{ifm@mpn@new@chap} (mempatch v4.5)}
@@ -8931,11 +9139,21 @@
\@afterheading
\fi
% \end{macrocode}
+% When working with \Lpack{hyperref} it is not possible to add, say,
+% upper casing to ToC entries via \cs{cftchapterfont}. We provide a
+% hook, such that users can transform \cs{f@rtoc} before it is
+% actually written to the \texttt{.toc} file.
+% \changes{v3.6k}{2012/09/18}{Added}
+% \begin{macrocode}
+ \@nameuse{chapter@f@rtoc@before@write@hook}%
+% \end{macrocode}
% Vittorio De Martino (\texttt{demartino.vittoria@grtn.it}) on
% 31 March 2003 reported that for articled chapters, which do not do
% any \cs{clearpage}, \cs{addcontents} had to come after the title.
% \changes{v1.4}{2003/11/16}{Changed \cs{@chapter} to match patches v1.n}
+% \changes{v3.6k}{2013/04/24}{Added pretoc and posttoc hooks}
% \begin{macrocode}
+ \mempreaddchaptertotochook%
\ifm@m@And
\ifanappendix
\addcontentsline{toc}{appendix}{%
@@ -8954,18 +9172,61 @@
\memchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
\fi
\fi
+ \mempostaddchaptertotochook%
% \end{macrocode}
% Add hook for title referencing.
% \changes{v1.4}{2003/11/16}{Added \cs{M@gettitle} to \cs{@chapter}}
+% \changes{v3.6k}{2013/04/24}{Added \cs{memendofchapterhook}}.
+% The hook at the very end can be used to automatically add a new page
+% right after \cs{chapter}.
% \begin{macrocode}
- \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi}
+ \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi%
+ \memendofchapterhook%
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \begin{macro}{\mempreaddchaptertotochook}
+% \begin{macro}{\mempostaddchaptertotochook}
+% \begin{macro}{\memendofchapterhook}
+% These two hooks are executed before \cs{chapter} adds anything to
+% the TOC and after it does so. It can be used to add hooks into the
+% TOC such that parts can be switched on and off. By default they do nothing.
+% \begin{macrocode}
+\newcommand\mempreaddchaptertotochook{}
+\newcommand\mempostaddchaptertotochook{}
+\newcommand\memendofchapterhook{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
%
+% \begin{macro}{\settocpreprocessor}
+% \changes{v3.6k}{2012/09/18}{Added}
+% This can be used to set a hook which users can fill in in order to
+% get the toc material preprocessed before writing it to the
+% \verb?.toc? file. The primary use for this is as a workaround when
+% \Lpack{hyperref} is used, and one want to have, say, upper cased toc
+% entries. Example of use
+% \begin{verbatim}
+% \makeatletter
+% \settocpreprocessor{chapter}{%
+% \let\temp@f@rtoc\f@rtoc
+% \def\f@rtoc{\texorpdfstring{\MakeTextUppercase{\temp@f@rtoc}}{\temp@f@rtoc}}
+% }
+% \makeatother
+% \end{verbatim}
+% The idea comes from \url{http://tex.stackexchange.com/q/11892/3929}
+% eliminating the need for patching.
+% \begin{macrocode}
+\newcommand\settocpreprocessor[2]{%
+ \@namedef{#1@f@rtoc@before@write@hook}{#2}}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\@makechapterhead}
% This \emph{really} typesets a \cs{chapter}. Leave some whitespace and prepare to
@@ -9187,20 +9448,20 @@
% \changes{v1.61803}{2008/01/30}{Simplified specification of the default chapterstyle}
% \begin{macrocode}
\makechapterstyle{default}{}%
-%% \setlength{\beforechapskip}{50pt}
-%% \def\chapterheadstart{\vspace*{\beforechapskip}}
-%% \def\chapnamefont{\normalfont\huge\bfseries}
-%% \def\printchaptername{\chapnamefont \@chapapp}
-%% \def\chapternamenum{\space}
-%% \def\chapnumfont{\normalfont\huge\bfseries}
-%% \def\printchapternum{\chapnumfont \thechapter}
-%% \setlength{\midchapskip}{20pt}
-%% \def\afterchapternum{\par\nobreak\vskip \midchapskip}
-%% \def\printchapternonum{}
-%% \def\chaptitlefont{\normalfont\Huge\bfseries}
-%% \def\printchaptertitle##1{\chaptitlefont ##1}
-%% \setlength{\afterchapskip}{40pt}
-%% \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}}
+ %% \setlength{\beforechapskip}{50pt}
+ %% \def\chapterheadstart{\vspace*{\beforechapskip}}
+ %% \def\chapnamefont{\normalfont\huge\bfseries}
+ %% \def\printchaptername{\chapnamefont \@chapapp}
+ %% \def\chapternamenum{\space}
+ %% \def\chapnumfont{\normalfont\huge\bfseries}
+ %% \def\printchapternum{\chapnumfont \thechapter}
+ %% \setlength{\midchapskip}{20pt}
+ %% \def\afterchapternum{\par\nobreak\vskip \midchapskip}
+ %% \def\printchapternonum{}
+ %% \def\chaptitlefont{\normalfont\Huge\bfseries}
+ %% \def\printchaptertitle##1{\chaptitlefont ##1}
+ %% \setlength{\afterchapskip}{40pt}
+ %% \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
\chapterstyle{default}
% \end{macrocode}
@@ -9371,6 +9632,7 @@
% \begin{macro}{\chs@bringhurst}
% My bringhurst style.
% \changes{v1.61803398}{2009/07/17}{Added bidi support to bringhurst chapterstyle}
+% \changes{c3.6k}{2012/09/18}{\cs{MakeLowercase} $\to$ \cs{MakeTextLowercase}}
% \begin{macrocode}
\makechapterstyle{bringhurst}{%
\chapterstyle{default}
@@ -9380,8 +9642,8 @@
\renewcommand*{\printchapternum}{}
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchaptertitle}[1]{%
-%%% \raggedright\Large\scshape\MakeLowercase{##1}}
- \memRTLraggedright\Large\scshape\MakeLowercase{##1}}
+ %%% \raggedright\Large\scshape\MakeLowercase{##1}}
+ \memRTLraggedright\Large\scshape\MakeTextLowercase{##1}}
\renewcommand*{\afterchaptertitle}{%
\vskip\onelineskip \hrule\vskip\onelineskip}}
@@ -9684,7 +9946,10 @@
% \begin{macro}{\chs@thatcher}
% Original posted to CTT on 2006/01/18 by Scott Thatcher,
% \textit{memoir: chapter headings capitalize math symbols}. I have modified
-% it to cater for multiline titles, appendices, and unnumbered chapters.
+% it to cater for multiline titles, appendices, and unnumbered
+% chapters.
+% \changes{c3.6k}{2012/09/18}{\cs{MakeUppercase} $\to$ \cs{MakeTextUppercase}}
+% \changes{c3.6k}{2012/09/18}{\cs{MakeLowercase} $\to$ \cs{MakeTextLowercase}}
% \begin{macrocode}
\makechapterstyle{thatcher}{%
\chapterstyle{default}
@@ -9692,7 +9957,7 @@
\renewcommand*{\printchaptername}{%
\centerline{\chapnumfont{\@chapapp\ \thechapter}}}
\renewcommand*{\chapternamenum}{}
- \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeLowercase}
+ \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeTextLowercase}
\renewcommand*{\printchapternum}{}
\renewcommand*{\afterchapternum}{%
\par\centerline{\parbox{0.5in}{\hrulefill}}\par}
@@ -9701,7 +9966,7 @@
\parbox{0.5in}{}\par}
\renewcommand*{\chaptitlefont}{\normalfont\large}
\renewcommand*{\printchaptertitle}[1]{%
- \centering \chaptitlefont\MakeUppercase{##1}}}
+ \centering \chaptitlefont\MakeTextUppercase{##1}}}
% \end{macrocode}
% \end{macro}
@@ -9713,6 +9978,7 @@
% It well suits trimmed documents.
% We are scaling the chapter number, which most DVI viewers
% will not display accurately. It requires the graphicx package.
+% \changes{c3.6k}{2012/09/18}{\cs{MakeUppercase} $\to$ \cs{MakeTextUppercase}}
% \begin{macrocode}
\makechapterstyle{veelo}{%
% \chapterstyle{default}
@@ -9723,7 +9989,7 @@
\renewcommand*{\chapnumfont}{\normalfont\HUGE}
\renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
\renewcommand*{\printchaptername}{%
- \chapnamefont\MakeUppercase{\@chapapp}}
+ \chapnamefont\MakeTextUppercase{\@chapapp}}
\renewcommand*{\chapternamenum}{}
% \setlength{\numberheight}{18mm}
% \setlength{\barlength}{\paperwidth}
@@ -9899,15 +10165,19 @@
% \begin{macro}{\raggedbottomsectionfalse}
% \begin{macro}{\raggedbottomsection}
% \begin{macro}{\normalbottomsection}
+% \begin{macro}{\bottomsectionpenalty}
% \cs{raggedbottomsectiontrue} for ragged short pages.
% \changes{v1.3}{2002/11/14}{Added \cs{ifraggedbottomsection}}
% \changes{v1.61803}{2008/01/30}{Added \cs{raggedbottomsection} and
% \cs{normalbottomsection}}
+% \changes{v3.6k}{2012/07/22}{Made the \cs{raggedbottomsection}
+% penalty configurable}
% \begin{macrocode}
\newif\ifraggedbottomsection
\raggedbottomsectionfalse
\newcommand*{\raggedbottomsection}{\raggedbottomsectiontrue}
\newcommand*{\normalbottomsection}{\raggedbottomsectionfalse}
+\newcommand*{\bottomsectionpenalty}{\z@}
% \end{macrocode}
% \end{macro}
@@ -9915,6 +10185,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\bottomsectionskip}
% Decreasing this length increases short page bottom flushness.
@@ -10003,10 +10274,12 @@
\@nameuse{#1block}%
% \end{macrocode}
% Do raggedbottom stuff.
+% \changes{v3.6k}{2012/07/22}{Made the \cs{raggedbottomsection}
+% penalty configurable}
% \begin{macrocode}
\ifraggedbottomsection\if@nobreak\else
\vskip\z@\@plus\bottomsectionskip
- \penalty\z@
+ \penalty\bottomsectionpenalty
\vskip\z@\@plus -\bottomsectionskip
\fi\fi
% \end{macrocode}
@@ -10954,6 +11227,7 @@
% \begin{macro}{\hds@bringhurst}
% Head styles based on Bringhurst's book
% \changes{v1.61803398}{2009/07/17}{Added bidi support to bringhurst headstyles}
+% \changes{c3.6k}{2012/09/18}{\cs{MakeLowercase} $\to$ \cs{MakeTextLowercase}}
% \begin{macrocode}
\makeheadstyles{bringhurst}{%
% chapter
@@ -10963,7 +11237,7 @@
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
%%% \setsecheadstyle{\normalfont\raggedright\scshape\MakeLowercase}%
- \setsecheadstyle{\normalfont\memRTLraggedright\scshape\MakeLowercase}%
+ \setsecheadstyle{\normalfont\memRTLraggedright\scshape\MakeTextLowercase}%
% subsection
\setbeforesubsecskip{-1.0\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
@@ -10974,7 +11248,7 @@
\setbeforesubsubsecskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
\setaftersubsubsecskip{-1em}%
- \setsubsubsecheadstyle{\normalfont\normalsize\scshape\MakeLowercase}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\scshape\MakeTextLowercase}%
% paragraph
\setbeforeparaskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
@@ -10992,6 +11266,7 @@
%
% \begin{macro}{\hds@crosshead}
% Head styles based on one of Bringhurst's suggestions.
+% \changes{c3.6k}{2012/09/18}{\cs{MakeUppercase} $\to$ \cs{MakeTextUppercase}}
% \begin{macrocode}
\makeheadstyles{crosshead}{%
\chapterstyle{crosshead}
@@ -10999,7 +11274,7 @@
\setbeforesecskip{-1.25\onelineskip
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{0.75\onelineskip \@plus 0.1\onelineskip}%
- \setsecheadstyle{\normalfont\centering\MakeUppercase}%
+ \setsecheadstyle{\normalfont\centering\MakeTextUppercase}%
% subsection
\setbeforesubsecskip{-1.25\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
@@ -11009,7 +11284,7 @@
\setbeforesubsubsecskip{-.667\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsubsecskip{.333\onelineskip \@plus 0.1\onelineskip}%
- \setsubsubsecheadstyle{\normalfont\normalsize\centering\scshape\MakeLowercase}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\centering\scshape\MakeTextLowercase}%
% paragraph
\setbeforeparaskip{-.667\onelineskip
\@plus -02.5\onelineskip \@minus -0.25\onelineskip}%
@@ -11020,13 +11295,15 @@
\setbeforesubparaskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
\setaftersubparaskip{-1em}%
- \setsubparaheadstyle{\normalfont\normalsize\scshape\MakeLowercase}}
+ \setsubparaheadstyle{\normalfont\normalsize\scshape\MakeTextLowercase}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hds@dowding}
% Head styles based on Dowding's \textit{Finer Points}.
+% \changes{c3.6k}{2012/09/18}{\cs{MakeUppercase} $\to$ \cs{MakeTextUppercase}}
+% \changes{c3.6k}{2012/09/18}{\cs{MakeLowercase} $\to$ \cs{MakeTextLowercase}}
% \begin{macrocode}
\makeheadstyles{dowding}{%
% chapter
@@ -11035,12 +11312,12 @@
\setbeforesecskip{-2\onelineskip
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
- \setsecheadstyle{\normalfont\centering\MakeUppercase}%
+ \setsecheadstyle{\normalfont\centering\MakeTextUppercase}%
% subsection
\setbeforesubsecskip{-1.2\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsecskip{0.8\onelineskip \@plus 0.1\onelineskip}%
- \setsubsecheadstyle{\normalfont\scshape\centering\MakeLowercase}%
+ \setsubsecheadstyle{\normalfont\scshape\centering\MakeTextLowercase}%
% subsubsection
\setbeforesubsubsecskip{-0.667\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
@@ -11102,12 +11379,13 @@
%
% \begin{macro}{\hds@ntglike}
% Head styles based on the NTG classes (\texttt{boek.cls}).
+% \changes{c3.6k}{2012/09/18}{\cs{MakeUppercase} $\to$ \cs{MakeTextUppercase}}
% \begin{macrocode}
\makeheadstyles{ntglike}{%
% part
- \renewcommand*{\partnamefont}{\Large\bfseries\MakeUppercase}%
+ \renewcommand*{\partnamefont}{\Large\bfseries\MakeTextUppercase}%
\renewcommand*{\partnumfont}{\Large\bfseries}%
- \renewcommand*{\parttitlefont}{\Large\MakeUppercase}%
+ \renewcommand*{\parttitlefont}{\Large\MakeTextUppercase}%
% chapter
\chapterstyle{ntglike}
% section
@@ -11141,6 +11419,7 @@
% \begin{macro}{\hds@tandh}
% Head styles based on Thames \& Hudson \textit{Typography}.
% \changes{v1.61803398}{2009/07/17}{Added bidi support to tandh headstyles}
+% \changes{c3.6k}{2012/09/18}{\cs{MakeUppercase} $\to$ \cs{MakeTextUppercase}}
% \begin{macrocode}
\makeheadstyles{tandh}{%
% chapter
@@ -11150,7 +11429,7 @@
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
%%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}%
- \setsecheadstyle{\normalfont\memRTLraggedright\MakeUppercase}%
+ \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}%
% subsection
\setbeforesubsecskip{-1.2\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
@@ -11181,6 +11460,7 @@
% \begin{macro}{\hds@wilsondob}
% Head styles based on Adrian Wilson's \textit{The Design of Books}.
% \changes{v1.61803398}{2009/07/17}{Added bidi support to wilsondob headstyles}
+% \changes{c3.6k}{2012/09/18}{\cs{MakeUppercase} $\to$ \cs{MakeTextUppercase}}
% \begin{macrocode}
\makeheadstyles{wilsondob}{%
% chapter
@@ -11190,7 +11470,7 @@
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{0.667\onelineskip \@plus 0.1\onelineskip}%
%%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}%
- \setsecheadstyle{\normalfont\memRTLraggedright\MakeUppercase}%
+ \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}%
% subsection
\setbeforesubsecskip{-0.667\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
@@ -11202,7 +11482,7 @@
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
%%% \setsubsubsecheadstyle{\normalfont\normalsize\raggedright\scshape\MakeLowercase}%
- \setsubsubsecheadstyle{\normalfont\normalsize\memRTLraggedright\scshape\MakeLowercase}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\memRTLraggedright\scshape\MakeTextLowercase}%
% paragraph
\setbeforeparaskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
@@ -11280,10 +11560,13 @@
%
% \begin{macro}{\@apppage}
% \cs{@apppage} typesets an appendix page and makes an entry in the ToC.
+% \changes{v3.6k}{2013/04/25}{Added \cs{mempre/postaddchaptertotochook}}
% \begin{macrocode}
\def\@apppage{%
\@setuppart
+ \mempreaddapppagetotochook
\addappheadtotoc
+ \mempostaddapppagetotochook
\partmark{\appendixpagename}%
\memapppageinfo{\appendixpagename}%
{\centering
@@ -11293,7 +11576,18 @@
\@endpart}
% \end{macrocode}
% \end{macro}
-%
+% \begin{macro}{\mempreaddapppagetotochook}
+% \begin{macro}{\mempostaddapppagetotochook}
+% Hooks before and after adding something to the ToC. Does nothing
+% by default.
+% \begin{macrocode}
+\newcommand\mempreaddapppagetotochook{}
+\newcommand\mempostaddapppagetotochook{}
+
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@sapppage}
% \cs{@sapppage} typesets an appendix page and does not make an entry in the ToC.
@@ -11460,12 +11754,13 @@
% \begin{macro}{\@formatsecmark@pp}
% Formats the page header for a redefined \cs{sectionmark}.
% \begin{macrocode}
-\newcommand{\@formatsecmark@pp}[1]{%
- \MakeUppercase{\appendixname\space
- \ifnum \c@secnumdepth >\z@
- \thesection\quad
- \fi
- #1}}
+% unused?
+% \newcommand{\@formatsecmark@pp}[1]{%
+% \MakeUppercase{\appendixname\space
+% \ifnum \c@secnumdepth >\z@
+% \thesection\quad
+% \fi
+% #1}}
% \end{macrocode}
% \end{macro}
%
@@ -14596,7 +14891,7 @@
% insignificant here for most classes.
% \begin{macrocode}
\z@ \@chclass
- \if\@nextchar |\@ne \else
+ \if\@nextchar |\@ne \else%| emacs
\if \@nextchar !6 \else
\if \@nextchar @7 \else
\if \@nextchar <8 \else
@@ -15850,7 +16145,7 @@
% the list \cs{NC@list}.
% \begin{macrocode}
\@ifundefined{NC@find@\NC@char}%
- {\@tfor\next:=<>clrmbp@!|\do{\if\noexpand\next\NC@char
+ {\@tfor\next:=<>clrmbp@!|\do{\if\noexpand\next\NC@char%|emacs
\@memwarn{Redefining primitive column \NC@char}\fi}%
\NC@list\expandafter{\the\NC@list\NC@do#1}}%
{\@memwarn{Column \NC@char\space is already defined}}%
@@ -18437,27 +18732,34 @@
%
% \begin{macro}{\@float}
% \begin{macro}{\@dbfloat}
-% The kernel \cs{@float} and \cs{@dblfloat} macros are redefined to set
-% \cs{ifdonemaincaption} to FALSE, and also to zero the subfloat
-% counter, if it is defined.
-% Ignasi Furi\`{o} reported\footnote{Private email from
-% \texttt{ignasi.furio@uib.es}, 2003/10/17} that floats embedded in text
-% created an extra space. This was caused by a missing \verb?%?.
-% \changes{v1.4}{2003/11/22}{Deleted spaces from \cs{@float} and
-% \cs{@dblfloat} (from patch v1.9)}
+% \begin{macro}{\@memresetsubcounter}
+% The kernel \cs{@float} and \cs{@dblfloat} macros are redefined to
+% set \cs{ifdonemaincaption} to FALSE, and also to zero the subfloat
+% counter, if it is defined. Ignasi Furi\`{o}
+% reported\footnote{Private email from \texttt{ignasi.furio@uib.es},
+% 2003/10/17} that floats embedded in text created an extra
+% space. This was caused by a missing \verb?%?.
+% \changes{v1.4}{2003/11/22}{Deleted spaces from \cs{@float} and
+% \cs{@dblfloat} (from patch v1.9)}
+% Axel Sommerfeldt\footnote{Private email, from axel.sommerfeldt@f-m.fm,
+% 2013/05/10} asked for the subcounter reset to be factored out into
+% a macro and provided the code.
% \begin{macrocode}
\let\@memoldfloat\@float
\renewcommand{\@float}[1]{\donemaincaptionfalse
- \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}%
+ \@memresetsubcounter{#1}%
\@memoldfloat{#1}}
\let\@memolddblfloat\@dblfloat
\renewcommand{\@dblfloat}[1]{\donemaincaptionfalse
- \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}%
+ \@memresetsubcounter{#1}%
\@memolddblfloat{#1}}
+\newcommand{\@memresetsubcounter}[1]{%
+ \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\end@float}
% \begin{macro}{\end@dblfloat}
@@ -18663,7 +18965,7 @@
%
% \begin{macro}{\captiondelim}
% \begin{macro}{\@contdelim}
-% For the caption delimeter.
+% For the caption delimiter.
% \begin{macrocode}
\newcommand{\captiondelim}[1]{\def\@contdelim{#1}}
\captiondelim{: }
@@ -18879,11 +19181,35 @@
% (from patch v1.5)}
% \changes{v1.61803}{2008/01/30}{Added \cs{@contfinal} to \cs{@makecaption}
% (mempatch v4.4)}
+%
+% Axel Sommerfelt\footnote{Private email discussion} suggested to
+% split \cs{@makecaption} into two macros, such that the caption
+% formatting and the space above and below are separate. This enables
+% us to use the formatting macro (\cs{@@makecaption}) to format, say,
+% \Lpack{longtable} captions.
+% \changes{v3.6k}{2013/05/13}{Split \cs{@makecaption} into
+% \cs{@makecaption} and \cs{@@makecaption}}
% \begin{macrocode}
\long\def\@makecaption#1#2{\let\@memtempa\relax
\ifdim\prevdepth>-99\p@ \vskip\abovecaptionskip
\else \def\@memtempa{\vbox to\topskip{}}\fi
% \end{macrocode}
+% Inserting \cs{@@makecaption} to format the actual caption.
+% \begin{macrocode}
+ \@@makecaption{#1}{#2}%
+% \end{macrocode}
+% Then add the below caption spacing.
+% \begin{macrocode}
+ \vskip\belowcaptionskip}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@makecaption}
+% Next the rest of the caption code as \cs{@@makecaption}.
+% \begin{macrocode}
+\long\def\@@makecaption#1#2{%
+% \end{macrocode}
% \begin{macro}{\@contfnote}
% \begin{macro}{\@contfmark}
% The caption title will be typeset twice, firstly to measure its width
@@ -18900,8 +19226,9 @@
% \end{macro}
% Now measure the width of the total caption, not forgetting to take account
% of the font specifications, and then restore the footnoting.
+% \changes{v3.6k}{2013/05/13}{Font grouping, suggested by Axel Sommerfelt}
% \begin{macrocode}
- \sbox\@tempboxa{\@contnfont #1\@contdelim \@conttfont #2\@contfinal}
+ \sbox\@tempboxa{{\@contnfont #1\@contdelim}\@conttfont #2\@contfinal}
\let\footnote\@contfnote
\let\footnotemark\@contfmark
\let\pagenote\@contpnote
@@ -18971,13 +19298,14 @@
% Finish off the typesetting by processing the post-text, and if not using
% the normal width then close off the \cs{parbox}, and lastly put in some
% vertical space.
+% \changes{v3.6k}{2013/05/13}{Removed the below vertical skip}
% \begin{macrocode}
\@contpost
\if@contcw
\par
} % end of the \parbox
\fi
- \vskip\belowcaptionskip}
+ }
% \end{macrocode}
% \end{macro}
@@ -19657,8 +19985,9 @@
% This is a modified version of the \Lpack{subfigure} \cs{@subfloat}
% command Essentially the \verb?\csname if#1topcap\endcsname? constructs are
% replaced by \cs{if@contbotsub}.
+% \changes{v3.6k}{2011/05/16}{This ought to be long}
% \begin{macrocode}
-\def\@memsubfloat#1[#2][#3]#4{%
+\long\def\@memsubfloat#1[#2][#3]#4{%
\@tempcnta=\@ne
\if@tightsubcap
\if@minipage
@@ -19753,11 +20082,13 @@
%
% \begin{macro}{\@makesubfloatcaption}
% This is a copy of \cs{@makesubfigurecaption}.
+% \changes{v3.6k}{2011/07/21}{Added a \cs{unskip} to remove a space if
+% the text is empty}
% \begin{macrocode}
\newcommand{\@makesubfloatcaption}[2]{%
\setbox\@tempboxa\hbox{%
\@subcapsize
- {\@subcaplabelfont #1}{\@subcapfont\ignorespaces #2}}%
+ {\@subcaplabelfont #1}{\@subcapfont\ignorespaces #2}\unskip}%
\@tempdimb=-\subfloatcapmargin
\multiply\@tempdimb\tw@
\advance\@tempdimb\@tempdima
@@ -19779,6 +20110,8 @@
%
% \begin{macro}{\memsubfig@caption}
% This is a copy of \cs{subfig@caption}.
+% \changes{v3.6k}{2011/07/21}{Added a \cs{unskip} to remove a space if
+% the text is empty}
% \begin{macrocode}
\newcommand{\memsubfig@caption}[2]{%
\if@hangsubcap
@@ -19786,10 +20119,10 @@
\addtolength{\@tempdimb}{-\wd\@tempboxa}%
\usebox{\@tempboxa}%
\memsubfig@captionpar{\@tempdimb}{%
- {\@subcapfont\ignorespaces #2}}%
+ {\@subcapfont\ignorespaces #2}\unskip}%
\else
\memsubfig@captionpar{\@tempdimb}{{\@subcaplabelfont #1}%
- {\@subcapfont\ignorespaces #2}}%
+ {\@subcapfont\ignorespaces #2}\unskip}%
\fi}
% \end{macrocode}
@@ -20219,6 +20552,11 @@
\refstepcounter\@captype
\m@mscaplabel
% \end{macrocode}
+% \changes{v3.6k}{2012/08/19}{We need to move \cs{m@mscapcheckside}
+% here or the \cs{sidecapstyle} inside the box, will never work correctly.}
+% \begin{macrocode}
+ \m@mscapcheckside %<--- added 2012/08/19
+% \end{macrocode}
% Set the caption inside a minipage, saving it in box \cs{m@mscap@capbox}.
% \begin{macrocode}
\begin{lrbox}{\m@mscap@capbox}%
@@ -20244,8 +20582,10 @@
% Set the float (from box \cs{m@mscap@fbox}) then the caption (from
% box \cs{m@mscap@capbox}) kerning it to the left or right as
% appropriate.
+% \changes{v3.6k}{2012/08/19}{Moved \cs{m@mscapcheckside} into
+% \cs{endsidecaption}, otherwise \cs{sidecapstyle} never see the side check}
% \begin{macrocode}
- \usebox{\m@mscap@fbox}\m@mscapcheckside
+ \usebox{\m@mscap@fbox}%\m@mscapcheckside
\ifscapmargleft%
\rlap{\kern-\m@mscaplkern
\raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}%
@@ -20532,8 +20872,44 @@
% \end{macrocode}
% \end{macro}
%
-%
-%
+% \changes{v3.6k}{2013/015/13}{Added \Lpack{longtable} caption
+% support}
+%
+% \subsubsection{Handling \Lpack{longtable} captions}
+%
+% In \Lpack{longtable} the caption ends up as a special row in the
+% table. In order to use our caption formatting we need to redefine
+% \cs{LT@makecaption} to use our formatting macro plus
+% \cs{belowcaptionskip}. It needs to be
+% done after \Lpack{longtable} is loaded, and \emph{not} if the
+% \Lpack{ltcaption} package is loaded. The later is used by the
+% \Lpack{caption} package to aid caption formatting i
+% \Lpack{longtable}. Special thanks to Axel Sommerfelt.
+% \begin{macro}{\LT@makecaption}
+% \begin{macrocode}
+\AtBeginDocument{
+ \@ifpackageloaded{longtable}{
+ \@ifpackageloaded{ltcaption}{}{%
+ \def\LT@makecaption#1#2#3{%
+ \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
+ \let\@memtempa\relax%
+ % starred form -> #1 = \@gobble
+ \ifx#1\@gobble%
+ \let\@contnfont\@empty%
+ \let\@contdelim\@empty%
+ \@@makecaption{}{#3}%
+ \else%
+ \@@makecaption{#2}{#3}%
+ \fi%
+ \endgraf\vskip\belowcaptionskip}%
+ \hss}}}
+ }
+ }{}
+}
+% \end{macrocode}
+% At a later point, we will supplement with a \cs{legend} for
+% \Lpack{longtable} as well.
+% \end{macro}
%
% \section{Epigraphs}
%
@@ -21768,6 +22144,33 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\mem@cft@hb@xt@}
+% \begin{macro}{\numberlinebox}
+% \begin{macro}{\partnumberlinebox}
+% \begin{macro}{\chapternumberlinebox}
+% \begin{macro}{\booknumberlinebox}
+% \changes{v3.6k}{2012/07/22}{Added four \cs{Xnumberlinebox} macros}
+% Each of the four \cs{Xnumberline} macros (part, chapter, book and
+% regular) typeset their contents inside a box of a certain width. In
+% order to make this a little more flexible we provide a default box
+% macro. Note that the box left aligned by default. The default
+% \cs{Xnumberlinebox} macros are then let equal to this default.
+% \begin{macrocode}
+\newcommand\mem@cft@hb@xt@[2]{\hb@xt@#1{#2\hfil}}
+\let\numberlinebox\mem@cft@hb@xt@
+\let\partnumberlinebox\mem@cft@hb@xt@
+\let\chapternumberlinebox\mem@cft@hb@xt@
+\let\booknumberlinebox\mem@cft@hb@xt@
+
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
% \begin{macro}{\numberline}
% \begin{macro}{\numberlinehook}
% The purpose of the \cs{numberline}\marg{secnum} command is to typeset
@@ -21778,12 +22181,17 @@
% definition).
% \changes{v1.61803398d}{2010/02/13}{added \cs{numberlinehook}}
% We also add a hook, that initially does nothing, but
-% might be redefined to record say withs of \meta{secnum}s.
+% might be redefined to record say withs of \meta{secnum}s. In order
+% to tell the owner of the \cs{numberline}'s apart, check the value of
+% \cs{cftwhatismyname}.
+% \changes{v3.6k}{2012/07/22}{Factored out the box part into a
+% separate macro}
% \begin{macrocode}
\newcommand*\numberlinehook[1]{}
\renewcommand*{\numberline}[1]{%
\numberlinehook{#1}%
- \hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
+ %\hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
+ \numberlinebox\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum}\@cftasnumb}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -21895,8 +22303,11 @@
% is in \cs{@tempdima}, and that the three macros \cs{@cftbsnum},
% \cs{@cftaqsnum}, and \cs{@cftasnumb} are defined. We set all these to
% the values for this entry.
+% \changes{v3.6k}{2012/07/30}{Added brace pair around
+% \cs{nameuse\{cft#2name\}}, then
+% \cs{cftXfont} can end with say \cs{MakeUppercase}}
% \begin{macrocode}
- \settowidth{\@tempdima}{\@nameuse{cft#2font}\@nameuse{cft#2name}}%
+ \settowidth{\@tempdima}{\@nameuse{cft#2font}{\@nameuse{cft#2name}}}%
\addtolength{\@tempdima}{\@nameuse{cft#2numwidth}}%
\expandafter\let\expandafter\@cftbsnum\csname cft#2presnum\endcsname
\expandafter\let\expandafter\@cftasnum\csname cft#2aftersnum\endcsname
@@ -21911,8 +22322,10 @@
\advance\memRTLleftskip\@tempdima \null\nobreak\hskip -\memRTLleftskip
% \end{macrocode}
% Print the (number and) title, prohibiting any breaking.
+% \changes{v3.6k}{2012/07/29}{Added brace pair around \#\#1, then
+% \cs{cftXfont} can end with say \cs{MakeUppercase}}
% \begin{macrocode}
- {\@nameuse{cft#2font}##1}\nobreak
+ {\@nameuse{cft#2font}{##1}}\nobreak
% \end{macrocode}
% Print the leader and the page number, and then close the group.
% \begin{macrocode}
@@ -22068,6 +22481,7 @@
% (per Lars Henrik Gam Madsen mempatch v5.1)}
% \changes{v1.61803398}{2009/07/18}{Added bidi support to \cs{l@book}}
% \changes{v1.61803398d}{2010/02/13}{added hook into the book numberline}
+% \changes{v3.6k}{2012/07/22}{Factored the general box out of \cs{booknumberline}}
% \begin{macrocode}
\newcommand*{\cftbookbreak}{\addpenalty{-\@highpenalty}%
\addvspace{\cftbeforebookskip}}
@@ -22091,7 +22505,11 @@
\let\@cftasnumb \cftbookaftersnumb
%%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
\advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip
- {\cftbookfont #1}%
+% \end{macrocode}
+% \changes{v3.6k}{2012/07/29}{Added brace pair around \#1, then
+% \cs{cftbookfont} can end with say \cs{MakeUppercase}}
+% \begin{macrocode}
+ {\cftbookfont {#1}}%
\cftbookfillnum{#2}}
\nobreak
\global\@nobreaktrue
@@ -22101,8 +22519,10 @@
\newcommand*\booknumberlinehook[1]{}
\newcommand{\booknumberline}[1]{%
\booknumberlinehook{#1}%
- \hb@xt@\@tempdima{%
- \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ % \hb@xt@\@tempdima{%
+ % \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ \booknumberlinebox\@tempdima{%
+ \cftbookname\@cftbsnum #1\@cftasnum}\@cftasnumb}%%\space}
% \end{macrocode}
% \end{macro}
@@ -22209,7 +22629,11 @@
\let\@cftasnumb \cftpartaftersnumb
%%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
\advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip
- {\cftpartfont #1}%
+% \end{macrocode}
+% \changes{v3.6k}{2012/07/29}{Added brace pair around \#1, then
+% \cs{cftpartkfont} can end with say \cs{MakeUppercase}}
+% \begin{macrocode}
+ {\cftpartfont {#1}}%
\cftpartfillnum{#2}}
\nobreak
\global\@nobreaktrue
@@ -22238,12 +22662,16 @@
% \changes{v1.61803}{2008/01/30}{Added a space after the number in
% \cs{partnumberline} (mempatch v4.4)}
% \changes{v1.61803398d}{2010/02/13}{added hook into part numberline}
+% \changes{v3.6k}{2012/07/22}{Factored out the box command}
% \begin{macrocode}
\newcommand*\partnumberlinehook[1]{}
\newcommand{\partnumberline}[1]{%
\partnumberlinehook{#1}%
- \hb@xt@\@tempdima{%
- \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ % \hb@xt@\@tempdima{%
+ % \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ \partnumberlinebox\@tempdima{%
+ \cftpartname\@cftbsnum #1\@cftasnum}\@cftasnumb}%%\space}
+
% \end{macrocode}
% \end{macro}
@@ -22351,7 +22779,11 @@
\addtolength{\@tempdima}{\cftchapternumwidth}%
%%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
\advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip
- {\cftchapterfont #1}\nobreak
+% \end{macrocode}
+% \changes{v3.6k}{2012/07/29}{Added brace pair around \#1, then
+% \cs{cftchapterfont} can end with say \cs{MakeUppercase}}
+% \begin{macrocode}
+ {\cftchapterfont {#1}}\nobreak
\cftchapterfillnum{#2}}
\fi}
@@ -22415,11 +22847,14 @@
% \changes{v1.3}{2002/11/14}{Added \cs{chapternumberline}}
% \changes{v1.618}{2005/09/03}{Added \cs{@chapapp@head} to \cs{chapternumberline} (mempatch v3.12)}
% \changes{v1.61803398d}{2010/02/13}{added hook into chapter numberline}
+% changes{v3.6k}{2012/07/22}{Factored out the box command}
% \begin{macrocode}
\newcommand*\chapternumberlinehook[1]{}
\newcommand{\chapternumberline}[1]{%
\chapternumberlinehook{#1}%
- \hb@xt@\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum\hfil}%
+ % \hb@xt@\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum\hfil}%
+ % \@cftasnumb}
+ \chapternumberlinebox\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum}%
\@cftasnumb}
% \end{macrocode}
@@ -22652,7 +23087,14 @@
\newcommand{\prechapterprecis}{%
\vspace*{\prechapterprecisshift}%
\begin{quote}\precisfont}
-\newcommand*{\postchapterprecis}{\end{quote}}
+% \end{macrocode}
+% \changes{v3.6k}{2013/04/24}{We are missing the after heading
+% stuff. Otherwise text will indent after \cs{chapterprecis}}
+% \begin{macrocode}
+\newcommand*{\postchapterprecis}{%
+ \end{quote}%
+ \par\m@mindentafterchapter%
+ \@afterheading}
% \end{macrocode}
% \end{macro}
@@ -24086,7 +24528,7 @@
\@namedef{memglsact#1}{@}% actual
\@namedef{memglsnx#1}{}% no ref
\@namedef{memglsn#1}{\thepage}% num by page
- \@namedef{memglsnf#1}{|memjustarg}% no special number format
+ \@namedef{memglsnf#1}{|memjustarg}% no special number format | emacs
\if@filesw \expandafter\newwrite\csname #1memglofile\endcsname
\expandafter\immediate\openout \csname #1memglofile\endcsname #1.glo\relax
\typeout{Writing glossary file #1.glo }%
@@ -24566,6 +25008,19 @@
\setmpbools}
% \end{macrocode}
+% \changes{v3.6k}{2013/05/14}{Added default \cs{m@mmpar@margin}}
+% \begin{macrocode}
+\if@twocolumn\else
+ \if@twoside
+ \def\m@mmpar@margin{2}
+ \else
+ \def\m@mmpar@margin{1}
+ \fi
+\fi
+
+% \end{macrocode}
+%
+%
% \end{macro}
% \end{macro}
%
@@ -25394,9 +25849,12 @@
% To prevent the rule from colliding with the footnote we first add
% a little negative vertical skip, then we put the rule and make
% sure we end up at the same point where we begun this operation.
+% \changes{v3.6k}{2013/05/08}{Added \cs{normalcolor}, this seems to
+% fix a color leak into paragraph footnotes.}
% \begin{macrocode}
\renewcommand{\footnoterule}{%
\kern-3\p@
+ \normalcolor% added 2013/05/08
\hrule width .4\columnwidth
\kern 2.6\p@}
% \end{macrocode}
@@ -25526,19 +25984,21 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\mem@multiple@marker}
-% \changes{v3.6h}{2010/12/07}{We copy the code above into a utility
-% macro to be used else where} This code is rather handy, so we
-% make an internal macro to reuse it later (for page notes).
+% \begin{macro}{\mem@pn@multiple@marker}
+% This controls the multiple marker handling for successive page
+% notes, i.e., adding a comma between them.
+% \changes{v3.6k}{2013/05/16}{Added hooks, they are not intended for users}
% \begin{macrocode}
-\newcommand{\mem@multiple@marker}[1]{%
+\newcommand{\mem@pn@multiple@marker}[1]{%
\leavevmode
\ifhmode
\edef\@x@sf{\the\spacefactor}%
\m@mmf@check
\nobreak
\fi
+ \@nameuse{mem@pnmm@start@hook}%
#1%
+ \@nameuse{mem@pnmm@end@hook}%
\m@mmf@prepare
\ifhmode\spacefactor\@x@sf\fi
\relax}
@@ -25798,9 +26258,12 @@
% To force footnotes to the bottom after a \cs{raggedbottom} use \\
% \verb?\setfootnoterule[\vfill]{3pt}{0.4\columnwidth}{\normalrulethickness}?
% \changes{v1.61803}{2008/01/30}{Added \cs{setfootnoterule} (memptatch v4.6)}
+% \changes{v3.6k}{2013/05/08}{Added \cs{normalcolor}, this seems to
+% fix a color leak into paragraph footnotes.}
% \begin{macrocode}
\newcommand*{\setfootnoterule}[4][]{%
\def\footnoterule{\kern -#2\relax #1\relax
+ \normalcolor% added 2013/05/08
\hrule width #3\relax
\kern #2\kern-#4}}
\setfootnoterule{3pt}{0.4\columnwidth}{\normalrulethickness}
@@ -28088,9 +28551,12 @@
% Make sure that this has a useful definition.
% \changes{v3.6h}{2011/01/19}{Made \cs{pagenote} robust}
% \changes{v3.6j}{2011/03/01}{Removed \cs{@sanitize}}
+% \changes{v3.6k}{2011/03/08}{Actually need \cs{@sanitize} for the
+% optional argument. But we need to remove spaces from this}
% \begin{macrocode}
\DeclareRobustCommand\pagenote{\@bsphack\begingroup
- % \@sanitize
+ \rem@special{\ }% <--- added
+ \@sanitize
\m@m@wrpnote}%
% \end{macrocode}
% \end{macro}
@@ -28101,9 +28567,12 @@
% internally be used when the user ask for foot notes to be turned
% into page notes.
% \changes{v3.6j}{2011/03/01}{Removed \cs{@sanitize}}
+% \changes{v3.6k}{2011/03/08}{Actually need \cs{@sanitize} for the
+% optional argument. But we need to remove spaces from this}
% \begin{macrocode}
\DeclareRobustCommand\mem@footto@pagenote{\@bsphack\begingroup
- % \@sanitize
+ \rem@special{\ }% <--- added
+ \@sanitize
\def\mem@pn@step{01}%
\m@m@wrpnote}%
% \end{macrocode}
@@ -28133,15 +28602,23 @@
% \end{macro}
%
% \begin{macro}{\m@m@pnwrite}
+% \begin{macro}{\m@m@pnwrited}
% In the old implementation we used \cs{immediate@protected@write}
% unless the user asked for page numbers in the notes, the new
% implementation use the same writing method for all cases, for easy
-% of notation we collect it in a macro.
+% of notation we collect it in a macro. Seems UTF8 is an interesting
+% beast, \cs{immediate@protected@write} can write it to disk, but
+% \cs{m@m@pnwrite} cannot. To get past this we also include a version
+% that has an embedded \cs{detokenize} (thanks to Heiko Oberdiek for
+% that hint).
+% \changes{v3.6k}{2011/04/06}{Added the version with \cs{detokenize}}
% \begin{macrocode}
\newcommand{\m@m@pnwrite}[3]{\immediate\write#1{#3}}
+\newcommand{\m@m@pnwrited}[3]{\immediate\write#1{\detokenize{#3}}}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\pnchap}
% \begin{macro}{\pnschap}
@@ -28165,7 +28642,7 @@
\newcommand\mem@pn@step{00} % i.e. true
\newlength\mem@pn@lastkern
% \end{macrocode}
-%
+%
% \end{macro}
% \end{macro}
% \end{macro}
@@ -28176,10 +28653,34 @@
% note counter and calls \cs{notenumintext} to handle its appearance in
% the body text. We write an entry of the following design
% \begin{verbatim}
-% \startnoteentry{notenumber}{id}{auto label key}
+% \startnoteentry{notenumber}{id}{auto label key}{hyperref}
% macro:->text
% \endnoteentry
% \end{verbatim}
+%
+% \begin{macro}{\m@m@pnwrite@fourtharg}
+% \begin{macro}{\m@m@pnwrite@fourtharg@hyperref}
+% In order for us to add \Lpack{hyperref} support we will need to
+% record the hyperref anchor label into the page note data. We do this
+% though \verb|\m@m@pnwrite@fourtharg|, which by default just adds
+% \verb|{}| to the page note data. \Lpack{memhfixc} makes it point
+% toward \verb|\m@m@pnwrite@fourtharg@hyperref| instead. We make sure
+% to pass it the optional argument from \verb?\pagenote?, if this is
+% precent a hyper anchor is not passed on.
+% \changes{v3.6k}{2013/05/17}{Macro needs to test an argument}
+% \begin{macrocode}
+\newcommand\m@m@pnwrite@fourtharg[1]{\m@m@pnwrited\@notefile{}{{}}}
+\newcommand\m@m@pnwrite@fourtharg@hyperref[1]{%
+ \@ifmtarg{#1}{%
+ \m@m@pnwrite\@notefile{}{{\Hy@pagenote@currentHref}}%
+ }{%
+ \m@m@pnwrited\@notefile{}{{}}%
+ }}
+
+% \end{macrocode}
+% \end{macro}
+% % \end{macro}
+%
% \changes{v1.61803}{2008/05/25}{Made \cs{m@m@wrpnote} match the effect
% described in memman regarding the optional argument.}
% \changes{v3.6h}{2011/01/19}{Changed the internal implementation}
@@ -28215,7 +28716,7 @@
\ifdim\mem@pn@lastkern=\multiplefootnotemarker%
\m@mmf@prepare% rerun
\fi%
- \mem@multiple@marker{\notenumintext{\thepagenote}}%
+ \mem@pn@multiple@marker{\notenumintext{\thepagenote}}%
}{}%
\fi%
% \end{macrocode}
@@ -28223,42 +28724,52 @@
% in the file.
% \changes{v3.6h}{2011/01/25}{Added \cs{pagenotesubheadstarred}}
% \begin{macrocode}
- \ifm@mpn@new@chap
- \global\m@mpn@new@chapfalse
+ \ifm@mpn@new@chap%
+ \global\m@mpn@new@chapfalse%
\addtonotes{\string\pagenotesubhead{\@chapapp}{\thechapter}{\pnchap}}%
- \fi
- \ifm@mpn@new@schap
- \global\m@mpn@new@schapfalse
+ \fi%
+ \ifm@mpn@new@schap%
+ \global\m@mpn@new@schapfalse%
\addtonotes{\string\pagenotesubheadstarred{\@chapapp}{}{\pnschap}}%
- \fi
+ \fi%
% \end{macrocode}
% Next we write to the notes file. Instead of writing everything as a
% macro with arguments, we will use three writes. One to start a new
% entry with a few (non-text) arguments, then the text itself, and
-% finally an end of entry marker macro.
+% finally an end of entry marker macro. There is a slight complication
+% here. The \verb|#1| may be UTF8 so it has to be written unexpanded
+% to disk, but macros like \verb|\thepagenote| need to be
+% expanded. Luckily \TeX\ eats up spaces when reading arguments, so we
+% simply writte several lines using two different writing methods.
+% \changes{v3.6k}{2011/04/06}{Rewritten to use a different writing method}
% \begin{macrocode}
\m@m@pnwrite\@notefile{}%
- {\string\startnoteentry{\thepagenote}{#1}%
- {pagenote\thepagenoteshadow-\thesheetsequence}}%
+ {\string\startnoteentry{\thepagenote}}%
+ \m@m@pnwrited\@notefile{}{{#1}}%
+ \m@m@pnwrite\@notefile{}%
+ {{pagenote\thepagenoteshadow-\thesheetsequence}}%
% \end{macrocode}
-% Store the text in a temp macro, change the endline char to force a
-% line break at any space in the text, this also helps with line
-% length limits on inputs. Getting the newline stuff to work require
+% Add the fourth argument.
+% \changes{v3.6k}{2013/05/16}{Added fourth argument for the note data}
+% \changes{v3.6k}{2013/05/17}{Fourth arg, should depend on \#1}
+% \begin{macrocode}
+ \m@m@pnwrite@fourtharg{#1}%
+% \end{macrocode}
+% Getting the newline stuff to work require
% \verb|\immediate\write| which we defined earlier. We then write the
-% text `verbatimly' using the trick that \Lpack{endnotes} makes use
-% of: \cs{meaning}, works quite nicely.
+% text `verbatimly' using the detokenized macro.
+% \changes{v3.6k}{2011/04/06}{No longer any need for the \cs{meaning} construction.}
% \begin{macrocode}
- \def\next{#2}%
\begingroup%
\newlinechar='40%
- \m@m@pnwrite\@notefile{}{\meaning\next}%
+ \m@m@pnwrited\@notefile{}{#2}%
\endgroup%
% \end{macrocode}
% Remember to also write a marker that ends the entry.
% \begin{macrocode}
\m@m@pnwrite\@notefile{}%
{\string\endnoteentry}%
- \endgroup
+ \endgroup%
\@esphack}
% \end{macrocode}
@@ -28329,9 +28840,15 @@
% \begin{macrocode}
\newcommand*{\foottopagenote}{%
\let\memsavefootnote\footnote
- % now also \footnotemark work
+% \end{macrocode}
+% \changes{v3.6k}{2013/05/02}{Remember to remove footnote counter from
+% chapter reset}
+% Since we alias the footnote counter to the pagenote counter, we need
+% to rewmove the footnote counter from the chapter reset, otherwise
+% \cs{continuousnotenums} will be wrong.
+% \begin{macrocode}
+ \counterwithout{footnote}{chapter}
\letcountercounter{footnote}{pagenote}
- % and this takes care of \footnotetext
\renewcommand\footnotetext[2][]{\mem@footto@pagenote{##2}}
\renewcommand{\footnote}[2][]{\pagenote{##2}}
}
@@ -28492,55 +29009,59 @@
%
% \begin{macro}{\startnoteentrystart}
% \begin{macro}{\endnoteentryend}
-% Two utility macros making it easier for the user to change the order.
-% \begin{macrocode}
-\newcommand\startnoteentrystart[3]{%
+% \begin{macro}{\pagenoteanchor}
+% \begin{macro}{\pagenotebyanchor}
+% Utility macros to handle page note formating and hyperlinks.
+% \changes{v3.6k}{2013/05/16}{altered to use four arguments instead of three}
+% \changes{v3.6k}{2013/05/16}{Added page note anchor}
+% \changes{v3.6k}{2013/05/17}{Forgot about labels in the note text.}
+% \begin{macrocode}
+\newcommand\startnoteentrystart[4]{%
\prenoteinnotes%
\noteidinnotes{#1}{#2}%
+ \@ifmtarg{#2}{\def\@currentlabel{#1}}{}%
+ \pagenoteanchor{#4}%
\pageinnotes{#3}%
\prenotetext%
}
\def\endnoteentryend{\postnotetext\postnoteinnotes}
+\let\pagenoteanchor\@gobble
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\mem@make@gt@safe}
-% Macro copied from \Lpack{endnotes}, in the notes file, the text
-% begins with \verb|macro:->|, but some languages make \verb|>|
-% active. For more information see the \Lpack{endnotes}
-% implementation.
+% The page note hyper anchor should of course only be added when there
+% is an anchor.
+% \changes{v3.6k}{2013/05/17}{Forgot to test the argument}
% \begin{macrocode}
-\newcommand\mem@make@gt@safe{%
- \edef\@tempa{`\string >}%
- \ifnum\catcode\@tempa=12%
- \let\@ResetGT\relax%
- \else%
- \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
- \@makeother\>%
- \fi%
-}
+\newcommand\pagenotehyperanchor[1]{%
+ \expandafter\@ifmtarg\expandafter{#1}{}{%
+ \Hy@raisedlink{\hyper@@anchor{#1}{\relax}}}}%
+
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\mem@printpagenotes}
% \begin{macro}{\startnoteentry}
% \begin{macro}{\ednoteentry}
% The internal macro for printing the list of page notes. The two
% macros \cs{startnoteentry} and \cs{endnoteentry} are also defined here.
+% \changes{v3.6k}{2011/03/09}{Start and end entry better be long}
+% \changes{v3.6k}{2011/04/06}{We no longer use \cs{meaning} when
+% writing the data to disk, so no need to remove \texttt{>} any
+% more. Also removed the safe GT stuff}
% \begin{macrocode}
+% \changes{v3.6k}{2013/05/16}{\cs{startnoteentry} should expect four args}
\newcommand\mem@printpagenotes[1]{%
\ifmempagenotes
\notedivision
\IfFileExists{\jobname.ent}{%
\begingroup
- \mem@make@gt@safe%
- \def\startnoteentry####1####2####3####4>{%
+ \long\def\startnoteentry####1####2####3####4{%
\begingroup
- \@ResetGT
- \startnoteentrystart{####1}{####2}{####3}%
+ \startnoteentrystart{####1}{####2}{####3}{####4}%
}
- \def\endnoteentry{\endnoteentryend\endgroup}
+ \long\def\endnoteentry{\endnoteentryend\endgroup}
\immediate\closeout\@notefile
\input{\jobname.ent}%
\if#1\immediate\openout\@notefile=\jobname.ent\fi%
@@ -34159,6 +34680,185 @@
% \end{macrocode}
%
+% \subsection{Text case}
+% \changes{v3.6k}{2012/09/13}{Included a copy of the \texttt{textcase}
+% package.}
+%
+% Since, say, \cs{MakeUppercase} does too much, i.e.\ also upper case
+% math and arguments to, say, \cs{ref}, we provide a version that does
+% not. David Carlisle wrote the simple package ---
+% \Lpack{textcase}~\cite{TEXTCASE} which we simply present as a carbon
+% copy including Davids explanations. We do \emph{not} mark this
+% package as have been emulated. Loading \texttt{textcase} just
+% overwrites the macros if they exist.
+%
+% \MakeShortVerb{\|}
+% \begin{macrocode}
+%%%% Nearly a carbon copy from textcase.dtx by David Carlisle
+% \end{macrocode}
+% \begin{macro}{\@uclcnotmath}
+% This is the main macro from \texttt{textcase}. It is basically
+% a copy of |\MakeUppercase| and |\MakeLowercase|
+% from the \LaTeX\ kernel, modified slightly so that they
+% can share code (that modification could be done to the
+% standard versions as well) and then further changed to
+% skip certain features like math mode and |\label| arguments.
+%
+% The arguments are:\\
+% |#1|: Extra commands to apply for case changing.
+% Used to locally redefine |\i| and |\j| for uppercasing.\\
+% |#2|: Either |##1##2| or |##2##1| to control the order
+% in which |\let| is applied to the pairs of control
+% sequences in |\@uclclist|.\\
+% |#3|: |\uppercase| or |\lowercase|.\\
+% |#4|: The text to be upper (or lower) cased.
+% \begin{macrocode}
+\def\@uclcnotmath#1#2#3#4{\begingroup
+% \end{macrocode}
+% Run extra commands (currently just to redefine |\i| and |\j|).
+% \begin{macrocode}
+ #1%
+% \end{macrocode}
+%
+% Locally set |\( \)| to be just |$ $|, so that the math skipping
+% code can be simplified, just to look for |$|.
+% \begin{macrocode}
+ \def\({$}\let\)\(% $ for emacs :-)
+% \end{macrocode}
+%
+% Set up the `non-math' things that also have to be skipped.
+% \begin{macrocode}
+ \def\NoCaseChange##1{\noexpand\NoCaseChange{\noexpand##1}}%
+ \@nonchangecase\label
+ \@nonchangecase\ref
+ \@nonchangecase\ensuremath
+% \end{macrocode}
+%
+% |\cite| a bit trickier, as we want to uppercase any optional argument.
+% This will fail if the optional argument contains a brace group, but
+% should catch most cases.
+%
+% |text \cite[page 1]{foo} more text| ends up as
+%\begin{verbatim}
+% \uppercase{text \toks@{\cite[page1]}%
+% \the\toks@{foo}%
+% \uppercase{ more text}
+%\end{verbatim}
+% \begin{macrocode}
+ \def\cite##1##{\toks@{\noexpand\cite##1}\@citex}%
+ \def\@citex##1{\NoCaseChange{\the\toks@{##1}}}%
+% \end{macrocode}
+% (|\@citex| is a scratch macro here, not a redefinition of the existing
+% |\@citex|.)
+%
+% The following is essentially taken from |\MakeUppercase|.
+% Recursively execute |\reserved@a| to |\let| the pairs in |\@uclclist|.
+% The strange construction with |\@gobble| at the end just gobbles the
+% final recursive call.
+%
+% Incidentally, packages should not use the |\reserved@|\ldots\ scratch
+% macros, which are `reserved' for use within the \LaTeX\ kernel, but
+% (a) this code is essentially a copy from the kernel, and
+% (b) I'm allowed to break the rules, so there.
+% \begin{macrocode}
+ \def\reserved@a##1##2{\let#2\reserved@a}%
+ \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
+% \end{macrocode}
+%
+% Expand everything first so that the `skipping' code can see what to
+% skip and so that tokens are revealed to |\uppercase|.
+% This makes the argument `moving'.
+% The |$\valign$| is just a fake math expression used to terminate
+% the parsing done by |\@skipmath|.
+% \begin{macrocode}
+ \protected@edef\reserved@a{\endgroup
+ \noexpand\@skipmath#3#4$\valign$}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \reserved@a}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@nonchangecase}
+% \begin{macrocode}
+\def\@nonchangecase#1{\def#1##1{\NoCaseChange{#1{##1}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NoCaseChange}
+% For hiding arbitrary text from |\uppercase|. This innocuous
+% definition is used for any occurrence of |\NoCaseChange|
+% in text that is not passed to |\MakeTextUppercase|. For example a
+% section heading may be uppercased, but the toc entry may not.
+% It is also used for nested definitions of |\cite| etc, where the
+% |\NoCaseChange| is inserted by expansion, but not removed as it is
+% hidden by the brace group.
+% \begin{macrocode}
+\let\NoCaseChange\@firstofone
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\@skipmath}
+% |#1|: operation |\uppercase| / |\lowercase|\\
+% |#2|: text up to first (next) |$|\\
+% |#3|: first math mode material (or |\valign| sentinel)
+% \begin{macrocode}
+\def\@skipmath#1#2$#3${%
+ \@skip@nonchangecase#1#2\NoCaseChange\valign
+ \ifx\valign#3%
+ \else
+ $#3$%
+ \expandafter\@skipmath\expandafter#1%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\@skip@nonchangecase}
+% |#1|: |\uppercase| or |\lowercase|\\
+% |#2|: Text up to the first command (such as |\cite|) made `safe'.
+% or the first use of |\NoCaseChange|.
+% \begin{macrocode}
+\def\@skip@nonchangecase#1#2\NoCaseChange#3{%
+ #1{#2}%
+ \ifx\valign#3%
+ \else
+ #3%
+ \expandafter\@skip@nonchangecase\expandafter#1%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MakeTextUppercase}
+% Put it all together. Arrange for \i\ and \j\ to uppercase, and
+% to read the pairs in the ucase list `forwards'.
+% \begin{macrocode}
+\DeclareRobustCommand\MakeTextUppercase{%
+ \@uclcnotmath{\def\i{I}\def\j{J}}{##1##2}\uppercase}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\protected@edef\MakeTextUppercase#1{\MakeTextUppercase{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MakeTextLowercase}
+% Use |\lowercase| and read the pairs in the uppercase list `backwards'.
+% \begin{macrocode}
+\DeclareRobustCommand\MakeTextLowercase{%
+ \@uclcnotmath{}{##2##1}\lowercase}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\protected@edef\MakeTextLowercase#1{\MakeTextLowercase{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%%%% End copy from textcase.dtx
+% \end{macrocode}
+% \DeleteShortVerb{\|}
+%
+%
% \section{Initialization} \label{sec:init}
%
% \subsection{Words and phrases}
@@ -34561,7 +35261,12 @@
% \begin{macrocode}
\EmulatedPackage{abstract}[2008/07/23]
\EmulatedPackage{appendix}[2008/07/23]
-\EmulatedPackage{array}[2008/07/23]
+% \end{macrocode}
+% \changes{v3.6k}{2012/07/19}{Changed the enumated date for the
+% \Lpack{array} package. Apparently the only thing changed between
+% v2.4b (2005) and c (2008) are some copyright years.}
+% \begin{macrocode}
+\EmulatedPackage{array}[2008/09/09]
\EmulatedPackage{booktabs}[2008/07/23]
\EmulatedPackage{ccaption}[2008/07/23]
\EmulatedPackage{changepage}[2008/07/23]
@@ -34604,66 +35309,87 @@
%
% \subsection{Interaction with the \Lpack{caption} package}
%
-% Although the author of the \Lpack{caption} package has, over the years,
-% made it work
-% with many other classes he has not extended it to either recognise
-% or work with the memoir
-% class. Some authors want to use the \Lpack{caption} package, hence\ldots
+% Although the author of the \Lpack{caption} package has, over the
+% years, made it work with many other classes he has not extended it
+% to either recognise or work with the memoir class. Some authors want
+% to use the \Lpack{caption} package, hence\ldots
%
-% Kill changes to the caption macros when the \Lpack{caption} package is used.
-% The \Lpack{caption} package checks the definitions of the \cs{@makecaption},
-% \cs{caption} and \cs{@caption} macros. These need to be identical to the
-% definitions in the standard classes for the package to disbelieve that
-% the \Lpack{memoir} class is being used.
+% The easiest manner in which to make the \Lpack{caption} package to
+% work with the class, is to restore the kernel defaults for the main
+% captioning macros.
+%
+% Kill changes to the caption macros when the \Lpack{caption} package
+% is used. The \Lpack{caption} package checks the definitions of the
+% \cs{@makecaption}, \cs{caption} and \cs{@caption} macros. These need
+% to be identical to the definitions in the standard classes for the
+% package to disbelieve that the \Lpack{memoir} class is being used.
%
% \begin{macro}{\@makecaption}
% \begin{macro}{\caption}
% \begin{macro}{\@caption}
% \changes{v1.61803}{2008/01/30}{Killed memoir's captioning when the caption
% package is used (mempatch v4.9).}
+% \changes{v3.6k}{2012/05/04}{Changed the warning text to be more informative.}
% \begin{macrocode}
%%% revert changes to captioning macros if the caption package is used.
\AtBeginPackage{caption}{
-\ClassWarningNoLine{memoir}{%
- You are using the caption package with the memoir \MessageBreak
- class. This may cause unexpected or inconsistent \MessageBreak
- results if you use any of memoir's captioning facilities}
-
-\long\def\@makecaption##1##2{%
- \vskip\abovecaptionskip
- \sbox\@tempboxa{##1: ##2}%
- \ifdim \wd\@tempboxa >\hsize
- ##1: ##2\par
- \else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}
+ \ClassWarningNoLine{memoir}{%
+ You are using the caption package with the memoir class.
+ To prepare we will now reset all captioning macros and
+ configurations to kernel defaults, and then let the
+ caption package take over. Please remember to use the
+ caption package interfaces in order to configure
+ your captions.
+ }
-\def\caption{%
- \ifx\@captype\@undefined
- \@latex@error{\noexpand\caption outside float}\@ehd
- \expandafter\@gobble
- \else
- \refstepcounter\@captype
- \expandafter\@firstofone
- \fi
- {\@dblarg{\@caption\@captype}}%
-}
+ \long\def\@makecaption##1##2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{##1: ##2}%
+ \ifdim \wd\@tempboxa >\hsize
+ ##1: ##2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
-\long\def\@caption##1[##2]##3{%
- \par
- \addcontentsline{\csname ext@##1\endcsname}{##1}%
- {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
\fi
- \normalsize
- \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
- \endgroup}
-}
+ {\@dblarg{\@caption\@captype}}%
+ }
+
+ \long\def\@caption##1[##2]##3{%
+ \par
+ \addcontentsline{\csname ext@##1\endcsname}{##1}%
+ {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
+ \endgroup}
+
+% \end{macrocode}
+% By request of the \Lpack{caption} package author (Axel Sommerfeldt),
+% we also restore the caption skips to the kernel defaults. The class
+% sets both to be 0.5\cs{onelineskip}, which may cause confusion when
+% using certain features in the \Lpack{caption} package.
+% \changes{v3.6k}{2012/05/04}{Added \cs{captionXskip} reset to default
+% values.}
+% \begin{macrocode}
+
+ \setlength\abovecaptionskip{10\p@}
+ \setlength\belowcaptionskip{0\p@}
+
+} % end \AtBeginPackage
% \end{macrocode}
% \end{macro}
@@ -34809,10 +35535,17 @@ keyword "\\glossaryentry"
% \bibitem[Car01]{DCOLUMN}
% David Carlisle.
% \newblock \emph{The \Lpack{dcolumn} package}.
-% \newblock May 2001.
+% \newblock May, 2001.
% \newblock (Available from CTAN in
% \texttt{/macros/latex/required/tools})
%
+% \bibitem[Car04]{TEXTCASE}
+% David Carlisle.
+% \newblock \emph{The \Lpack{textcase} package}.
+% \newblock October, 2004.
+% \newblock (Available from CTAN in
+% \texttt{/macros/latex/contrib/textcase})
+%
% \bibitem[Coc02]{SUBFIGURE}
% Steven Douglas Cochran.
% \newblock \emph{The subfigure package}.
diff --git a/Master/texmf-dist/source/latex/memoir/memoir.ins b/Master/texmf-dist/source/latex/memoir/memoir.ins
index 52ffc1fbb83..9cc64652e55 100644
--- a/Master/texmf-dist/source/latex/memoir/memoir.ins
+++ b/Master/texmf-dist/source/latex/memoir/memoir.ins
@@ -1,6 +1,8 @@
%% memoir.ins
%% Author: Peter Wilson (herries dot press at earthlink dot net)
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -11,7 +13,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
+%% This work has the LPPL maintenance status "maintained".
%% (Note: Lars Madsen is gradually taking over maintenance)
%%
%% This work consists of the files listed in the README file.
@@ -28,8 +30,11 @@
Author: Peter Wilson (herries dot press at earthlink dot net)
Herries Press
- Copyright 2001--2009 Peter R. Wilson
+ Copyright 2001--2011 Peter R. Wilson
+ Copyright 2011--2013 Lars Madsen
+ Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3 of this license or (at your option) any
@@ -39,8 +44,7 @@
and version 1.3 or later is part of all distributions of
LaTeX version 2003/06/01 or later.
- This work has the LPPL maintenance status "author-maintained".
- (Note: Lars Madsen is gradually taking over maintenance)
+ This work has the LPPL maintenance status "maintained".
This work consists of the files listed in the README file.
diff --git a/Master/texmf-dist/source/latex/memoir/mempatch.dtx b/Master/texmf-dist/source/latex/memoir/mempatch.dtx
index 8888e87e972..9af83830b3e 100644
--- a/Master/texmf-dist/source/latex/memoir/mempatch.dtx
+++ b/Master/texmf-dist/source/latex/memoir/mempatch.dtx
@@ -2,7 +2,7 @@
%
% mempatch.dtx
% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-% Maintainer: Lars Madsen (daleif+memoir at imf dot au dot dk)
+% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
% Copyright 2001 --- 2010 Peter R. Wilson
%
% This work may be distributed and/or modified under the
@@ -20,7 +20,7 @@
%
%
% \fi
-% \CheckSum{514}
+% \CheckSum{612}
%
% \def\dtxfile{\texttt{mempatch.dtx}}
% \def\fileversion{v1.0} \def\filedate{2003/10/04}
@@ -309,6 +309,7 @@
%% With thanks to Heiko Oberdiek, if you use hyperref dated 2006/11/15
%% or later, memhfixc will be automatically loaded after hyperref.
%%
+%% Version 1.16 2013/05/16
%% Version 1.15 2010/08/17
%% Version 1.14 2010/06/10
%% Version 1.13 2010/04/19
@@ -330,7 +331,7 @@
%
%
% \begin{macrocode}
-\ProvidesPackage{memhfixc}[2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
+\ProvidesPackage{memhfixc}[2013/05/16 v1.16 nameref/hyperref package fixes for memoir class]
% \end{macrocode}
%
% \begin{macro}{\M@hfixcfinish}
@@ -798,6 +799,106 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@footnotemark}
+% \changes{v1.16}{2013/05/08}{Slight change to hyperfootnotes redefinition of \cs{@footnotemark}}
+% When \Lpack{hyperref} is loaded with the \texttt{hyperfootnotes}
+% options, then \cs{@footnotemark} is overwritten, and our added
+% feature which automatically separate multiple footnotes with
+% commas is lost. It is however very easy to resurrect.
+% \begin{macrocode}
+\ifHy@hyperfootnotes
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}%
+ \m@mmf@check% <--- added
+ \nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@footnote@currentHref}%
+ \@makefnmark
+ \hyper@linkend
+ \m@mmf@prepare% <--- added
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }%
+\fi
+
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \changes{v1.16}{2013/05/14}{Added fix for \cs{@starttoc}}
+% \begin{macro}{\@starttoc}
+% In memoir we altered \cs{@starttoc} such that \cs{tableofcontents}
+% could be used multiple times. \Lpack{hyperref} resets this. So here
+% is our reset of that reset.
+% \begin{macrocode}
+\Hy@AtBeginDocument{%
+ \ifx\hyper@last\@undefined
+ \def\@starttoc#1{%
+ \begingroup\makeatletter
+ \IfFileExists{\jobname.#1}{%
+ \Hy@WarningNoLine{%
+ old #1 file detected, not used; run LaTeX again%
+ }%
+ }{}%
+ \if@filesw
+% \end{macrocode}
+% We rewrite this part to match our definition. The rest is a copy
+% from \texttt{hyperref.sty}.
+% \begin{macrocode}
+ \AtEndDocument{%
+ \expandafter\ifx\csname tf@#1\endcsname\relax
+ \expandafter\newwrite\csname tf@#1\endcsname
+ \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
+ \fi
+ }
+ \fi
+ \@nobreakfalse
+ \endgroup
+ }%
+ \fi
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v3.6k}{2013/05/16}{Added hyperref support for page notes}
+% In order to enable hyperlinks for page notes, we need a few extra
+% things. First of all we only enable hyperlinked page noted if hyper
+% footnotes are enabled, seems a good choice.
+% \begin{macrocode}
+\ifHy@hyperfootnotes
+% \end{macrocode}
+% Record the current hyperref anchor in the page note data.
+% \begin{macrocode}
+ \let\m@m@pnwrite@fourtharg\m@m@pnwrite@fourtharg@hyperref
+% \end{macrocode}
+% Make the note typesetter use the anchor data.
+% \begin{macrocode}
+ \let\pagenoteanchor\pagenotehyperanchor
+% \end{macrocode}
+% Fill in two hook responsable for turning the note marker in the text
+% into a hyperlink. The code is more or less copied from
+% \Lpack{hyperref}'s footnote handling.
+% \begin{macrocode}
+ \newcounter{Hpagenote}
+ \@namedef{mem@pnmm@start@hook}{%
+ \stepcounter{Hpagenote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hpagenote}%
+ \global\let\Hy@pagenote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@pagenote@currentHref}%
+ }
+ \@namedef{mem@pnmm@end@hook}{\hyper@linkend}
+\fi
+
+% \end{macrocode}
+%
% The end of the \Lpack{hyperref} related patches.
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/memoir/mempatch.ins b/Master/texmf-dist/source/latex/memoir/mempatch.ins
index 593655ba2b8..36a3aed7d63 100644
--- a/Master/texmf-dist/source/latex/memoir/mempatch.ins
+++ b/Master/texmf-dist/source/latex/memoir/mempatch.ins
@@ -1,6 +1,8 @@
%% mempatch.ins
%% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%% Copyright 2001 --- 2008 Peter R. Wilson
+%% Copyright 2001 --- 2010 Peter R. Wilson
+%% Copyright 2011 --- 2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -11,7 +13,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
@@ -28,8 +30,10 @@
\preamble
Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
- Copyright 2001 --- 2008 Peter R. Wilson
-
+ Copyright 2001 --- 2010 Peter R. Wilson
+ Copyright 2011 --- 2013 Peter R. Wilson
+ Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3 of this license or (at your option) any
@@ -39,7 +43,7 @@
and version 1.3 or later is part of all distributions of
LaTeX version 2003/06/01 or later.
- This work has the LPPL maintenance status "author-maintained".
+ This work has the LPPL maintenance status "maintained".
This work consists of the files listed in the README file.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem10.clo b/Master/texmf-dist/tex/latex/memoir/mem10.clo
index 89a8172507f..fc4bf8f3e5e 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem10.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem10.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem11.clo b/Master/texmf-dist/tex/latex/memoir/mem11.clo
index b3ac66e8678..a0be89a940e 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem11.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem11.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem12.clo b/Master/texmf-dist/tex/latex/memoir/mem12.clo
index f064303e9f6..6f4f3414c80 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem12.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem12.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem14.clo b/Master/texmf-dist/tex/latex/memoir/mem14.clo
index c713de760a4..d2a9f597ac0 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem14.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem14.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem17.clo b/Master/texmf-dist/tex/latex/memoir/mem17.clo
index 60b394642fc..fc7c0542f62 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem17.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem17.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem20.clo b/Master/texmf-dist/tex/latex/memoir/mem20.clo
index 2fc7fe7a1cc..a7d777d1053 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem20.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem20.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem25.clo b/Master/texmf-dist/tex/latex/memoir/mem25.clo
index 07dd823dec0..538ff3a331d 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem25.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem25.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem30.clo b/Master/texmf-dist/tex/latex/memoir/mem30.clo
index efe1d69ff25..7d42b4f9bdf 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem30.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem30.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem36.clo b/Master/texmf-dist/tex/latex/memoir/mem36.clo
index e55ded4defe..c6a08eb1114 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem36.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem36.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem48.clo b/Master/texmf-dist/tex/latex/memoir/mem48.clo
index 8a6e59a166a..48a5624fc1f 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem48.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem48.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem60.clo b/Master/texmf-dist/tex/latex/memoir/mem60.clo
index f8649f2f4aa..e67d9d77d8a 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem60.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem60.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/mem9.clo b/Master/texmf-dist/tex/latex/memoir/mem9.clo
index ec6c78b983a..6506b5f1b6e 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem9.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem9.clo
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,8 +22,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
diff --git a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
index 16341bb79cc..122c994c50a 100644
--- a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
+++ b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
@@ -7,7 +7,9 @@
%% mempatch.dtx (with options: `hyper')
%%
%% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%% Copyright 2001 --- 2008 Peter R. Wilson
+%% Copyright 2001 --- 2010 Peter R. Wilson
+%% Copyright 2011 --- 2013 Peter R. Wilson
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -18,7 +20,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
@@ -38,6 +40,7 @@
%% With thanks to Heiko Oberdiek, if you use hyperref dated 2006/11/15
%% or later, memhfixc will be automatically loaded after hyperref.
%%
+%% Version 1.16 2013/05/16
%% Version 1.15 2010/08/17
%% Version 1.14 2010/06/10
%% Version 1.13 2010/04/19
@@ -55,7 +58,7 @@
%% Version 1.1 2003/01/22
%% Version 1.0 2002/10/22
%%
-\ProvidesPackage{memhfixc}[2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
+\ProvidesPackage{memhfixc}[2013/05/16 v1.16 nameref/hyperref package fixes for memoir class]
\let\M@hfixcfinish\relax
\@ifclassloaded{memoir}{}%
{\let\M@hfixcfinish\endinput
@@ -285,6 +288,64 @@
\AtBeginDocument{%
\let\printpageinnotes\printpageinnoteshyperref%
}
+\ifHy@hyperfootnotes
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}%
+ \m@mmf@check% <--- added
+ \nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@footnote@currentHref}%
+ \@makefnmark
+ \hyper@linkend
+ \m@mmf@prepare% <--- added
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }%
+\fi
+
+\Hy@AtBeginDocument{%
+ \ifx\hyper@last\@undefined
+ \def\@starttoc#1{%
+ \begingroup\makeatletter
+ \IfFileExists{\jobname.#1}{%
+ \Hy@WarningNoLine{%
+ old #1 file detected, not used; run LaTeX again%
+ }%
+ }{}%
+ \if@filesw
+ \AtEndDocument{%
+ \expandafter\ifx\csname tf@#1\endcsname\relax
+ \expandafter\newwrite\csname tf@#1\endcsname
+ \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
+ \fi
+ }
+ \fi
+ \@nobreakfalse
+ \endgroup
+ }%
+ \fi
+}
+
+\ifHy@hyperfootnotes
+ \let\m@m@pnwrite@fourtharg\m@m@pnwrite@fourtharg@hyperref
+ \let\pagenoteanchor\pagenotehyperanchor
+ \newcounter{Hpagenote}
+ \@namedef{mem@pnmm@start@hook}{%
+ \stepcounter{Hpagenote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hpagenote}%
+ \global\let\Hy@pagenote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@pagenote@currentHref}%
+ }
+ \@namedef{mem@pnmm@end@hook}{\hyper@linkend}
+\fi
+
\endinput
%%
%% End of file `memhfixc.sty'.
diff --git a/Master/texmf-dist/tex/latex/memoir/memoir.cls b/Master/texmf-dist/tex/latex/memoir/memoir.cls
index bcd804795b5..c984946c539 100644
--- a/Master/texmf-dist/tex/latex/memoir/memoir.cls
+++ b/Master/texmf-dist/tex/latex/memoir/memoir.cls
@@ -8,7 +8,10 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2009 Peter R. Wilson
+%% Copyright 2001--2011 Peter R. Wilson
+%% Copyright 2011--2013 Lars Madsen
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
+%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -19,14 +22,14 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
-%% (Note: Lars Madsen is gradually taking over maintenance)
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{memoir}%
- [2011/03/06 v3.6j configurable book, report, article document class]
+ [2013/05/22 v3.7 configurable book, report, article document class]
+\newcommand\memversion{v3.7, 2013/05/22}
\newcommand*{\@ptsize}{}
\newcommand*{\@memptsize}{}
\newlength{\onelineskip}
@@ -91,6 +94,17 @@
\newcommand{\memjustarg}[1]{#1}
\newcommand{\memgobble}[1]{}
+\newcommand\memsetmacroused[1]{%
+ \@namedef{mem@macro@used@\expandafter\@gobble\string#1}{00}}
+\newcommand\memsetmacrounused[1]{%
+ \@namedef{mem@macro@used@\expandafter\@gobble\string#1}{01}}
+\newcommand\memifmacroused[1]{%
+ \if\@nameuse{mem@macro@used@\expandafter\@gobble\string#1}%
+ \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+
+\newcommand\memsetlengthmin[3]{\ifdim#2<#3\setlength{#1}{#2}\else\setlength{#1}{#3}\fi}
+\newcommand\memsetlengthmax[3]{\ifdim#2>#3\setlength{#1}{#2}\else\setlength{#1}{#3}\fi}
+
\newcommand*{\@memfakeusepackage}[1]{%
\@namelet{ver@#1.sty}\@empty}
@@ -429,8 +443,8 @@
\newcommand*{\memRTLleftskip}{\leftskip}
\newcommand*{\memRTLrightskip}{\rightskip}
-\newcommand*{\memRTLvleftskip}{\leftskip}
-\newcommand*{\memRTLvrightskip}{\rightskip}
+\newcommand*{\memRTLvleftskip}{\vleftskip}
+\newcommand*{\memRTLvrightskip}{\vrightskip}
\newcommand*{\memRTLraggedright}{\raggedright}
\newcommand*{\memRTLraggedleft}{\raggedleft}
\newcommand*{\memRTLmainraggedright}{\raggedright}
@@ -921,6 +935,7 @@
\setlength{\paperwidth}{\@tempdimb}}
\newcommand{\settypeblocksize}[3]{%
+ \memsetmacroused\settypeblocksize%
\setrectanglesize{#1}{#2}{#3}%
\setlength{\textheight}{\@tempdima}%
\setlength{\textwidth}{\@tempdimb}}
@@ -932,6 +947,7 @@
\newlength{\spinemargin}
\newlength{\foremargin}
\newcommand{\setlrmargins}[3]{%
+ \memsetmacroused\setlrmargins%
\advance\paperwidth -\binding
\setfillsize{\paperwidth}{\textwidth}{#1}{#2}{#3}%
\setlength{\textwidth}{\@tempdimc}%
@@ -952,6 +968,7 @@
\newlength{\uppermargin}
\newlength{\lowermargin}
\newcommand{\setulmargins}[3]{%
+ \memsetmacroused\setulmargins%
\setfillsize{\paperheight}{\textheight}{#1}{#2}{#3}%
\setlength{\textheight}{\@tempdimc}%
\setlength{\uppermargin}{\@tempdima}%
@@ -979,6 +996,7 @@
\setlength{\columnseprule}{#2}}
\newcommand{\setmarginnotes}[3]{%
+ \memsetmacroused\setmarginnotes%
\setlength{\marginparsep}{#1}%
\setlength{\marginparwidth}{#2}%
\setlength{\marginparpush}{#3}}
@@ -1094,6 +1112,39 @@
\setlength{\textheight}{\@tempcnta\baselineskip}%
\addtolength{\textheight}{\topskip}}
+\newcommand\mem@autoadjust@marginparwidth{%
+ \if@twocolumn
+ \memsetlengthmin\marginparwidth\spinemargin\foremargin
+ \else
+ \if@twoside
+ \ifcase\m@mmpar@margin\relax% 0 - left
+ \memsetlengthmin\marginparwidth\spinemargin\foremargin
+ \or% 1 - right
+ \memsetlengthmin\marginparwidth\spinemargin\foremargin
+ \or% 2 - outer
+ \setlength\marginparwidth{\foremargin}
+ \or% 3 - inner
+ \setlength\marginparwidth{\spinemargin}
+ \fi
+ \else % oneside
+ \ifnum\m@mmpar@margin=0% left
+ \setlength\marginparwidth{\spinemargin}
+ \else% right
+ \setlength\marginparwidth{\foremargin}
+ \fi
+ \fi
+ \fi
+ \addtolength\marginparwidth{-2\marginparsep}
+ \ifdim\marginparwidth<1pt\setlength\marginparwidth{1pt}\fi%
+}
+
+\newcommand\mem@reset@used@macros{%
+ \memsetmacrounused\setmarginnotes
+ \memsetmacrounused\settypeblocksize
+ \memsetmacrounused\setulmargins
+ \memsetmacrounused\setlrmargins
+}
+
\newcommand*{\checkthelayout}[1][classic]{%
\@memnegtest{\trimedge}
\@memnegtest{\trimtop}
@@ -1230,7 +1281,10 @@
\@settopoint\textwidth
\@settopoint\oddsidemargin
\@settopoint\evensidemargin
- \fixheaderwidths}
+ \fixheaderwidths
+ \memifmacroused\setmarginnotes{}{\mem@autoadjust@marginparwidth}
+ \mem@reset@used@macros
+}
\newcommand\settypeoutlayoutunit[1]{
\nametest{#1}{pt}
@@ -1578,46 +1632,46 @@
\mem@ps@safe@change{#1}%
\nametest{flushleft}{#2}
\ifsamename
- \@namedef{#1evenhpl}{\relax} \@namedef{#1evenhpr}{\hss}
+ \@namedef{#1evenheadpl}{\relax} \@namedef{#1evenheadpr}{\hss}
\else
\nametest{flushright}{#2}
\ifsamename
- \@namedef{#1evenhpl}{\hss} \@namedef{#1evenhpr}{\relax}
+ \@namedef{#1evenheadpl}{\hss} \@namedef{#1evenheadpr}{\relax}
\else
- \@namedef{#1evenhpl}{\hss} \@namedef{#1evenhpr}{\hss}
+ \@namedef{#1evenheadpl}{\hss} \@namedef{#1evenheadpr}{\hss}
\fi
\fi
\nametest{flushleft}{#3}
\ifsamename
- \@namedef{#1oddhpl}{\relax} \@namedef{#1oddhpr}{\hss}
+ \@namedef{#1oddheadpl}{\relax} \@namedef{#1oddheadpr}{\hss}
\else
\nametest{flushright}{#3}
\ifsamename
- \@namedef{#1oddhpl}{\hss} \@namedef{#1oddhpr}{\relax}
+ \@namedef{#1oddheadpl}{\hss} \@namedef{#1oddheadpr}{\relax}
\else
- \@namedef{#1oddhpl}{\hss} \@namedef{#1oddhpr}{\hss}
+ \@namedef{#1oddheadpl}{\hss} \@namedef{#1oddheadpr}{\hss}
\fi
\fi
\nametest{flushleft}{#4}
\ifsamename
- \@namedef{#1evenfpl}{\relax} \@namedef{#1evenfpr}{\hss}
+ \@namedef{#1evenfootpl}{\relax} \@namedef{#1evenfootpr}{\hss}
\else
\nametest{flushright}{#4}
\ifsamename
- \@namedef{#1evenfpl}{\hss} \@namedef{#1evenfpr}{\relax}
+ \@namedef{#1evenfootpl}{\hss} \@namedef{#1evenfootpr}{\relax}
\else
- \@namedef{#1evenfpl}{\hss} \@namedef{#1evenfpr}{\hss}
+ \@namedef{#1evenfootpl}{\hss} \@namedef{#1evenfootpr}{\hss}
\fi
\fi
\nametest{flushleft}{#5}
\ifsamename
- \@namedef{#1oddfpl}{\relax} \@namedef{#1oddfpr}{\hss}
+ \@namedef{#1oddfootpl}{\relax} \@namedef{#1oddfootpr}{\hss}
\else
\nametest{flushright}{#5}
\ifsamename
- \@namedef{#1oddfpl}{\hss} \@namedef{#1oddfpr}{\relax}
+ \@namedef{#1oddfootpl}{\hss} \@namedef{#1oddfootpr}{\relax}
\else
- \@namedef{#1oddfpl}{\hss} \@namedef{#1oddfpr}{\hss}
+ \@namedef{#1oddfootpl}{\hss} \@namedef{#1oddfootpr}{\hss}
\fi
\fi}
@@ -1680,7 +1734,7 @@
% #3 odd/even
% #4 odd/even short (o,e)
\@namedef{#1@#3#2}{%
- \@nameuse{#1#3hpl}\hb@xt@\@nameuse{#1#2runwidth}{\m@mhe@dreset%
+ \@nameuse{#1#3#2pl}\hb@xt@\@nameuse{#1#2runwidth}{\m@mhe@dreset%
\nametest{#2}{head}\ifsamename\let\mem@hfboxer\mem@hvboxm\else\let\mem@hfboxer\mem@fvboxm\fi%
\mem@hfboxer{\nametest{#2}{foot}\ifsamename\@nameuse{#1#2rule}\fi%
\hbox{%
@@ -1700,7 +1754,7 @@
\@nameuse{#1ps#2strut}}}%
}%
\nametest{#2}{head}\ifsamename\@nameuse{#1#2rule}\fi%
- }}\@nameuse{#1#3hpr}}%
+ }}\@nameuse{#1#3#2pr}}%
\@namedef{@#3#2}{\@nameuse{#1@#3#2}}%
}
\newcommand{\makepagestyle}[1]{%
@@ -1788,15 +1842,15 @@
\makeoddfoot{#1}{\@nameuse{#2ofootl}}%
{\@nameuse{#2ofootc}}{\@nameuse{#2ofootr}}%
\makerunningwidth{#1}[\@nameuse{#2footrunwidth}]{\@nameuse{#2headrunwidth}}%
- \@namedef{#1evenhpl}{\@nameuse{#2evenhpl}}%
- \@namedef{#1oddhpl}{\@nameuse{#2oddhpl}}%
- \@namedef{#1evenhpr}{\@nameuse{#2evenhpr}}%
- \@namedef{#1oddhpr}{\@nameuse{#2oddhpr}}%
+ \@namedef{#1evenheadpl}{\@nameuse{#2evenheadpl}}%
+ \@namedef{#1oddheadpl}{\@nameuse{#2oddheadpl}}%
+ \@namedef{#1evenheadpr}{\@nameuse{#2evenheadpr}}%
+ \@namedef{#1oddheadpr}{\@nameuse{#2oddheadpr}}%
\makeheadfootvposition{#1}{\@nameuse{#2headvplacement}}{\@nameuse{#2footvplacement}}%
- \@namedef{#1evenfpl}{\@nameuse{#2evenfpl}}%
- \@namedef{#1oddfpl}{\@nameuse{#2oddfpl}}%
- \@namedef{#1evenfpr}{\@nameuse{#2evenfpr}}%
- \@namedef{#1oddfpr}{\@nameuse{#2oddfpr}}%
+ \@namedef{#1evenfootpl}{\@nameuse{#2evenfootpl}}%
+ \@namedef{#1oddfootpl}{\@nameuse{#2oddfootpl}}%
+ \@namedef{#1evenfootpr}{\@nameuse{#2evenfootpr}}%
+ \@namedef{#1oddfootpr}{\@nameuse{#2oddfootpr}}%
\@namedef{#1headrule}{\@nameuse{#2headrule}}%
\@namedef{#1footrule}{\@nameuse{#2footrule}}%
\@namedef{#1headruleprefix}{\@nameuse{#2headruleprefix}}%
@@ -1833,8 +1887,8 @@
\makeevenhead{simple}{\thepage}{}{}
\makeoddhead{simple}{}{}{\thepage}
-\newcommand*{\nouppercaseheads}{\let\memUChead\relax}
-\newcommand*{\uppercaseheads}{\let\memUChead\MakeUppercase}
+\newcommand*{\nouppercaseheads}{\def\memUChead{}}
+\newcommand*{\uppercaseheads}{\def\memUChead{\MakeTextUppercase}}
\uppercaseheads
\newcommand*{\createplainmark}[3]{%
@@ -2111,9 +2165,11 @@
\newcommand*{\showtextblocklocon}{\showtextblockloctrue}
\newcommand*{\showtextblocklocoff}{\showtextblocklocfalse}
+\newcommand\framepichook{}
\newcommand*{\framepichead}{%
\ifshowheadfootloc
\begin{picture}(0,0)
+ \framepichook
\unitlength 1pt
\put(0,0){\line(1,0){\strip@pt\textwidth}}
\end{picture}%
@@ -2121,6 +2177,7 @@
\newcommand*{\framepictextfoot}{%
\begin{picture}(0,0)
+ \framepichook
\unitlength 1pt
\ifshowheadfootloc
\put(0,0){\line(1,0){\strip@pt\textwidth}}
@@ -2464,7 +2521,7 @@
\par
\vskip 1.5em}
-\newenvironment{titlingpage}%
+\newenvironment{mem@titlingpage}%
{\let\footnoterule\relax
\let\footnotesize\small
\if@twocolumn
@@ -2473,12 +2530,20 @@
\@restonecolfalse
\fi
\thispagestyle{titlingpage}%
- \setcounter{page}{\@ne}%
+ \if\mem@titlpg@reset\setcounter{page}{\@ne}\fi%
}{%
\thispagestyle{titlingpage}%
\if@restonecol \twocolumn \fi
\if@twoside \cleardoublepage \else \clearpage \fi
- \setcounter{page}{\@ne}}
+ \if\mem@titlpg@reset\setcounter{page}{\@ne}\fi}
+\newenvironment{titlingpage}{%
+ \def\mem@titlpg@reset{00}%
+ \begin{mem@titlingpage}}{%
+ \end{mem@titlingpage}}
+\newenvironment{titlingpage*}{%
+ \def\mem@titlpg@reset{01}%
+ \begin{mem@titlingpage}}{%
+ \end{mem@titlingpage}}
\aliaspagestyle{titlingpage}{empty}
\newcommand{\emptythanks}{\global\let\@thanks\@empty}
@@ -2493,7 +2558,6 @@
\global\let\author\relax
\global\let\date\relax
\global\let\thanksmarkseries\relax
- \global\let\thanksheadextra\relax
\global\let\thanksfootextra\relax
\global\let\thanksmark\relax
\global\let\thanksgap\relax}
@@ -2670,16 +2734,20 @@
\long\def\@book[#1]#2{%
\M@gettitle{#1}%
+ \def\f@rtoc{#1}%
+ \@nameuse{book@f@rtoc@before@write@hook}%
\phantomsection
+ \mempreaddbooktotochook
\ifnum \c@secnumdepth >-3\relax
\refstepcounter{book}%
\addcontentsline{toc}{book}%
- {\protect\booknumberline{\thebook}#1}%
- \membookinfo{\thebook}{#1}{#2}%
+ {\protect\booknumberline{\thebook}\f@rtoc}%
+ \membookinfo{\thebook}{\f@rtoc}{#2}%
\else
- \addcontentsline{toc}{book}{#1}%
- \membookinfo{}{#1}{#2}%
+ \addcontentsline{toc}{book}{\f@rtoc}%
+ \membookinfo{}{\f@rtoc}{#2}%
\fi
+ \mempostaddbooktotochook
\bookpagemark{#1}%
{\centering
\interlinepenalty \@M
@@ -2692,6 +2760,9 @@
\printbooktitle{#2}\par}%
\@endbook}
+\newcommand\mempreaddbooktotochook{}
+\newcommand\mempostaddbooktotochook{}
+
\long\def\@sbook#1{%
\M@gettitle{#1}%
\phantomsection
@@ -2763,16 +2834,20 @@
\long\def\@part[#1]#2{%
\M@gettitle{#1}%
+ \def\f@rtoc{#1}%
+ \@nameuse{part@f@rtoc@before@write@hook}%
\phantomsection
+ \mempreaddparttotochook
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}%
- {\protect\partnumberline{\thepart}#1}%
- \mempartinfo{\thepart}{#1}{#2}%
+ {\protect\partnumberline{\thepart}\f@rtoc}%
+ \mempartinfo{\thepart}{\f@rtoc}{#2}%
\else
- \addcontentsline{toc}{part}{#1}%
- \mempartinfo{}{#1}{#2}%
+ \addcontentsline{toc}{part}{\f@rtoc}%
+ \mempartinfo{}{\f@rtoc}{#2}%
\fi
+ \mempostaddparttotochook
\partmark{#1}%
{\centering
\interlinepenalty \@M
@@ -2785,6 +2860,9 @@
\printparttitle{#2}\par}%
\@endpart}
+\newcommand\mempreaddparttotochook{}
+\newcommand\mempostaddparttotochook{}
+
\long\def\@spart#1{%
\M@gettitle{#1}%
\phantomsection
@@ -2886,6 +2964,8 @@
\fi
\@afterheading
\fi
+ \@nameuse{chapter@f@rtoc@before@write@hook}%
+ \mempreaddchaptertotochook%
\ifm@m@And
\ifanappendix
\addcontentsline{toc}{appendix}{%
@@ -2904,8 +2984,16 @@
\memchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
\fi
\fi
- \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi}
+ \mempostaddchaptertotochook%
+ \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi%
+ \memendofchapterhook%
+}
+\newcommand\mempreaddchaptertotochook{}
+\newcommand\mempostaddchaptertotochook{}
+\newcommand\memendofchapterhook{}
+\newcommand\settocpreprocessor[2]{%
+ \@namedef{#1@f@rtoc@before@write@hook}{#2}}
\def\@makechapterhead#1{%
\chapterheadstart% \vspace*{50\p@}%
{%\parindent \z@ \raggedright \normalfont
@@ -2993,20 +3081,20 @@
\newcommand{\chapterstyle}[1]{\@nameuse{chs@#1}}
\makechapterstyle{default}{}%
-%% \setlength{\beforechapskip}{50pt}
-%% \def\chapterheadstart{\vspace*{\beforechapskip}}
-%% \def\chapnamefont{\normalfont\huge\bfseries}
-%% \def\printchaptername{\chapnamefont \@chapapp}
-%% \def\chapternamenum{\space}
-%% \def\chapnumfont{\normalfont\huge\bfseries}
-%% \def\printchapternum{\chapnumfont \thechapter}
-%% \setlength{\midchapskip}{20pt}
-%% \def\afterchapternum{\par\nobreak\vskip \midchapskip}
-%% \def\printchapternonum{}
-%% \def\chaptitlefont{\normalfont\Huge\bfseries}
-%% \def\printchaptertitle##1{\chaptitlefont ##1}
-%% \setlength{\afterchapskip}{40pt}
-%% \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}}
+ %% \setlength{\beforechapskip}{50pt}
+ %% \def\chapterheadstart{\vspace*{\beforechapskip}}
+ %% \def\chapnamefont{\normalfont\huge\bfseries}
+ %% \def\printchaptername{\chapnamefont \@chapapp}
+ %% \def\chapternamenum{\space}
+ %% \def\chapnumfont{\normalfont\huge\bfseries}
+ %% \def\printchapternum{\chapnumfont \thechapter}
+ %% \setlength{\midchapskip}{20pt}
+ %% \def\afterchapternum{\par\nobreak\vskip \midchapskip}
+ %% \def\printchapternonum{}
+ %% \def\chaptitlefont{\normalfont\Huge\bfseries}
+ %% \def\printchaptertitle##1{\chaptitlefont ##1}
+ %% \setlength{\afterchapskip}{40pt}
+ %% \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
\chapterstyle{default}
\makechapterstyle{section}{%
@@ -3106,8 +3194,8 @@
\renewcommand*{\printchapternum}{}
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchaptertitle}[1]{%
-%%% \raggedright\Large\scshape\MakeLowercase{##1}}
- \memRTLraggedright\Large\scshape\MakeLowercase{##1}}
+ %%% \raggedright\Large\scshape\MakeLowercase{##1}}
+ \memRTLraggedright\Large\scshape\MakeTextLowercase{##1}}
\renewcommand*{\afterchaptertitle}{%
\vskip\onelineskip \hrule\vskip\onelineskip}}
@@ -3313,7 +3401,7 @@
\renewcommand*{\printchaptername}{%
\centerline{\chapnumfont{\@chapapp\ \thechapter}}}
\renewcommand*{\chapternamenum}{}
- \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeLowercase}
+ \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeTextLowercase}
\renewcommand*{\printchapternum}{}
\renewcommand*{\afterchapternum}{%
\par\centerline{\parbox{0.5in}{\hrulefill}}\par}
@@ -3322,7 +3410,7 @@
\parbox{0.5in}{}\par}
\renewcommand*{\chaptitlefont}{\normalfont\large}
\renewcommand*{\printchaptertitle}[1]{%
- \centering \chaptitlefont\MakeUppercase{##1}}}
+ \centering \chaptitlefont\MakeTextUppercase{##1}}}
\makechapterstyle{veelo}{%
\setlength{\afterchapskip}{40pt}
@@ -3332,7 +3420,7 @@
\renewcommand*{\chapnumfont}{\normalfont\HUGE}
\renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
\renewcommand*{\printchaptername}{%
- \chapnamefont\MakeUppercase{\@chapapp}}
+ \chapnamefont\MakeTextUppercase{\@chapapp}}
\renewcommand*{\chapternamenum}{}
\setlength{\beforechapskip}{18mm}% \numberheight
\setlength{\midchapskip}{\paperwidth}% \barlength
@@ -3436,6 +3524,7 @@
\raggedbottomsectionfalse
\newcommand*{\raggedbottomsection}{\raggedbottomsectiontrue}
\newcommand*{\normalbottomsection}{\raggedbottomsectionfalse}
+\newcommand*{\bottomsectionpenalty}{\z@}
\newlength{\bottomsectionskip}
\setlength{\bottomsectionskip}{10mm}
@@ -3459,7 +3548,7 @@
\@nameuse{#1block}%
\ifraggedbottomsection\if@nobreak\else
\vskip\z@\@plus\bottomsectionskip
- \penalty\z@
+ \penalty\bottomsectionpenalty
\vskip\z@\@plus -\bottomsectionskip
\fi\fi
\def\m@msecn@me{#1}%
@@ -3894,7 +3983,7 @@
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
%%% \setsecheadstyle{\normalfont\raggedright\scshape\MakeLowercase}%
- \setsecheadstyle{\normalfont\memRTLraggedright\scshape\MakeLowercase}%
+ \setsecheadstyle{\normalfont\memRTLraggedright\scshape\MakeTextLowercase}%
\setbeforesubsecskip{-1.0\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsecskip{1.0\onelineskip \@plus 0.1\onelineskip}%
@@ -3903,7 +3992,7 @@
\setbeforesubsubsecskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
\setaftersubsubsecskip{-1em}%
- \setsubsubsecheadstyle{\normalfont\normalsize\scshape\MakeLowercase}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\scshape\MakeTextLowercase}%
\setbeforeparaskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
\setafterparaskip{-1em}%
@@ -3919,7 +4008,7 @@
\setbeforesecskip{-1.25\onelineskip
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{0.75\onelineskip \@plus 0.1\onelineskip}%
- \setsecheadstyle{\normalfont\centering\MakeUppercase}%
+ \setsecheadstyle{\normalfont\centering\MakeTextUppercase}%
\setbeforesubsecskip{-1.25\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsecskip{0.75\onelineskip \@plus 0.1\onelineskip}%
@@ -3927,7 +4016,7 @@
\setbeforesubsubsecskip{-.667\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsubsecskip{.333\onelineskip \@plus 0.1\onelineskip}%
- \setsubsubsecheadstyle{\normalfont\normalsize\centering\scshape\MakeLowercase}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\centering\scshape\MakeTextLowercase}%
\setbeforeparaskip{-.667\onelineskip
\@plus -02.5\onelineskip \@minus -0.25\onelineskip}%
\setafterparaskip{.333\onelineskip \@plus 0.1\onelineskip}%
@@ -3936,18 +4025,18 @@
\setbeforesubparaskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
\setaftersubparaskip{-1em}%
- \setsubparaheadstyle{\normalfont\normalsize\scshape\MakeLowercase}}
+ \setsubparaheadstyle{\normalfont\normalsize\scshape\MakeTextLowercase}}
\makeheadstyles{dowding}{%
\chapterstyle{dowding}
\setbeforesecskip{-2\onelineskip
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
- \setsecheadstyle{\normalfont\centering\MakeUppercase}%
+ \setsecheadstyle{\normalfont\centering\MakeTextUppercase}%
\setbeforesubsecskip{-1.2\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsecskip{0.8\onelineskip \@plus 0.1\onelineskip}%
- \setsubsecheadstyle{\normalfont\scshape\centering\MakeLowercase}%
+ \setsubsecheadstyle{\normalfont\scshape\centering\MakeTextLowercase}%
\setbeforesubsubsecskip{-0.667\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
@@ -3988,9 +4077,9 @@
\setsubparaheadstyle{\normalfont\normalsize\sffamily\bfseries}}
\makeheadstyles{ntglike}{%
- \renewcommand*{\partnamefont}{\Large\bfseries\MakeUppercase}%
+ \renewcommand*{\partnamefont}{\Large\bfseries\MakeTextUppercase}%
\renewcommand*{\partnumfont}{\Large\bfseries}%
- \renewcommand*{\parttitlefont}{\Large\MakeUppercase}%
+ \renewcommand*{\parttitlefont}{\Large\MakeTextUppercase}%
\chapterstyle{ntglike}
\setbeforesecskip{-2\onelineskip
\@plus -1\onelineskip \@minus -.5\onelineskip}%
@@ -4018,7 +4107,7 @@
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
%%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}%
- \setsecheadstyle{\normalfont\memRTLraggedright\MakeUppercase}%
+ \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}%
\setbeforesubsecskip{-1.2\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsecskip{0.8\onelineskip \@plus 0.1\onelineskip}%
@@ -4045,7 +4134,7 @@
\@plus -0.5\onelineskip \@minus -.5\onelineskip}%
\setaftersecskip{0.667\onelineskip \@plus 0.1\onelineskip}%
%%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}%
- \setsecheadstyle{\normalfont\memRTLraggedright\MakeUppercase}%
+ \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}%
\setbeforesubsecskip{-0.667\onelineskip
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
@@ -4055,7 +4144,7 @@
\@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
\setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
%%% \setsubsubsecheadstyle{\normalfont\normalsize\raggedright\scshape\MakeLowercase}%
- \setsubsubsecheadstyle{\normalfont\normalsize\memRTLraggedright\scshape\MakeLowercase}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\memRTLraggedright\scshape\MakeTextLowercase}%
\setbeforeparaskip{1.0\onelineskip
\@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
\setafterparaskip{-1em}%
@@ -4082,7 +4171,9 @@
\def\@apppage{%
\@setuppart
+ \mempreaddapppagetotochook
\addappheadtotoc
+ \mempostaddapppagetotochook
\partmark{\appendixpagename}%
\memapppageinfo{\appendixpagename}%
{\centering
@@ -4090,6 +4181,9 @@
\normalfont
\printparttitle{\appendixpagename}\par}%
\@endpart}
+\newcommand\mempreaddapppagetotochook{}
+\newcommand\mempostaddapppagetotochook{}
+
\def\@sapppage{%
\@setuppart
\partmark{\appendixpagename}%
@@ -4153,12 +4247,6 @@
\fi
}{}
-\newcommand{\@formatsecmark@pp}[1]{%
- \MakeUppercase{\appendixname\space
- \ifnum \c@secnumdepth >\z@
- \thesection\quad
- \fi
- #1}}
\newcommand*{\leadpagetoclevel}{chapter}
\newcommand*{\newleadpage}[3][empty]{%
\@namedef{#2}{\@ifstar{\dlfm@msapppage{#1}{#2}{#3}}%
@@ -5213,7 +5301,7 @@
\if \@nextchar l\@ne \else
\if \@nextchar r\tw@ \else
\z@ \@chclass
- \if\@nextchar |\@ne \else
+ \if\@nextchar |\@ne \else%| emacs
\if \@nextchar !6 \else
\if \@nextchar @7 \else
\if \@nextchar <8 \else
@@ -5420,7 +5508,7 @@
\def\newcolumntype#1{%
\edef\NC@char{\string#1}%
\@ifundefined{NC@find@\NC@char}%
- {\@tfor\next:=<>clrmbp@!|\do{\if\noexpand\next\NC@char
+ {\@tfor\next:=<>clrmbp@!|\do{\if\noexpand\next\NC@char%|emacs
\@memwarn{Redefining primitive column \NC@char}\fi}%
\NC@list\expandafter{\the\NC@list\NC@do#1}}%
{\@memwarn{Column \NC@char\space is already defined}}%
@@ -6243,12 +6331,14 @@
\let\@memoldfloat\@float
\renewcommand{\@float}[1]{\donemaincaptionfalse
- \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}%
+ \@memresetsubcounter{#1}%
\@memoldfloat{#1}}
\let\@memolddblfloat\@dblfloat
\renewcommand{\@dblfloat}[1]{\donemaincaptionfalse
- \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}%
+ \@memresetsubcounter{#1}%
\@memolddblfloat{#1}}
+\newcommand{\@memresetsubcounter}[1]{%
+ \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}}
\let\@memoldefloat\end@float
\def\end@float{%
@@ -6403,10 +6493,14 @@
\long\def\@makecaption#1#2{\let\@memtempa\relax
\ifdim\prevdepth>-99\p@ \vskip\abovecaptionskip
\else \def\@memtempa{\vbox to\topskip{}}\fi
+ \@@makecaption{#1}{#2}%
+ \vskip\belowcaptionskip}
+
+\long\def\@@makecaption#1#2{%
\let\@contfnote\footnote \renewcommand{\footnote}[2][]{}
\let\@contfmark\footnotemark \renewcommand{\footnotemark}[1][]{}
\let\@contpnote\pagenote\renewcommand\pagenote[2][]{}
- \sbox\@tempboxa{\@contnfont #1\@contdelim \@conttfont #2\@contfinal}
+ \sbox\@tempboxa{{\@contnfont #1\@contdelim}\@conttfont #2\@contfinal}
\let\footnote\@contfnote
\let\footnotemark\@contfmark
\let\pagenote\@contpnote
@@ -6444,7 +6538,7 @@
\par
} % end of the \parbox
\fi
- \vskip\belowcaptionskip}
+ }
\newcommand{\contcaption}{%
\addtocounter{\@captype}{\m@ne}\refstepcounter{\@captype}%
@@ -6728,7 +6822,7 @@
{\@memsubfloat{sub\@captype}[#1]}%
{\@memsubfloat{sub\@captype}[\@empty #1][#1]}}
-\def\@memsubfloat#1[#2][#3]#4{%
+\long\def\@memsubfloat#1[#2][#3]#4{%
\@tempcnta=\@ne
\if@tightsubcap
\if@minipage
@@ -6797,7 +6891,7 @@
\newcommand{\@makesubfloatcaption}[2]{%
\setbox\@tempboxa\hbox{%
\@subcapsize
- {\@subcaplabelfont #1}{\@subcapfont\ignorespaces #2}}%
+ {\@subcaplabelfont #1}{\@subcapfont\ignorespaces #2}\unskip}%
\@tempdimb=-\subfloatcapmargin
\multiply\@tempdimb\tw@
\advance\@tempdimb\@tempdima
@@ -6820,10 +6914,10 @@
\addtolength{\@tempdimb}{-\wd\@tempboxa}%
\usebox{\@tempboxa}%
\memsubfig@captionpar{\@tempdimb}{%
- {\@subcapfont\ignorespaces #2}}%
+ {\@subcapfont\ignorespaces #2}\unskip}%
\else
\memsubfig@captionpar{\@tempdimb}{{\@subcaplabelfont #1}%
- {\@subcapfont\ignorespaces #2}}%
+ {\@subcapfont\ignorespaces #2}\unskip}%
\fi}
\newcommand{\memsubfig@captionpar}[2]{%
@@ -7005,6 +7099,7 @@
\m@mscapend@fbox
\refstepcounter\@captype
\m@mscaplabel
+ \m@mscapcheckside %<--- added 2012/08/19
\begin{lrbox}{\m@mscap@capbox}%
\begin{minipage}[c]{\sidecapwidth}%
\sidecapstyle
@@ -7014,7 +7109,7 @@
\m@mscapopboxes}
\newcommand*{\m@mscapopboxes}{%
\m@mcalcscapraise
- \usebox{\m@mscap@fbox}\m@mscapcheckside
+ \usebox{\m@mscap@fbox}%\m@mscapcheckside
\ifscapmargleft%
\rlap{\kern-\m@mscaplkern
\raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}%
@@ -7173,6 +7268,25 @@
\end{lrbox}%
\m@mscapopboxes}
+\AtBeginDocument{
+ \@ifpackageloaded{longtable}{
+ \@ifpackageloaded{ltcaption}{}{%
+ \def\LT@makecaption#1#2#3{%
+ \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
+ \let\@memtempa\relax%
+ % starred form -> #1 = \@gobble
+ \ifx#1\@gobble%
+ \let\@contnfont\@empty%
+ \let\@contdelim\@empty%
+ \@@makecaption{}{#3}%
+ \else%
+ \@@makecaption{#2}{#3}%
+ \fi%
+ \endgraf\vskip\belowcaptionskip}%
+ \hss}}}
+ }
+ }{}
+}
\newlength{\beforeepigraphskip}
\setlength{\beforeepigraphskip}{.5\baselineskip}
\newlength{\afterepigraphskip}
@@ -7538,10 +7652,17 @@
\newcommand*{\cftparfillskip}{\parfillskip=0pt plus1fil}
\newcommand*{\@cftn@me}{}
+\newcommand\mem@cft@hb@xt@[2]{\hb@xt@#1{#2\hfil}}
+\let\numberlinebox\mem@cft@hb@xt@
+\let\partnumberlinebox\mem@cft@hb@xt@
+\let\chapternumberlinebox\mem@cft@hb@xt@
+\let\booknumberlinebox\mem@cft@hb@xt@
+
\newcommand*\numberlinehook[1]{}
\renewcommand*{\numberline}[1]{%
\numberlinehook{#1}%
- \hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
+ %\hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
+ \numberlinebox\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum}\@cftasnumb}
\newcommand{\@cftbsnum}{}
\newcommand{\@cftasnum}{}
\newcommand{\@cftasnumb}{}
@@ -7568,7 +7689,7 @@
\parindent \@nameuse{cft#2indent}\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
- \settowidth{\@tempdima}{\@nameuse{cft#2font}\@nameuse{cft#2name}}%
+ \settowidth{\@tempdima}{\@nameuse{cft#2font}{\@nameuse{cft#2name}}}%
\addtolength{\@tempdima}{\@nameuse{cft#2numwidth}}%
\expandafter\let\expandafter\@cftbsnum\csname cft#2presnum\endcsname
\expandafter\let\expandafter\@cftasnum\csname cft#2aftersnum\endcsname
@@ -7576,7 +7697,7 @@
\expandafter\let\expandafter\@cftn@me\csname cft#2name\endcsname
%%% \advance\leftskip\@tempdima \null\nobreak\hskip -\leftskip
\advance\memRTLleftskip\@tempdima \null\nobreak\hskip -\memRTLleftskip
- {\@nameuse{cft#2font}##1}\nobreak
+ {\@nameuse{cft#2font}{##1}}\nobreak
\@nameuse{cft#2fillnum}{##2}}
\fi
}% end of \l@#2
@@ -7651,7 +7772,7 @@
\let\@cftasnumb \cftbookaftersnumb
%%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
\advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip
- {\cftbookfont #1}%
+ {\cftbookfont {#1}}%
\cftbookfillnum{#2}}
\nobreak
\global\@nobreaktrue
@@ -7661,8 +7782,10 @@
\newcommand*\booknumberlinehook[1]{}
\newcommand{\booknumberline}[1]{%
\booknumberlinehook{#1}%
- \hb@xt@\@tempdima{%
- \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ % \hb@xt@\@tempdima{%
+ % \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ \booknumberlinebox\@tempdima{%
+ \cftbookname\@cftbsnum #1\@cftasnum}\@cftasnumb}%%\space}
\newlength{\cftbeforebookskip}
\setlength{\cftbeforebookskip}{2.25em \@plus\p@}
@@ -7713,7 +7836,7 @@
\let\@cftasnumb \cftpartaftersnumb
%%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
\advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip
- {\cftpartfont #1}%
+ {\cftpartfont {#1}}%
\cftpartfillnum{#2}}
\nobreak
\global\@nobreaktrue
@@ -7726,8 +7849,10 @@
\newcommand*\partnumberlinehook[1]{}
\newcommand{\partnumberline}[1]{%
\partnumberlinehook{#1}%
- \hb@xt@\@tempdima{%
- \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ % \hb@xt@\@tempdima{%
+ % \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space}
+ \partnumberlinebox\@tempdima{%
+ \cftpartname\@cftbsnum #1\@cftasnum}\@cftasnumb}%%\space}
\newlength{\cftbeforepartskip}
\setlength{\cftbeforepartskip}{2.25em \@plus\p@}
@@ -7777,7 +7902,7 @@
\addtolength{\@tempdima}{\cftchapternumwidth}%
%%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
\advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip
- {\cftchapterfont #1}\nobreak
+ {\cftchapterfont {#1}}\nobreak
\cftchapterfillnum{#2}}
\fi}
@@ -7795,7 +7920,9 @@
\newcommand*\chapternumberlinehook[1]{}
\newcommand{\chapternumberline}[1]{%
\chapternumberlinehook{#1}%
- \hb@xt@\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum\hfil}%
+ % \hb@xt@\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum\hfil}%
+ % \@cftasnumb}
+ \chapternumberlinebox\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum}%
\@cftasnumb}
\newlength{\cftbeforechapterskip}
@@ -7868,7 +7995,10 @@
\newcommand{\prechapterprecis}{%
\vspace*{\prechapterprecisshift}%
\begin{quote}\precisfont}
-\newcommand*{\postchapterprecis}{\end{quote}}
+\newcommand*{\postchapterprecis}{%
+ \end{quote}%
+ \par\m@mindentafterchapter%
+ \@afterheading}
\newcommand{\precistocfont}{\normalfont\itshape}
\newcommand{\precistocformat}{\noindent}
@@ -8439,7 +8569,7 @@
\@namedef{memglsact#1}{@}% actual
\@namedef{memglsnx#1}{}% no ref
\@namedef{memglsn#1}{\thepage}% num by page
- \@namedef{memglsnf#1}{|memjustarg}% no special number format
+ \@namedef{memglsnf#1}{|memjustarg}% no special number format | emacs
\if@filesw \expandafter\newwrite\csname #1memglofile\endcsname
\expandafter\immediate\openout \csname #1memglofile\endcsname #1.glo\relax
\typeout{Writing glossary file #1.glo }%
@@ -8638,6 +8768,14 @@
\fi
\setmpbools}
+\if@twocolumn\else
+ \if@twoside
+ \def\m@mmpar@margin{2}
+ \else
+ \def\m@mmpar@margin{1}
+ \fi
+\fi
+
\newcommand*{\setmpbools}{%
\if@twoside
\@mparswitchtrue
@@ -8876,6 +9014,7 @@
\renewcommand{\footnoterule}{%
\kern-3\p@
+ \normalcolor% added 2013/05/08
\hrule width .4\columnwidth
\kern 2.6\p@}
\skip\footins=\bigskipamount
@@ -8905,14 +9044,16 @@
\ifhmode\spacefactor\@x@sf\fi
\relax}
-\newcommand{\mem@multiple@marker}[1]{%
+\newcommand{\mem@pn@multiple@marker}[1]{%
\leavevmode
\ifhmode
\edef\@x@sf{\the\spacefactor}%
\m@mmf@check
\nobreak
\fi
+ \@nameuse{mem@pnmm@start@hook}%
#1%
+ \@nameuse{mem@pnmm@end@hook}%
\m@mmf@prepare
\ifhmode\spacefactor\@x@sf\fi
\relax}
@@ -9009,6 +9150,7 @@
\newcommand*{\setfootnoterule}[4][]{%
\def\footnoterule{\kern -#2\relax #1\relax
+ \normalcolor% added 2013/05/08
\hrule width #3\relax
\kern #2\kern-#4}}
\setfootnoterule{3pt}{0.4\columnwidth}{\normalrulethickness}
@@ -10163,10 +10305,12 @@
\immediate\openout\@notefile=\jobname.ent
\mempagenotestrue
\DeclareRobustCommand\pagenote{\@bsphack\begingroup
- % \@sanitize
+ \rem@special{\ }% <--- added
+ \@sanitize
\m@m@wrpnote}%
\DeclareRobustCommand\mem@footto@pagenote{\@bsphack\begingroup
- % \@sanitize
+ \rem@special{\ }% <--- added
+ \@sanitize
\def\mem@pn@step{01}%
\m@m@wrpnote}%
\typeout{Writing note file \jobname.ent}%
@@ -10182,6 +10326,7 @@
\if@nobreak\ifvmode\nobreak\fi\fi}
\newcommand{\m@m@pnwrite}[3]{\immediate\write#1{#3}}
+\newcommand{\m@m@pnwrited}[3]{\immediate\write#1{\detokenize{#3}}}
\newcommand*{\pnchap}{\f@rtoc}
\newcommand*{\pnschap}{\f@rbdy}
@@ -10190,6 +10335,14 @@
\setcounter{pagenoteshadow}{0}
\newcommand\mem@pn@step{00} % i.e. true
\newlength\mem@pn@lastkern
+\newcommand\m@m@pnwrite@fourtharg[1]{\m@m@pnwrited\@notefile{}{{}}}
+\newcommand\m@m@pnwrite@fourtharg@hyperref[1]{%
+ \@ifmtarg{#1}{%
+ \m@m@pnwrite\@notefile{}{{\Hy@pagenote@currentHref}}%
+ }{%
+ \m@m@pnwrited\@notefile{}{{}}%
+ }}
+
\newcommand{\m@m@wrpnote}[2][]{%
\mem@pn@lastkern=\lastkern%
\refstepcounter{pagenoteshadow}%
@@ -10203,28 +10356,30 @@
\ifdim\mem@pn@lastkern=\multiplefootnotemarker%
\m@mmf@prepare% rerun
\fi%
- \mem@multiple@marker{\notenumintext{\thepagenote}}%
+ \mem@pn@multiple@marker{\notenumintext{\thepagenote}}%
}{}%
\fi%
- \ifm@mpn@new@chap
- \global\m@mpn@new@chapfalse
+ \ifm@mpn@new@chap%
+ \global\m@mpn@new@chapfalse%
\addtonotes{\string\pagenotesubhead{\@chapapp}{\thechapter}{\pnchap}}%
- \fi
- \ifm@mpn@new@schap
- \global\m@mpn@new@schapfalse
+ \fi%
+ \ifm@mpn@new@schap%
+ \global\m@mpn@new@schapfalse%
\addtonotes{\string\pagenotesubheadstarred{\@chapapp}{}{\pnschap}}%
- \fi
+ \fi%
+ \m@m@pnwrite\@notefile{}%
+ {\string\startnoteentry{\thepagenote}}%
+ \m@m@pnwrited\@notefile{}{{#1}}%
\m@m@pnwrite\@notefile{}%
- {\string\startnoteentry{\thepagenote}{#1}%
- {pagenote\thepagenoteshadow-\thesheetsequence}}%
- \def\next{#2}%
+ {{pagenote\thepagenoteshadow-\thesheetsequence}}%
+ \m@m@pnwrite@fourtharg{#1}%
\begingroup%
\newlinechar='40%
- \m@m@pnwrite\@notefile{}{\meaning\next}%
+ \m@m@pnwrited\@notefile{}{#2}%
\endgroup%
\m@m@pnwrite\@notefile{}%
{\string\endnoteentry}%
- \endgroup
+ \endgroup%
\@esphack}
\def\pagenote{\@bsphack\begingroup \@sanitize\m@m@pagenote}
@@ -10249,9 +10404,8 @@
}
\newcommand*{\foottopagenote}{%
\let\memsavefootnote\footnote
- % now also \footnotemark work
+ \counterwithout{footnote}{chapter}
\letcountercounter{footnote}{pagenote}
- % and this takes care of \footnotetext
\renewcommand\footnotetext[2][]{\mem@footto@pagenote{##2}}
\renewcommand{\footnote}[2][]{\pagenote{##2}}
}
@@ -10292,34 +10446,30 @@
\newcommand*{\mempnofilewarn}{%
\ClassWarning{memoir}{There is no .ent file}}
-\newcommand\startnoteentrystart[3]{%
+\newcommand\startnoteentrystart[4]{%
\prenoteinnotes%
\noteidinnotes{#1}{#2}%
+ \@ifmtarg{#2}{\def\@currentlabel{#1}}{}%
+ \pagenoteanchor{#4}%
\pageinnotes{#3}%
\prenotetext%
}
\def\endnoteentryend{\postnotetext\postnoteinnotes}
-\newcommand\mem@make@gt@safe{%
- \edef\@tempa{`\string >}%
- \ifnum\catcode\@tempa=12%
- \let\@ResetGT\relax%
- \else%
- \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
- \@makeother\>%
- \fi%
-}
+\let\pagenoteanchor\@gobble
+\newcommand\pagenotehyperanchor[1]{%
+ \expandafter\@ifmtarg\expandafter{#1}{}{%
+ \Hy@raisedlink{\hyper@@anchor{#1}{\relax}}}}%
+
\newcommand\mem@printpagenotes[1]{%
\ifmempagenotes
\notedivision
\IfFileExists{\jobname.ent}{%
\begingroup
- \mem@make@gt@safe%
- \def\startnoteentry####1####2####3####4>{%
+ \long\def\startnoteentry####1####2####3####4{%
\begingroup
- \@ResetGT
- \startnoteentrystart{####1}{####2}{####3}%
+ \startnoteentrystart{####1}{####2}{####3}{####4}%
}
- \def\endnoteentry{\endnoteentryend\endgroup}
+ \long\def\endnoteentry{\endnoteentryend\endgroup}
\immediate\closeout\@notefile
\input{\jobname.ent}%
\if#1\immediate\openout\@notefile=\jobname.ent\fi%
@@ -12534,6 +12684,44 @@
\AtEndDocument{\@memensuresigpages}
+%%%% Nearly a carbon copy from textcase.dtx by David Carlisle
+\def\@uclcnotmath#1#2#3#4{\begingroup
+ #1%
+ \def\({$}\let\)\(% $ for emacs :-)
+ \def\NoCaseChange##1{\noexpand\NoCaseChange{\noexpand##1}}%
+ \@nonchangecase\label
+ \@nonchangecase\ref
+ \@nonchangecase\ensuremath
+ \def\cite##1##{\toks@{\noexpand\cite##1}\@citex}%
+ \def\@citex##1{\NoCaseChange{\the\toks@{##1}}}%
+ \def\reserved@a##1##2{\let#2\reserved@a}%
+ \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
+ \protected@edef\reserved@a{\endgroup
+ \noexpand\@skipmath#3#4$\valign$}%
+ \reserved@a}
+\def\@nonchangecase#1{\def#1##1{\NoCaseChange{#1{##1}}}}
+\let\NoCaseChange\@firstofone
+\def\@skipmath#1#2$#3${%
+ \@skip@nonchangecase#1#2\NoCaseChange\valign
+ \ifx\valign#3%
+ \else
+ $#3$%
+ \expandafter\@skipmath\expandafter#1%
+ \fi}
+\def\@skip@nonchangecase#1#2\NoCaseChange#3{%
+ #1{#2}%
+ \ifx\valign#3%
+ \else
+ #3%
+ \expandafter\@skip@nonchangecase\expandafter#1%
+ \fi}
+\DeclareRobustCommand\MakeTextUppercase{%
+ \@uclcnotmath{\def\i{I}\def\j{J}}{##1##2}\uppercase}
+\protected@edef\MakeTextUppercase#1{\MakeTextUppercase{#1}}
+\DeclareRobustCommand\MakeTextLowercase{%
+ \@uclcnotmath{}{##2##1}\lowercase}
+\protected@edef\MakeTextLowercase#1{\MakeTextLowercase{#1}}
+%%%% End copy from textcase.dtx
\newcommand*{\abstractname}{Abstract}
\newcommand*{\contentsname}{Contents}
\newcommand*{\listfigurename}{List of Figures}
@@ -12658,7 +12846,7 @@
\EmulatedPackage{abstract}[2008/07/23]
\EmulatedPackage{appendix}[2008/07/23]
-\EmulatedPackage{array}[2008/07/23]
+\EmulatedPackage{array}[2008/09/09]
\EmulatedPackage{booktabs}[2008/07/23]
\EmulatedPackage{ccaption}[2008/07/23]
\EmulatedPackage{changepage}[2008/07/23]
@@ -12699,46 +12887,55 @@
%%% revert changes to captioning macros if the caption package is used.
\AtBeginPackage{caption}{
-\ClassWarningNoLine{memoir}{%
- You are using the caption package with the memoir \MessageBreak
- class. This may cause unexpected or inconsistent \MessageBreak
- results if you use any of memoir's captioning facilities}
+ \ClassWarningNoLine{memoir}{%
+ You are using the caption package with the memoir class.
+ To prepare we will now reset all captioning macros and
+ configurations to kernel defaults, and then let the
+ caption package take over. Please remember to use the
+ caption package interfaces in order to configure
+ your captions.
+ }
-\long\def\@makecaption##1##2{%
- \vskip\abovecaptionskip
- \sbox\@tempboxa{##1: ##2}%
- \ifdim \wd\@tempboxa >\hsize
- ##1: ##2\par
- \else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}
+ \long\def\@makecaption##1##2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{##1: ##2}%
+ \ifdim \wd\@tempboxa >\hsize
+ ##1: ##2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
-\def\caption{%
- \ifx\@captype\@undefined
- \@latex@error{\noexpand\caption outside float}\@ehd
- \expandafter\@gobble
- \else
- \refstepcounter\@captype
- \expandafter\@firstofone
- \fi
- {\@dblarg{\@caption\@captype}}%
-}
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\@caption\@captype}}%
+ }
-\long\def\@caption##1[##2]##3{%
- \par
- \addcontentsline{\csname ext@##1\endcsname}{##1}%
+ \long\def\@caption##1[##2]##3{%
+ \par
+ \addcontentsline{\csname ext@##1\endcsname}{##1}%
{\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
- \fi
- \normalsize
- \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
- \endgroup}
-}
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
+ \endgroup}
+
+
+ \setlength\abovecaptionskip{10\p@}
+ \setlength\belowcaptionskip{0\p@}
+
+} % end \AtBeginPackage
\AtBeginPackage{float}{\let\newfloat\relax}
diff --git a/Master/texmf-dist/tex/latex/memoir/mempatch.sty b/Master/texmf-dist/tex/latex/memoir/mempatch.sty
index 773bff24db4..7158af2d513 100644
--- a/Master/texmf-dist/tex/latex/memoir/mempatch.sty
+++ b/Master/texmf-dist/tex/latex/memoir/mempatch.sty
@@ -7,7 +7,9 @@
%% mempatch.dtx (with options: `patch')
%%
%% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%% Copyright 2001 --- 2008 Peter R. Wilson
+%% Copyright 2001 --- 2010 Peter R. Wilson
+%% Copyright 2011 --- 2013 Peter R. Wilson
+%% Maintainer: Lars Madsen (daleif at imf dot au dot dk)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -18,7 +20,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "author-maintained".
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%