国科大学位latex模板见https://github.com/mohuangrui/ucasthesis,在使用时遇到一些问题,做如下修改。
1. 公式标号问题
在artratex.sty中设置的公式标号为\renewcommand{\theequation}{\thechapter\arabic{equation}},应修改为\renewcommand{\theequation}{\thechapter-\arabic{equation}}
2. 不使用numbers的引用方式,使用authoryear的引用方式
使用原本模板的authoryear的时候会出现各种问题,中文文献在句中引用时变为张三 et al (2005)曾基于…,当作者只有两人时,文献在句末引用无&,也就是说\citep(句末引用)与\citet(句中引用)两种方式不是全正确的,作者超过3人与仅2人也不是全正确,需要修改以下两个文件。
修改gbt7714-author-year.bst
第一步需要修改引用设置FUNCTION {load.config}中的et al人数,#3 'citation.et.al.min :=引用时et al最小应该设置为3人。
第二步修改引用的and设置,自定义一个myand和myetal
FUNCTION {citation.and} { "\myand{\&}" } FUNCTION {citation.et.al} { "{\myetal{" bbl.et.al * "}}" * }修改artratex.sty
在最后需要自定义myand与myetal
\makeatletter % 定义一个“聪明”的 et al. 宏 % 它会根据 natbib 内部的 \ifNAT@swa 开关自动切换 \AtBeginDocument{ \DeclareRobustCommand{\myetal}[1]{% \ifNAT@swa #1% 在 \citep 中,保持原样(英文 et al.,中文 等) \else 等% 在 \citet 中,无论中英,强制显示为 “等” \fi } \DeclareRobustCommand{\myand}[1]{% \ifNAT@swa #1% 在 \citep 中,保持原样 \else 和% 在 \citet 中,无论中英,强制显示为 “和” \fi } } \makeatother3. 图表标题过长不居中,我需要仅修改某图表标题,令其居中,而不需要对模板修改
在这个图表中正文中添加一句:\captionsetup{justification=centering,singlelinecheck=false}
4. 关于bibtex
bibtex默认的英文title除了第一个单词开头大写,其他全小写,所以若希望title有的字母大写,需要用{}将其固定,例如{{Aerosols, Cloud Microphysics, and Fractional Cloudiness}}这样在参考文献中才会保证大写。
中英文文献的author都需要用and连接,比如author ={张三 and 李四},author={ndrews, Timothy and Forster, Piers M.}。