diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-19 22:50:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-19 22:50:53 +0000 |
commit | 6f50f6bd304c69abef2c051ee1aa83b602027143 (patch) | |
tree | 27c73e4e2125099424a4a235e1d37cfd2c050c33 /Master/texmf-dist/source/latex/memoir | |
parent | 8c448ca8b31770f9afca1e77a4b6d2e91404488e (diff) |
memoir 3.6 (18apr10)
git-svn-id: svn://tug.org/texlive/trunk@17927 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/memoir')
-rw-r--r-- | Master/texmf-dist/source/latex/memoir/memoir.dtx | 50 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/memoir/mempatch.dtx | 103 |
2 files changed, 97 insertions, 56 deletions
diff --git a/Master/texmf-dist/source/latex/memoir/memoir.dtx b/Master/texmf-dist/source/latex/memoir/memoir.dtx index 57615dbf4c8..48b374d2f88 100644 --- a/Master/texmf-dist/source/latex/memoir/memoir.dtx +++ b/Master/texmf-dist/source/latex/memoir/memoir.dtx @@ -18,7 +18,7 @@ % This work consists of the files listed in the README file. % % \fi -% \CheckSum{29391} +% \CheckSum{29407} % % \changes{v0.1}{2001/05/20}{First public alpha release} % \changes{v0.2}{2001/06/03}{First beta release} @@ -94,6 +94,10 @@ % \changes{v1.618033988}{2010/02/16}{bumped version to v1.618033988} % \changes{v1.618033988b}{2010/02/17}{fixed typo that broke \cs{feetbelowfloat}} % \changes{v1.618033988c}{2010/02/20}{fixed sporadic space in \cs{@footnotetext}} +% \changes{v1.618033988d}{2010/02/26}{fixed bug in +% \cs{marginparmargin}\{left\} in twoside mode} +% +% \changes{v3.6}{2010/04/19}{Reversioned memoir to a more suitable scheme} % % \def\dtxfile{memoir.dtx} % @@ -133,6 +137,7 @@ % \def\fileversion{v1.618033988} \def\filedate{2010/02/16} % \def\fileversion{v1.618033988b} \def\filedate{2010/02/17} % \def\fileversion{v1.618033988c} \def\filedate{2010/02/20} +% \def\fileversion{v3.6} \def\filedate{2010/04/19} % \title{The LaTeX \Lpack{memoir} class for configurable book % typesetting: Source code\thanks{This % file (\texttt{\dtxfile}) has version number \fileversion, last revised @@ -353,10 +358,14 @@ % \end{macrocode} % % ^^A Use the Golden Section as the version number (1.6180339887 4989484820 4586834365) +% \changes{v3.6}{2010/04/19}{Not any more, apparently people does not +% know the numeric value of the golden ration very well} +% +% % Announce the name, option files and version for LaTeX2e files: % \begin{macrocode} %<class>\ProvidesClass{memoir}% -%<class> [2010/02/20 v1.618033988c configurable book, report, article document class] +%<class> [2010/04/19 v3.6 configurable book, report, article document class] %<9pt>\ProvidesFile{mem9.clo}% %<9pt> [2008/01/30 v0.4 memoir class 9pt size option] %<10pt>\ProvidesFile{mem10.clo}% @@ -23707,28 +23716,53 @@ % away in the kernel's \texttt{output} routine. A couple of minor changes are made % to the kernel code. The first is at the beginning where I have added % the \cs{checkoddpage} page checking code. +% \changes{v1.618033988d}{2010/02/26}{fixed twoside -> left marrgin +% bug, reported by Frank Wikstr\"om, on private email} +% In the new margin placement syntax, there is a new syntax: always +% left, in twoside mode. This cannot be implemented using the normal +% marginpar placement controls, so we have to add our own. % \begin{macrocode} \def\@addmarginpar{% \checkoddpage % \end{macrocode} -% Continue with the kernel code. +% Continue with the kernel code. The twocolumn stuff in the new syntax +% scheme is the same as in the kernel. % \begin{macrocode} \@next\@marbox\@currlist{\@cons\@freelist\@marbox \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne \if@twocolumn \if@firstcolumn \@tempcnta\m@ne \fi \else - \if@mparswitch +% \end{macrocode} +% \changes{v1.618033988d}{2010/02/26}{added as a part of the above +% mentioned fix} +% Here we add the new stuff. We make use of the fact that we have +% hidden all the page checking in \verb?\m@mwhich@margin?, and we only +% fire it of if we know \verb?\marginparmargin? have been used (via +% \verb?\ifm@msetmp?). +% \begin{macrocode} + \ifm@msetmp% + % \@tempcnta > 0 => right side of page + % \@tempcnta < 0 => left side of page + \m@mwhich@margin{\m@mmpar@margin}% set left or right margin + \ifmemtortm% + \@tempcnta\@ne\relax% + \else% + \@tempcnta\m@ne\relax% + \fi% + \else% + \if@mparswitch % \end{macrocode} % The next line, reading \\ % \verb?\ifodd\c@page \else\@tempcnta\m@ne \fi? \\ % is where the odd/even page checking is done in the kernel code. I % replace it with my code, and then continue with the kernel. % \begin{macrocode} - \ifoddpage \else \@tempcnta\m@ne \fi - \fi - \if@reversemargin \@tempcnta -\@tempcnta \fi - \fi + \ifoddpage \else \@tempcnta\m@ne \fi% + \fi% + \if@reversemargin \@tempcnta -\@tempcnta \fi% + \fi% + \fi% \ifnum\@tempcnta <\z@ \global\setbox\@marbox\box\@currbox \fi \@tempdima\@mparbottom \advance\@tempdima -\@pageht diff --git a/Master/texmf-dist/source/latex/memoir/mempatch.dtx b/Master/texmf-dist/source/latex/memoir/mempatch.dtx index 0c4d371aa89..10c1e2558d4 100644 --- a/Master/texmf-dist/source/latex/memoir/mempatch.dtx +++ b/Master/texmf-dist/source/latex/memoir/mempatch.dtx @@ -19,7 +19,7 @@ % % % \fi -% \CheckSum{501} +% \CheckSum{496} % % \def\dtxfile{\texttt{mempatch.dtx}} % \def\fileversion{v1.0} \def\filedate{2003/10/04} @@ -69,6 +69,7 @@ % \def\fileversion{v6.0d} \def\filedate{2009/07/12} % \def\fileversion{v6.0e} \def\filedate{2009/07/21} % \def\fileversion{v6.0f} \def\filedate{2009/07/24} +% \def\fileversion{v6.0g} \def\filedate{2010/04/19} % % \title{The LaTeX \Lpack{memoir} class for configurable book % typesetting: Code patches\thanks{This @@ -307,6 +308,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.13 2010/04/19 %% Version 1.12 2009/02/06 %% Version 1.11 2009/01/18 %% Version 1.10 2008/08/23 @@ -325,7 +327,7 @@ % % % \begin{macrocode} -\ProvidesPackage{memhfixc}[2009/02/06 v1.12 nameref/hyperref package fixes for memoir class] +\ProvidesPackage{memhfixc}[2010/04/19 v1.13 nameref/hyperref package fixes for memoir class] % \end{macrocode} % % \begin{macro}{\M@hfixcfinish} @@ -342,65 +344,68 @@ % % \subsection{Patches for nameref} % +% \changes{v1.13}{2010/04/19}{Rewritten to help fix a race condition} +% +% The nameref package changes \cs{@sect} and \cs{label} so we bring +% back the memoir stuff. We have earlier been using +% \verb?\AtBeginDocument? plus \verb?\@ifpackageloaded{nameref}? to +% add our changes to \Lpack{nameref}. But this is not a good solution, +% as \Lpack{hyperref} can delay \Lpack{nameref} loading using +% \verb?\AtBeginDocument{\usepackage{nameref}}? \emph{and} add thiis +% \emph{after} \Lpack{memhfixc} is loaded. A better solution is to use +% \verb?\AtEndPackage?, then it does not matter how far after +% \Lpack{memhfixc} \Lpack{nameref} is loaded. +% +% \changes{v1.13}{2010/04/19}{Code in the next part have been changed +% to match \cs{AtEndPackage}} +% \begin{macrocode} +\AtEndPackage{nameref}{% +% \end{macrocode} + % \begin{macro}{\M@sect} % \begin{macro}{\NR@sectm@m} % The \Lpack{nameref} package~\cite{NAMEREF} fiddles with \cs{@sect} (which memoir replaces -% by \cs{M@sect}). Note that the \Lpack{hyperref} package may call -% \Lpack{nameref} via: -% \verb?\AtBeginDocument{\usepackage{nameref}}? -% \begin{macrocode} -\AtBeginDocument{% - \@ifpackageloaded{nameref}{% nameref loaded - \@ifundefined{NR@sectm@m}{% haven't fiddled with \M@sect - \typeout{Redoing nameref's sectioning} - \let\NR@sectm@m\M@sect - \def\M@sect#1#2#3#4#5#6[#7][#8]#9{% - \setcounter{section@level}{#2}% - \def\@currentlabelname{#7}% - \NR@sectm@m{#1}{#2}{#3}{#4}{#5}{#6}[{#7}][{#8}]{\Sectionformat{#9}{#2}}}% - }% - {% \NR@sectm@m has already been defined - } +% by \cs{M@sect}). +% \begin{macrocode} + \@ifundefined{NR@sectm@m}{% haven't fiddled with \M@sect + \typeout{Redoing nameref's sectioning} + \let\NR@sectm@m\M@sect + \def\M@sect##1##2##3##4##5##6[##7][##8]##9{% + \setcounter{section@level}{##2}% + \def\@currentlabelname{##7}% + \NR@sectm@m{##1}{##2}{##3}{##4}{##5}{##6}[{##7}][{##8}]{\Sectionformat{##9}{##2}}}% + }% + {% \NR@sectm@m has already been defined }% - {% no nameref - } -} % end of \AtBeginDocument - % \end{macrocode} % \end{macro} % \end{macro} % % +% % \begin{macro}{\label} % \begin{macro}{\MNR@label} % The \Lpack{nameref} package replaces \cs{label}, which (which memoir has added to). % Make the memoir addition again. % % \begin{macrocode} -\AtBeginDocument{% - \@ifpackageloaded{nameref}{% nameref loaded - \@ifundefined{MNR@label}{% haven't fiddled with \label - \typeout{Redoing nameref's label} - \let\MNR@label\label - \def\label#1{\@bsphack\begingroup - \protected@edef\@currentlabel{\protect\M@TitleReference - {\@currentlabel}{\M@currentTitle}}% - \MNR@label{#1}% - \endgroup \@esphack}% - \let\MNR@old@caption\@caption - \long\def\@caption#1[#2]#3{% - \MNR@old@caption{#1}[{#2}]{#3}% - \def\@currentlabelname{#2}% - \M@gettitle{#2}% - }% + \@ifundefined{MNR@label}{% haven't fiddled with \label + \typeout{Redoing nameref's label} + \let\MNR@label\label + \def\label##1{\@bsphack\begingroup + \protected@edef\@currentlabel{\protect\M@TitleReference + {\@currentlabel}{\M@currentTitle}}% + \MNR@label{##1}% + \endgroup \@esphack}% + \let\MNR@old@caption\@caption + \long\def\@caption##1[##2]##3{% + \MNR@old@caption{##1}[{##2}]{##3}% + \def\@currentlabelname{##2}% + \M@gettitle{##2}% }% - {% \MNR@label has already been defined - } }% - {% no nameref - } -} % end of \AtBeginDocument - + {% \MNR@label has already been defined + }% % \end{macrocode} % \end{macro} % \end{macro} @@ -410,13 +415,15 @@ % \cs{nameref}, so as not to confuse users, we let \cs{nameref} be % an alias for \cs{titleref}. % \begin{macrocode} -\AtBeginDocument{% - \@ifpackageloaded{nameref}{\let\nameref\titleref}{}% -} - +\DeclareRobustCommand\nameref{\@ifstar{\@mem@titlerefnolink}{\@mem@titleref}} % \end{macrocode} % \end{macro} % +% \begin{macrocode} +}% end of AtEndPackage +% \end{macrocode} + + % % We are done unless the \Lpack{hyperref} package has been loaded % \begin{macrocode} |