Skip to content

Commit

Permalink
Fix algorithm display name and line stretch in algorithm environment
Browse files Browse the repository at this point in the history
Updated:
- Algorithm -> 算法
- line stretch was set to 1.5 in the document, not in the class file
  • Loading branch information
T0nyX1ang committed Mar 31, 2020
1 parent a3c2ab3 commit 60a1216
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions WHUBachelor.cls
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
\RequirePackage{tikz, pgfplots} % 绘图
\RequirePackage{fontspec, color, url, array}

\renewcommand{\algorithmcfname}{算法} % 算法两字用中文显示

%%% ---- 数学定理样式 ----- %%%
\theoremstyle{plain}
Expand Down
1 change: 1 addition & 0 deletions pages/chapter4.tex
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ \subsection{算法描述/伪代码}
参考 \href{https://en.wikibooks.org/wiki/LaTeX/Algorithms}{Algorithms},下面是一个简单的示例:

\begin{algorithm}[H]
\setstretch{1.5} % 代码间行距设定
\SetAlgoLined
\KwResult{Write here the result }
initialization\;
Expand Down

0 comments on commit 60a1216

Please sign in to comment.