線上編輯網站:over leaf
https://cn.overleaf.com/project
下方可以選擇調整語言
示范代碼:
%! Tex program = xelatex \documentclass[a4paper,12pt]{article} \usepackage{CJK} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{CJK}{UTF8}{gbsn} \begin{algorithm} \floatname{algorithm}{算法} \setcounter{algorithm}{3} \caption{算法名字} \hspace*{0.02in} {\bf Input:} 輸入\\ \hspace*{0.02in} {\bf Output:} 輸出 \begin{algorithmic}[1] \iffalse \fi \State //普通段落 \While {seed count} \State while內容 \EndWhile \Function {score函數名}{$seed, maxScore$} \State 函數內容 \EndFunction \For{i $in$ MAX} \State 循環內容 \EndFor \If {if判斷條件} \State if內容 \Else \State else內容 \EndIf \end{algorithmic} \end{algorithm} \end{CJK} \end{document}
結果展示:
有個不好處就是只能導出PDF,要是能導出三線表的word版本就好了23333333