Latex algorithmic 中添加 comment
时间:2020-01-31 09:47:52
收藏:0
阅读:1241
Latex中算法伪代码的注释方法
需要注意的是下面的代码采用是\usepackage{algorithmic}
而不是\usepackage{algorithm2e}

对应的代码如下:
\STATE?$sum=0$;
\FOR[comment for FOR]{$j=1$?\TO?$100$}
\IF[comment for IF]{$j\%2==1$}
\STATE?$sum=sum+i$; \COMMENT{normal comment}
\ENDIF
\ENDFOR原文:https://www.cnblogs.com/Lewis_Liu/p/latex_comment_2_styles.html
评论(0)