官网上厚道的都把伪代码排版的 LaTeX2e 包 clrscode3e 给了出来。
为了享受专业完美带来的快感,你需要知道 LaTeX,对于Windows平台,官网建议用 proTeXt。proTeXt 包括了MiKTeX 和 TeXstudio。当然,你只需要下载 proTeXt ,安装时选择将两个软件都装好就行了。
- clrscode3e 包安装:
- 根据自己的安装位置在 C:\Program Files\MiKTeX 2.9\tex\latex\ 文件夹下建立 clrscode3e 文件夹,将 clrscode3e.sty 拷贝进去。
- 运行 Start->All Programs->MiKTeX 2.9->Maintenance (Admin)->Settings (Admin),点击 Refresh FNDB 更新数据库。
- 伪代码排版:
- 运行 Start->All Programs->TeXstudio->TeXstudio,自己可以根据手册稍微熟悉熟悉环境。
- 主要参考 clrscode3e.pdf 手册,生成pdf查看效果。(这里给出我自己敲的 test.tex)。
结果: