diff options
author | Karl Berry <karl@freefriends.org> | 2007-04-02 18:56:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-04-02 18:56:09 +0000 |
commit | 1cbafd8ef1fa365f1207483902259e8dd4fdc85e (patch) | |
tree | 569a26b5c2627cb2a407a0f627dcc4d9851d1773 /Master/texmf-dist/tex/latex | |
parent | 91f4ebbb815ff520227e84dc308d17d34a5226c7 (diff) |
clrscode update (29mar07)
git-svn-id: svn://tug.org/texlive/trunk@4094 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-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}} |