diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/clrscode')
-rw-r--r-- | Master/texmf-dist/tex/latex/clrscode/clrscode.sty | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/clrscode/clrscode.sty b/Master/texmf-dist/tex/latex/clrscode/clrscode.sty index 300a8745128..02061ae12e2 100644 --- a/Master/texmf-dist/tex/latex/clrscode/clrscode.sty +++ b/Master/texmf-dist/tex/latex/clrscode/clrscode.sty @@ -2,8 +2,14 @@ % clrscode.sty -% $Id: clrscode.sty,v 1.5 2003/11/11 15:45:37 thc Exp $ +% $Id: clrscode.sty,v 1.7 2007/03/29 19:12:30 thc Exp $ % $Log: clrscode.sty,v $ +% Revision 1.7 2007/03/29 19:12:30 thc +% Added date and version information to the \ProvidesPackage command. +% +% Revision 1.6 2005/07/14 20:55:00 thc +% Added a definition for \numref. Thanks to Matt Suder(?) and Johan Gade. +% % Revision 1.5 2003/11/11 15:45:37 thc % Removed a macro that is no longer needed. % @@ -93,7 +99,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ProvidesPackage{clrscode} +\ProvidesPackage{clrscode}[2007/03/29 v1.7 format pseudocode] \usepackage{latexsym} % needed for \Comment symbol % Commands for typesetting constants, procedure names, identifiers, and @@ -259,6 +265,13 @@ \ifnumberedline\thecodelinenumber\fi\'\Indent% } +\providecommand{\numref}[1]{% + \@ifundefined{r@#1}{000}{% + \expandafter\expandafter\expandafter\@firstoftwo + \csname r@#1\endcsname + }% +} + % \setlinenumber sets the line number to its argument \newcommand{\setlinenumber}[1]{\setcounter{codelinenumber}{\numref{#1}}% \addtocounter{codelinenumber}{-1}} |