写在前面的话:国科大最新版的模板在这里(https://github.com/mohuangrui/ucasthesis),利用它来写博后出站报告的相关介绍在这里

本篇博文是针对另一个模板进行介绍的,以下内容仅可作为参考。

使用CASthesis模板(https://github.com/xiaoyao9933/UCASthesis,介绍里说这个版本是在ThuThesis的基础上修改的),自带的说明如下。

使用须知
========
1. 本模板需使用texlive 2014或以上版本编译。
2. 确定系统中存在xfig,transfig依赖(Mac OSX 系统可尝试通过port进行安装)。
3. 确保当前系统已安装配置SimSun,SimHei,KaiTi,FangSong字体,如果您使用的是Linux和Mac OSX系统,请自行
以“fc-cache 添加 win 字体”为关键字通过Google搜索解决方案)。
备用方案:如果您并不想安装其他字体,而仅使用系统自带的兼容字体(不建议这样做),则可利用以下命令交互式地完成字体配置
python zhfonts.py 使用方法
========
1. 编译示例文档
xelatex main
bibtex main
xelatex main
xelatex main 说明:也可以使用 pdflatex/latex+dvipdfmx 生成文档。 2. 编写自己的论文
参考示例文档:
main.tex 主控文档
data/ 论文具体内容
ref/ 参考文献目录
figures/ 图片目录

直接编译自带的文件 main.tex:  xelatex main , 出现了一些小问题,现在把它们的解决办法记录下来。

根据上面的“使用须知“逐条核对。

1. 软件和系统环境:

$ uname -a
Linux 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux $ latex -v
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with xpdf version 3.04

2. xfig,transfig依赖确认

$ rpm -qa | grep -i xfig

$ rpm -qa | grep -i transfig

$ sudo yum install xfig     

$ rpm -qa | grep -i xfig
xfig-3.2.-.a.el6.x86_64
xfig-common-3.2.-.a.el6.x86_64 $ rpm -qa | grep -i transfig
transfig-3.2.-.el6.x86_64

2.test 尝试编译 main.tex 文件,结果报错如下,这表示缺失字体,使用须知中的第3步必不可少。

$ xelatex main
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(./ucasthesis.cls
Document Class: ucasthesis 2012/07/28 4.8dev University of Chinese Academy of S
ciences Thesis Template
(/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/ctex/ctexbook.cls
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/l3unicode-data.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def))
Document Class: ctexbook 2015/05/16 v2.0.2 Chinese adapter for class book (CTEX
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ms/everysel.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/ctex/config/ctexopts.cfg)
*************************************************
* ctex warning: "deprecated-option"
*
* Option `cs4size' is deprecated.
* Option `zihao=-4' is set.
*************************************************
*************************************************
* ctex warning: "deprecated-option"
*
* Option `nocap' is deprecated.
* Option `scheme=plain' is set.
*************************************************
*************************************************
* ctex warning: "deprecated-option"
*
* Option `nofonts' is deprecated.
* Option `fontset=none' is set. It is better to use fontset option.
*************************************************
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/bk12.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.st
y) (/usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec-patches.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/tipa/t3enc.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xetex-def/xetex.def))))
(/usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty)
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xunicode/xunicode.sty
*** Reloading Xunicode for encoding 'EU1' ***
) (/usr/local/texlive/2015/texmf-dist/tex/xelatex/xecjk/xunicode-extra.def)
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg))
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/ulem/ulem.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/environ/environ.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/trimspaces/trimspaces.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/cjk/texinput/CJKfntef.sty)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/zhnumber/zhnumber.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/zhnumber/config/zhnumber-utf8.cfg
))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-boo
k.def) (/usr/local/texlive/2015/texmf-dist/tex/latex/ctex/ctex-cs4size.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ctex/config/ctex.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/calc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/txfonts.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/subcaption.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/caption.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/caption3.sty)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/indentfirst.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/paralist/paralist.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/footmisc/footmisc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/cjk/texinput/CJKnumb.sty)
(./fontname.def
*************************************************
* fontspec warning: "script-not-exist"
*
* Font 'SimSun' does not contain script 'CJK'.
************************************************* LaTeX Font Warning: Font shape `EU1/txr/m/n' undefined
(Font) using `EU1/lmr/m/n' instead on input line 2. ) (/usr/local/texlive/2015/texmf-dist/tex/latex/ntheorem/ntheorem.sty
Style `ntheorem', Version 1.33 <2011/08/15>
) (/usr/local/texlive/2015/texmf-dist/tex/latex/tools/array.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/longtable.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/booktabs/booktabs.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/texmf-local/tex/latex/html/url.sty)) Package hyperref Message: Driver (autodetected): hxetex. (/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/color.cfg)) Package hyperref Warning: Option `pdfpagelabels' has already been used,
(hyperref) setting the option has no effect on input line 141. ) (./ucasthesis.cfg) (./ucastils.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/multirow/multirow.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/tabularx.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/diagbox/diagbox.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/pict2e/pict2e.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/pict2e/pict2e.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pict2e/p2e-xetex.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp.sty
`Fixed Point Package', Version 0.8, April 2, 1995 (C) Michael Mehlich
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/defpattern.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-basic.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-addons.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-snap.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-exp.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-trigo.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-pas.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-random.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-eqn.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-upn.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/fp/fp-eval.sty)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/float/float.sty)) (./main.aux
(./data/chap01.aux) (./data/chap02.aux) (./data/ack.aux) (./data/resume.aux))
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/omltxmi.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/omstxsy.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/omxtxex.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/utxexa.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tipa/t3cmr.fd)
ABD: EverySelectfont initializing macros
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/ltcaption.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./main.out) (./main.out) (./data/cover.tex) Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\\' on input line 30. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) \kern -2.00792pt
(hyperref) removed on input line 30. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\lower' on input line 30. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\hbox' on input line 30. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) \kern -1.50562pt
(hyperref) removed on input line 30. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\spacefactor' on input line 30. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\@m' on input line 30. Package hyperref Warning: pdfproducer: xdvipdfmx will use its own setting
(hyperref) instead of the value given on input line 30. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\\' on input line 32. <use "figures/ucaslogo.pdf" >
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/ot1txr.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/utxmia.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/utxsya.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/utxsyb.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/txfonts/utxsyc.fd)
*************************************************
* fontspec warning: "script-not-exist"
*
* Font 'SimSun' does not contain script 'CJK'.
*************************************************
[1] [2] [3] [4] [5] [6] LaTeX Font Warning: Font shape `EU1/TimesNewRoman(0)/m/sc' undefined
(Font) using `EU1/TimesNewRoman(0)/m/n' instead on input line 32. [1] [2] [3] [4] (./main.toc [5])
Underfull \vbox (badness 10000) has occurred while \output is active [6]
(./main.lof) [7] [8] (./main.lot) [9] [10] (./data/chap01.tex Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\let' on input line 7. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\CJK@q' on input line 7. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\let' on input line 7. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\let' on input line 7. LaTeX Font Warning: Font shape `OMS/TimesNewRoman(0)/m/n' undefined
(Font) using `OMS/txsy/m/n' instead on input line 13. Overfull \hbox (5.96889pt too wide) in alignment at lines 88--98
[][]
[1]
Overfull \hbox (2.00749pt too wide) in paragraph at lines 153--173
$[]$ $[]$ Underfull \vbox (badness 10000) has occurred while \output is active [2]
Underfull \hbox (badness 10000) in paragraph at lines 222--222
[]|\EU1/TimesNewRoman(0)/m/n/11.04124 Waxman Underfull \vbox (badness 10000) has occurred while \output is active [3]
Underfull \hbox (badness 10000) in paragraph at lines 337--342 Underfull \vbox (badness 10000) has occurred while \output is active [4]
Underfull \vbox (badness 10000) has occurred while \output is active [5]
Underfull \vbox (badness 10000) has occurred while \output is active [6]
Underfull \vbox (badness 10000) has occurred while \output is active [7])
Underfull \vbox (badness 10000) has occurred while \output is active [8]
(./data/chap02.tex Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\let' on input line 7. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\CJK@q' on input line 7. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\let' on input line 7. Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\let' on input line 7. <use "figures/hello.pdf" > <use "figures/thu-fig-logo.pdf" >
<use "figures/thu-text-logo.pdf" > <use "figures/thu-fig-logo.pdf" >
<use "figures/thu-text-logo.pdf" > LaTeX Warning: `h' float specifier changed to `ht'. LaTeX Warning: `h' float specifier changed to `ht'. <use "figures/thu-whole-logo.pdf" > <use "figures/thu-whole-logo.pdf" >
[9])
Underfull \vbox (badness 10000) has occurred while \output is active [10]
(./main.bbl) (./data/appendix01.tex [11] [12] [13]
Underfull \hbox (badness 10000) in paragraph at lines 103--103
[]|\EU1/TimesNewRoman(0)/m/sc/11.04124 Waxman Underfull \vbox (badness 10000) has occurred while \output is active [14]
<use "figures/thu-lib-logo.pdf" >
Underfull \vbox (badness 10000) has occurred while \output is active [15]
Underfull \vbox (badness 10000) has occurred while \output is active [16]
Underfull \hbox (badness 10000) in paragraph at lines 206--206
[]|\EU1/TimesNewRoman(0)/m/sc/11.04124 Waxman
<use "figures/hello.pdf" > [17]
Underfull \vbox (badness 10000) has occurred while \output is active [18])
[19] [20] (./data/ack.tex) [1] (./data/resume.tex [2]
Underfull \hbox (badness 10000) in paragraph at lines 3--5 Underfull \hbox (badness 10000) in paragraph at lines 9--11 ) [3] [4] (./main.aux (./data/chap01.aux) (./data/chap02.aux) (./data/ack.aux)
(./data/resume.aux))
xdvipdfmx:fatal: pdf_ref_obj(): passed invalid object. Output file removed. LaTeX Font Warning: Some font shapes were not available, defaults substituted. )
(see the transcript file for additional information)
Error 256 (driver return code) generating output;
file main.pdf may not be valid.
Transcript written on main.log.

我曾一度以为是 xdvipdfmx 的问题,去谷歌上搜了一圈,没找到解决办法。后来在水木论坛上的TeX和LaTeX版块提问,才算解决了问题。

可见,有一个能及时互动和反馈的论坛,是多么多么的重要!

3. 安装配置SimSun,SimHei,KaiTi,FangSong字体

首先查询本机已安装的字体,发现这4种字体都已经安装过了,但经水木网友Smoulder指出,SimSun 字体可能安装不对,具体内容在水木论坛的帖子(关于 CASthesis 样例文件编译的问题,请指教)中。

$ fc-list | grep -i SimSun
SimSun\-ExtB:style=Normal,oby?ejné,Standard,Κανονικ?,Regular,Normaali,Normál,
Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=
SimSun:style=$ fc-list | grep -i SimHei
黑体,SimHei:style=Normal,oby?ejné,Standard,Κανονικ?,Regular,Normaali,Normál,Normale,
Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta $ fc-list | grep -i KaiTi
楷体,KaiTi:style=Normal,oby?ejné,Standard,Κανονικ?,Regular,Normaali,Normál,Normale,
Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
华文楷体,STKaiti:style=Regular $ fc-list | grep -i FangSong
仿宋,FangSong:style=Normal,oby?ejné,Standard,Κανονικ?,Regular,Normaali,Normál,Normale,
Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
华文仿宋,STFangsong:style=Regular

原因:找到 fonts.scale 文件,搜索 SimSun 字体为 Adobe 字体,并非 Windows 字体:

vijayab.ttf -misc-simsun-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific

解决办法:重新安装 Windows 字体。

先将 /usr/share/fonts 目录中原有的 Windows+Adobe 字体删除掉,新建文件夹 /usr/share/fonts/chinese/TrueType,再从 C:\indows\Fonts 中拷贝所有的 TrueType 字体到该目录下,具体方法参见 http://waddy.iteye.com/blog/2051496

$ sudo mkdir /usr/share/fonts/chinese/TrueType

$ sudo cp /media/.../Windows/Fonts/*.ttf  /usr/share/fonts/chinese/TrueType

$ sudo cp /media/.../Windows/Fonts/*.TTF  /usr/share/fonts/chinese/TrueType

$ sudo cp /media/.../Windows/Fonts/*.ttc  /usr/share/fonts/chinese/TrueType

$ sudo chmod 755 /usr/share/fonts/chinese/TrueType/*

$ cd /usr/share/fonts

$ sudo mkfontscale

$ sudo mkfontdir

$ sudo fc-cache -fv 

$ reboot # 重启计算机

重新查询 CASthesis 所需要的4种字体,其中,SimSun 字体的结果已经好了,原来这样才是对的,以前都没看出来,还是太菜啊!

$ fc-list | grep -i SimSun
新宋体,NSimSun:style=Regular
SimSun\-ExtB:style=Normal,oby?ejné,Standard,Κανονικ?,Regular,Normaali,Normál,Normale,
Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
宋体,SimSun:style=Regular

4. 重启并再次编译 main.tex,提示字体缺失:“Courier New".

按第3步的办法,去网上下载了这个字体,并安装。再次编译的时候,就不会报这个错误了。

5. 重启并再次编译 main.tex,警告:提示有重复定义的标签,这属于严重错误,必须解决掉。

重复定义的标签名为{sec:bib},在文件 ./UCASthesis-master/data/chap01.tex 中,将其中一个更改即可,习惯上保留参考文献的标签为 \label{sec:bib},那么就改掉另外一个。

\section{章节引用}
\label{sec:eg4cha} % \label{sec:bib} 引用章标题的例子:第\chapterref{cha:china}章(本模板定义的\verb|\chapterref|
命令生成的中文数字方式),第\ref{cha:china}章(默认的阿拉伯数字方式),附录\ref{cha:engorg}。 \section{参考文献}
\label{sec:bib}
当然参考文献可以直接写 bibitem,虽然费点功夫,但是好控制,各种格式可以自己随意改
写。

6. 编译示例文档 main.tex,终于成功啦,好开心!

$ xelatex main
$ bibtex main
$ xelatex main
$ xelatex main
...
Output written on main.pdf ( pages).
Transcript written on main.log.

over.

[旧版] CASthesis 模板编译的问题的更多相关文章

  1. CASthesis 模板编译的问题

    使用CASthesis模板(https://github.com/xiaoyao9933/UCASthesis,介绍里说这个版本是在ThuThesis的基础上修改的),自带的说明如下. 使用须知 == ...

  2. [新版] CASthesis 模板编译的问题

    国科大官方学位论文latex模板 地址:https://github.com/mohuangrui/ucasthesis 它支持硕士和博士学位论文.博士后出站报告的撰写. 以下是使用记录. 一.撰写全 ...

  3. 写一个迷你版Smarty模板引擎,对认识模板引擎原理非常好(附代码)

    前些时间在看创智博客韩顺平的Smarty模板引擎教程,再结合自己跟李炎恢第二季开发中CMS系统写的tpl模板引擎.今天就写一个迷你版的Smarty引擎,虽然说我并没有深入分析过Smarty的源码,但是 ...

  4. 迷你版 smarty --模板引擎和解析

    http://blog.ipodmp.com/archives/php-write-a-mini-smarty-template-engine/ 迷你版Smarty模板引擎目录结构如下: ① 要开发一 ...

  5. 【转】【Html】Vuejs2.0学习之二(Render函数,createElement,vm.$slots,函数化组件,模板编译,JSX)

    1.Render函数 所以直接来到Render,本来也想跳过,发现后面的路由貌似跟它还有点关联.先来看看Render 1.1 官网一开始就看的挺懵的,不知道讲的是啥,动手试了一下,一开头讲的是Rend ...

  6. Vuejs2.0学习之二(Render函数,createElement,vm.$slots,函数化组件,模板编译,JSX)

    时隔一周多,因为一些别的事情绊住了,下面接着写.中间这段时间也有看官方文档,发现正如他所说90%的基础内容都一样,所以这里直接跳到我比较关注的东东上,要是想看看哪些不一样,可以参考这个http://v ...

  7. BugkuCTF——wp(旧版)

    title: BugkuCTF--wp(旧版) date: 2020-4-25 tags: CTF,比赛 categories: CTF 比赛 Web篇 0x001-web2 解题思路: 1.直接按F ...

  8. SDKStyle的Framework项目使用旧版项目文件生成的Nuget包遇到的问题

    随笔-2021-11-10 SDKStyle的Framework项目使用旧版项目文件生成的Nuget包遇到的问题 简介 C#从NetCore之后使用了新版的项目文件,SDK-Style项目,新版本的项 ...

  9. Arcgis API For IOS扩展AGSDynamicLayer新旧版API对比

    AGSDynamicLayer(ForSubclassEyesOnly) Category Reference Description This category organizes the meth ...

随机推荐

  1. commons-lang3依赖下的StringUtils类的isEmpty()方法和isBlank()方法

    isEmpty()方法源码 isBlank()方法源码 测试 import org.apache.commons.lang3.StringUtils; public class main { publ ...

  2. drf的三大认证

    目录 三大认证任务分析 auth组件的认证权限六表 自定义User表分析 源码分析 认证与权限工作原理 源码分析 认证模块工作原理 权限模块工作原理 admin关联自定义用户表 自定义认证.权限类 用 ...

  3. Elastic Search的聚合搜索

    就是使用ES提供的aggs语法结果,使用DSL搜索的语法,实现聚合数据的统计,查询.ES中,如果新增document数据的时候,对应的index和type不存在,则自动创建. 1 准备源数据 PUT ...

  4. postgresql11解压版安装windows

    一.准备安装包 下载地址:https://www.postgresql.org/download/windows/ 二.创建data目录(用于存储数据) 三.进入bin目录执行命令..初始化数据库并设 ...

  5. 10-Perl 循环

    1.Perl 循环一般情况下,语句是按顺序执行的:函数中的第一个语句先执行,接着是第二个语句,依此类推.有的时候,可能需要多次执行同一块代码.编程语言提供了更为复杂执行路径的多种控制结构.循环语句允许 ...

  6. Spring boot data jpa 示例

    一.maven pom.xml文件 <?xml version="1.0" encoding="UTF-8"?> <project xmlns ...

  7. Collections 类和Arrays类常用方法详解

    1:Collections类 max(Collection <? extends T> coll):根据元素的自然顺序,返回给定集合元素中的最大元素 min(Collection < ...

  8. vi/vim 编辑、搜索、查找、定位

    介绍vi/vim 相关命令,主要涉及:编辑.搜索.查找.定位. 分为两个章节,即常用命令  及 键盘图 一.vi/vim常用命令 set nu 显示行号 gg 跳转到文件开头 / 向后搜索 ? 向前搜 ...

  9. EF入门-CRUD操作

    一.EF数据查询假设我们已经定义好了context:private AccountContext db = new AccountContext(); 1.[基本查询] 查询所有var users = ...

  10. Vue-CLI项目汇总

    Vue-CLI 项目搭建 Vue-CLI 项目在pycharm中配置 Vue-CLI 项目中相关操作 Vue-CLI项目中路由传参 Vue-CLI项目-vue-cookie与vue-cookies处理 ...