Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

算法伪代码关键字翻译 #50

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
!.gitignore
*.swp

node_modules/
Expand Down
22 changes: 22 additions & 0 deletions docs/chap04.tex
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ \section{公式}
\end{align}

\section{算法流程图}

详细用法请搜索algorithm2e包文档。本样式中使用了经过修改的algorithm2e包以支持中文关键字。默认启用onelanguage参数,使用英文的命令。伪代码的关键字,如for, if, while等,默认全部翻译为中文。如不需翻译英文关键字而保留“输入”、“输出”、“算法”等的翻译,可在main.tex中的documentclass命令中加上algo-cn-nokw参数;如果完全不需要翻译,则使用algo-en参数。

\label{sec:algorithm}
\begin{algorithm}[h]
\KwIn{$m$个训练样本}
Expand Down Expand Up @@ -338,4 +341,23 @@ \subsection{列表的使用}
\item 加脚注\footnote{测{\zihao{-5}试一下}脚注和URL \url{http://cs231n.github.io/transfer-learning/}}
\end{enumerate}

\subsection{引用}

可以如此引用定理、算法、图片、章节等等:

\begin{itemize}
\item \autoref{the:example-theorem-sysu-thesis}
\item \autoref{algo:sgd}
\item \autoref{fig:example-figure}
\item \autoref{sec:font:subsection:subsub}
\end{itemize}

如果不需要自动添加“定理”、“算法”、“图”、“章”等字样:

\begin{itemize}
\item \ref{the:example-theorem-sysu-thesis}
\item \ref{algo:sgd}
\item \ref{fig:example-figure}
\item \ref{sec:font:subsection:subsub}
\end{itemize}

Binary file modified main.pdf
Binary file not shown.
Loading