X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw-algo.tex;h=e356ef4f6f3f47ac42f697b1a89a916f36bfd82f;hb=28ba27063e52a4bed4934a451bff826f2da40659;hp=cb65f042bdcf0b74d74f59e210d4dbc168277705;hpb=1b2fdb338bf50410001853b35d05f5883bd9b076;p=ucwmac.git diff --git a/ucw-algo.tex b/ucw-algo.tex index cb65f04..e356ef4 100644 --- a/ucw-algo.tex +++ b/ucw-algo.tex @@ -7,7 +7,7 @@ % \algo{name of the algorithm}\algalias{a longer name} % \algin input description % \:step -% \:step +% \:step \cmt{comment} % \::[identifier]nested step % \:::yet more nested step % \algout output description @@ -59,6 +59,7 @@ \inititemize \let\:=\algoitem \def\={\leftarrow} + \let\cmt=\algcmt \itemcount=0 } @@ -88,3 +89,7 @@ % Algorithm name in text or in a formula \protected\def\alg#1{\leavevmode\hbox{\csc #1}} + +% Comments +\def\algcmt#1{\unskip~~\hfill\fullcmt{#1}\ignorespaces} +\def\fullcmt#1{{$\triangleleft$\hskip0.5em\it #1}}