¶ 安装texlive
在Deepin上测试通过:
texlive-extra-utils: texdef |
¶ 下载模板
https://gitee.com/jingxuanyang/hitszthesis
¶ 配置vscode
我装了这几个插件
ctrl+s就可以自动编译,不需要命令行。
¶ 编译
make all |
如果要用vscode的话,要把main.tex
里的
% !TEX program = XeLaTeX |
改成
% !TEX program = xelatex |
否则vscode会报错:Recipe terminated with fatal error: spawn XeLaTeX ENOENT.
,因为linux是大小写敏感的。
¶ 添加.gitignore
*.sty |
这样commit的时候可以不把这些临时文件commit进去。
¶ 参考文献
在google scholar上搜索文献,然后点击引用
选Bibtex
复制下来放到项目根目录下的reference.bib
里
绿色的那个就是自动生成的名字,要引用时cite这个名字就好了
注意更改了reference.bib
之后要
bibtex main |
才会生效。
然后再编译几下main.tex
就好了。
引用misc类型的参考文献可能会报错Unsupported entry type
。参照https://blog.csdn.net/haifeng_gu/article/details/107342684,将misc
改成Online
即可。
¶ 伪代码
hitszthesis的伪代码用的是algorithm2e
包,已经自带了,不需要另外usepackage。
注意algorithm2e里是用\;
来结束一条语句,而不是用\State
来开始一条语句。
algorithm2e教程:
https://blog.csdn.net/yq_forever/article/details/89815562
https://wenda.latexstudio.net/article-5052.html
https://tex.stackexchange.com/questions/522327/how-to-change-the-type-of-vertical-line-in-algorithm-environment-while-minimizin