From 186f3b71b8a91304267b9b90ce926c2049cdcac5 Mon Sep 17 00:00:00 2001 From: mdw Date: Fri, 7 Nov 2003 11:32:53 +0000 Subject: [PATCH] Numbering-within macros added. --- strayman.dtx | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/strayman.dtx b/strayman.dtx index 0e5d830..57f8e7c 100644 --- a/strayman.dtx +++ b/strayman.dtx @@ -1,6 +1,6 @@ % \begin{meta-comment} % -% $Id: strayman.dtx,v 1.3 2003/09/06 11:25:28 mdw Exp $ +% $Id: strayman.dtx,v 1.4 2003/11/07 11:32:53 mdw Exp $ % % Document class for Straylight manuals % @@ -9,6 +9,9 @@ %----- Revision history ----------------------------------------------------- % % $Log: strayman.dtx,v $ +% Revision 1.4 2003/11/07 11:32:53 mdw +% Numbering-within macros added. +% % Revision 1.3 2003/09/06 11:25:28 mdw % Various tweaks. % @@ -60,7 +63,7 @@ %<+strayman> [2003/09/04 1.10 Straylight document class] % \end{meta-comment} % -% \CheckSum{2888} +% \CheckSum{2934} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -401,7 +404,7 @@ % \begin{macrocode} \renewcommand\normalsize{% %<*8pt> - \@setfontsize\normalsize\@viiipt\@xpt% + \@setfontsize\normalsize\@viiipt{9.6\p@}% \abovedisplayskip8\p@\@plus2\p@\@minus4\p@% \abovedisplayshortskip\z@\@plus3\p@% \belowdisplayshortskip6\p@\@plus3\p@\@minus3\p@% @@ -1700,6 +1703,47 @@ } % \end{macrocode} % +% \subsection{Numbering things} +% +% \begin{macro}{\numberwithin} +% +% Does the obvious thing. Optional argument gives numbering style. +% +% \begin{macrocode} +\def\numberwithin{\@testopt\nw@i\arabic} +\def\nw@i[#1]#2#3{% + \@addtoreset{#2}{#3}% + \expandafter\xdef\csname the#2\endcsname{% + \expandafter\noexpand\csname the#3\endcsname.% + \noexpand#1{#2}}% +} +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\removefromreset} +% +% Does the obvious thing. +% +% \begin{macrocode} +\def\removefromreset#1#2{% + \begingroup% + \def\@tempa{#1}% + \toks@{}% + \def\@elt##1{% + \def\@tempb{##1}% + \ifx\@tempa\@tempb% + \else\toks@\expandafter{\the\toks@\@elt{##1}}% + \fi% + } + \csname cl@#2\endcsname% + \expandafter\xdef\csname cl@#2\endcsname{\the\toks@}% + \endgroup% +} +% \end{macrocode} +% +% \end{macro} +% % \subsection{Enumerated lists} % % We busily redefine all the counters for enumerated lists, and how to -- 2.11.0