From e653827afc6da3afa28061df9f8591b974053b5f Mon Sep 17 00:00:00 2001 From: mdw Date: Fri, 5 Sep 2003 16:13:14 +0000 Subject: [PATCH] Various minor fettlings. Fix paragraph formatting after programs. More Things. --- crypto.dtx | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/crypto.dtx b/crypto.dtx index 92f381c..3f75c99 100644 --- a/crypto.dtx +++ b/crypto.dtx @@ -1,6 +1,6 @@ % \begin{meta-comment} % -% $Id: crypto.dtx,v 1.1 2002/02/03 20:49:03 mdw Exp $ +% $Id: crypto.dtx,v 1.2 2003/09/05 16:13:14 mdw Exp $ % % Typesetting crypto papers % @@ -9,6 +9,10 @@ %----- Revision history ----------------------------------------------------- % % $Log: crypto.dtx,v $ +% Revision 1.2 2003/09/05 16:13:14 mdw +% Various minor fettlings. Fix paragraph formatting after programs. More +% Things. +% % Revision 1.1 2002/02/03 20:49:03 mdw % Checkin for new build system. % @@ -41,7 +45,7 @@ %<+package> [2001/09/16 1.0 Crypto typesetting] % \end{meta-comment} % -% \CheckSum{215} +% \CheckSum{245} %% \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 @@ -100,7 +104,7 @@ % table~\ref{tab:kw}. The typsetting of these is done by the |\kw| command, % which usually sets its argument in text bold face, but can be redefined. % The standard definition uses |\xspace| so that you don't need to remember -% to say \verb*+\ *+ after a keyword command. +% to say \verb*+\ + after a keyword command. % \begin{table} % \centering % \def\row#1{\texttt{\string#1} & #1 \\} @@ -122,12 +126,17 @@ % \row\TO % \row\ABORT % \row\PARSE +% \row\NEW % \row\AS % \end{tabular} % \caption{Keywords available for algorithm typesetting} % \label{tab:kw} % \end{table} % +% \DescribeMacro\ind +% Within a \env{program} environment, the |\ind| command shunts the indent +% level 1\,em to the right. +% % \DescribeMacro\gets % \DescribeMacro\getsr % \DescribeMacro\inr @@ -173,10 +182,11 @@ % \DescribeMacro\Adv % \DescribeMacro\InSec % \DescribeMacro\Expt +% \DescribeMacro\Game % \begin{synshorts} % Some standard `things' are provided: "\\Succ{""}{""}", -% "\\Adv{""}{""}", "\\InSec{""}", and -% "\\Expt{""}{""}". +% "\\Adv{""}{""}", "\\InSec{""}", +% "\\Expt{""}{""}", and "\\Game{""}{""}". % \end{synshorts} % % \DescribeMacro\G @@ -274,15 +284,17 @@ \def\FOREACH{\kw{for\,each}} \def\FROM{\kw{from}} \def\IN{\kw{in}} -\def\TO{\kw{in}} +\def\TO{\kw{to}} \def\ABORT{\kw{abort}} \def\PARSE{\kw{parse}} \def\AS{\kw{as}} +\def\NEW{\ifmmode\mathop{\kw{new}}\else\kw{new}\fi} % \end{macrocode} % % \begin{environment}{program} % \begin{macro}{\next} % \begin{macro}{\newline} +% \begin{macro}{\ind} % % Now for the \env{program} environment and its associated twiddling. This % is actually a little fiddly. @@ -298,6 +310,9 @@ \@tempswatrue\ifvmode\@tempswafalse\fi% \def\next{\program@end\vrule\program@begin}% \def\newline{\program@endline\medskip\program@startline}% + \def\ind{\quad\=\+\kill}% + \ifdim\topsep<\parskip\topsep\parskip\fi% + \ifdim\@topsepadd<\z@\@topsepadd\z@\fi% \begingroup\trivlist% \advance\@topsep-\parskip\advance\@topsepadd-\parskip\item% \program@startline% @@ -312,7 +327,7 @@ % \begin{macrocode} \def\endprogram{% \program@endline\endtrivlist\endgroup% - \if@tempswa\noindent\fi\@ignoretrue% + \if@tempswa\@endparenv\fi\@ignoretrue% } % \end{macrocode} % @@ -347,7 +362,7 @@ \setbox\z@\lastbox\unskip\unskip\unskip\setbox\z@\lastbox\unskip% \endgroup% \prevdepth-\@m\p@% - \@startfield\strut% + \@startfield\strut\ignorespaces% } % \end{macrocode} % @@ -379,6 +394,7 @@ % % \end{macro} % \end{macro} +% \end{macro} % \end{environment} % % \subsection{Other stuff} @@ -388,9 +404,10 @@ % \begin{macro}{\Adv} % \begin{macro}{\InSec} % \begin{macro}{\Expt} +% \begin{macro}{\Game} % % Typesetting |\Thing| is easy. This acts as a style hook for the rest of -% these things.. +% these things. % % \begin{macrocode} \def\Thing#1#2#3{\text{\normalfont\bfseries#1}^{\text{\normalfont#2}}_{#3}} @@ -403,6 +420,7 @@ \def\Adv{\Thing{Adv}} \def\InSec#1{\Thing{InSec}{#1}{}} \def\Expt{\Thing{Expt}} +\def\Game{\Thing{Game}} % \end{macrocode} % % \end{macro} @@ -410,6 +428,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\G} % -- 2.11.0