Loading data/chap02.tex +13 −6 Changes for data/chap02.tex: 13 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -236,18 +236,25 @@ class HelloWorldApp { $r\leftarrow r+1$\;} \end{algorithm} \begin{algorithm} \caption{SumExample} \label{algo:sample-pseudocode2} \KwResult{$s$} $s\leftarrow 0$ \; $s\leftarrow 0$ \Comment*[r]{这是默认多行注释} \Comment{这是默认独占一行的注释} \SetNoFillComment % \Comment{这是在取消独占一行后的注释} \SetFillComment \Comment{这是恢复独占一行的注释} % \LeftComment{左对齐} \ForEach{$i\in [1, 100]$}{ \If{$i\% 3= 0$}{ $s\leftarrow s+i$ \; }\ElseIf{$i\%3=1$}{ \Break \; \uIf{$i\% 3= 0$}{ $s\leftarrow s+i$ \SingleComment*[r]{这是单行注释,一个没有end的if} }\uElseIf{$i\%3=1$}{ \Break \TriComment*{这是三角形的单行注释,一个没有end的else if} }\Else{ \Continue \; \Continue \Comment*[r]{这是超长多行注释,关于伪代码的if-then-else详细查看https://texdoc.org/serve/algorithm2e/0的10.4} } } \Return{s} \; Loading sustech-setup.tex +3 −2 Changes for sustech-setup.tex: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ % 输出格式 % 选择打印版(print)或用于提交的电子版(electronic),前者会插入空白页以便直接双面打印 % output = electronic, output = print, % % 文档类型 % 选择开题报告(proposal)、年度考核报告(progress)或学位论文(thesis)【默认值】。 Loading Loading @@ -179,7 +179,8 @@ \SetKw{Break}{break} % 定义算法注释 \SetKwComment{Comment}{/* }{ */} \SetKwComment{SingleComment}{// }{} \SetKwComment{TriComment}{$\triangleright$\ }{} % tabular 扩展命令 \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} % 定义R为表格左右居左,用于自定义表格列宽度 Loading Loading
data/chap02.tex +13 −6 Changes for data/chap02.tex: 13 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -236,18 +236,25 @@ class HelloWorldApp { $r\leftarrow r+1$\;} \end{algorithm} \begin{algorithm} \caption{SumExample} \label{algo:sample-pseudocode2} \KwResult{$s$} $s\leftarrow 0$ \; $s\leftarrow 0$ \Comment*[r]{这是默认多行注释} \Comment{这是默认独占一行的注释} \SetNoFillComment % \Comment{这是在取消独占一行后的注释} \SetFillComment \Comment{这是恢复独占一行的注释} % \LeftComment{左对齐} \ForEach{$i\in [1, 100]$}{ \If{$i\% 3= 0$}{ $s\leftarrow s+i$ \; }\ElseIf{$i\%3=1$}{ \Break \; \uIf{$i\% 3= 0$}{ $s\leftarrow s+i$ \SingleComment*[r]{这是单行注释,一个没有end的if} }\uElseIf{$i\%3=1$}{ \Break \TriComment*{这是三角形的单行注释,一个没有end的else if} }\Else{ \Continue \; \Continue \Comment*[r]{这是超长多行注释,关于伪代码的if-then-else详细查看https://texdoc.org/serve/algorithm2e/0的10.4} } } \Return{s} \; Loading
sustech-setup.tex +3 −2 Changes for sustech-setup.tex: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ % 输出格式 % 选择打印版(print)或用于提交的电子版(electronic),前者会插入空白页以便直接双面打印 % output = electronic, output = print, % % 文档类型 % 选择开题报告(proposal)、年度考核报告(progress)或学位论文(thesis)【默认值】。 Loading Loading @@ -179,7 +179,8 @@ \SetKw{Break}{break} % 定义算法注释 \SetKwComment{Comment}{/* }{ */} \SetKwComment{SingleComment}{// }{} \SetKwComment{TriComment}{$\triangleright$\ }{} % tabular 扩展命令 \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} % 定义R为表格左右居左,用于自定义表格列宽度 Loading