% \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
%
%----- 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.
%
%<+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
% \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@%
}
% \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