0
点赞
收藏
分享

微信扫一扫

hitszthesis Linux使用笔记


安装texlive

# texlive-extra-utils: texdef
# latex-cjk-all: Chinese font package
# texlive-fonts-extra: Fonts such as consolas
# evince: PDF reader
sudo apt install

下载模板

​​https://gitee.com/jingxuanyang/hitszthesis​​

安装额外依赖

# texlive-science: siunitx.sty
# latexmk: make clean要用
sudo apt -y install

参考:
​​​https://techoverflow.net/2019/07/30/how-to-fix-latex-error-file-siunitx-sty-not-found-on-ubuntu/​​

配置vscode

我装了这几个插件

hitszthesis Linux使用笔记_git

ctrl+s就可以自动编译,不需要命令行。

编译

make

如果要用vscode的话,要把​​main.tex​​里的

% !TEX program  = XeLaTeX

改成

% !TEX program  = xelatex

否则vscode会报错:​​Recipe terminated with fatal error: spawn XeLaTeX ENOENT.​​,因为linux是大小写敏感的。

添加.gitignore

*.sty
*.aux
*.cfg
*.cls
*.glo
*.gls
*.hd
*.idx
*.ilg
*.ind
*.ist
*.log
*.out
*.pdf
hitszthesis.pdf
main.pdf
*.toc
*.bbl
*.blg
*.synctex.gz
*.thm

这样commit的时候可以不把这些临时文件commit进去。

hitszthesis Linux使用笔记_参考文献_02

参考文献

在google scholar上搜索文献,然后点击引用

hitszthesis Linux使用笔记_参考文献_03

选Bibtex

hitszthesis Linux使用笔记_javascript_04

hitszthesis Linux使用笔记_linux_05

复制下来放到项目根目录下的​​reference.bib​​里

hitszthesis Linux使用笔记_javascript_06

绿色的那个就是自动生成的名字,要引用时cite这个名字就好了

hitszthesis Linux使用笔记_javascript_07

注意更改了​​reference.bib​​之后要

bibtex main

才会生效。

然后再编译几下​​main.tex​​就好了。

hitszthesis Linux使用笔记_linux_08

hitszthesis Linux使用笔记_javascript_09

引用misc类型的参考文献可能会报错​​Unsupported entry type​​​。,将​​misc​​​改成​​Online​​即可。

伪代码

hitszthesis的伪代码用的是​​algorithm2e​​​包,已经自带了,不需要另外usepackage。
注意algorithm2e里是用​​​\;​​​来结束一条语句,而不是用​​\State​​​来开始一条语句。
algorithm2e教程:​​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​​


举报

相关推荐

0 条评论