写在前面的话:国科大最新版的模板在这里(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 模板编译的问题

    写在前面的话:国科大最新版的模板在这里(https://github.com/mohuangrui/ucasthesis),利用它来写博后出站报告的相关介绍在这里: 本篇博文是针对另一个模板进行介绍的 ...

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

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

  3. C++ Primer 学习笔记_79_模板与泛型编程 --模板编译模型

    模板与泛型编程 --模板编译模型 引言: 当编译器看到模板定义的时候,它不马上产生代码.仅仅有在用到模板时,假设调用了函数模板或定义了模板的对象的时候,编译器才产生特定类型的模板实例. 一般而言,当调 ...

  4. vue模板编译

    Vue 的模板编译是在 $mount 的过程中进行的,在 $mount 的时候执行了 compile 方法来将 template 里的内容转换成真正的 HTML 代码. complie 最终生成 re ...

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

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

  6. smarty 模板编译和变量调节器 模板引入

    <?php require './smarty/Smarty.class.php'; $sm = new Smarty; //$sm->force_compile = true; $sm- ...

  7. es6实现简单模板编译

    现在有各种框架,其中一个主要模块就是关于template.最火的vue.react等框架,在这一块上也是是下足了功夫.我也想写一个自己的模板编译工具,所以就做了个简单的实现,主要是使用es6的反引号编 ...

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

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

  9. [Vue源码]一起来学Vue模板编译原理(一)-Template生成AST

    本文我们一起通过学习Vue模板编译原理(一)-Template生成AST来分析Vue源码.预计接下来会围绕Vue源码来整理一些文章,如下. 一起来学Vue双向绑定原理-数据劫持和发布订阅 一起来学Vu ...

随机推荐

  1. Bootstrap Affix(附加导航(Affix)插件的用法)

    原文网址:http://www.runoob.com/bootstrap/bootstrap-affix-plugin.html Bootstrap 附加导航(Affix)插件 附加导航(Affix) ...

  2. 使用AFNetWorking读取JSON出现NSCocoaErrorDomain Code=3840的解决方法

    最近在使用AFNetworkWorking读取JSON时,出现了NSCocoaErrorDomain Code=3840的错误.这种错误应该是服务器端返回JSON格式不对造成的.通过Google搜到这 ...

  3. Configuring Network in CentOS 6.3 Virtual Box + Screenshots

    Configuring Network in CentOS 6.3 Virtual Box + Screenshots Posted: May 23, 2013 in Uncategorized Ta ...

  4. 前端 JS POST提交

    /*点击事件*/ function deleteExportItemAndEportUser(id) {    post("deleteExportItemAndEportUser" ...

  5. php变量赋值给js

    1 2 3 4 5 6 7 8 $(document).ready(function(){                 <?php $f="'name'"?>    ...

  6. jQuery EasyUI教程之datagrid应用(三)

    今天继续之前的整理,上篇整理了datagrid的数据显示及其分页功能 获取数据库数据显示在datagrid中:jQuery EasyUI教程之datagrid应用(一) datagrid实现分页功能: ...

  7. 在windows上搭建react-native的android环境

    参考文档: http://facebook.github.io/react-native/docs/getting-started.html http://reactnative.cn/docs/0. ...

  8. Ember.js入门教程、博文汇总

    第一章 对象模型 Ember.js 入门指南——类的定义.初始化.继承 Ember.js 入门指南——类的扩展(reopen) Ember.js 入门指南——计算属性(compute properti ...

  9. js基础:函数表达式和函数声明

    函数表达式和函数声明的区别.实际上,解析器在向执行环境中加载数据是,对函数表达式和函数声明并非一视同仁.解析器会率先读取函数声明,并使其在执行任何代码之前可用.而函数表达式,则必须等到解析器执行到它所 ...

  10. mybatis入门_配置文件的配置

    一.全局配置文件配置 1.1 properties标签 Properties标签可以用来加载配置文件.例如,我们可以将数据库的连接信息放入到一个配置文件(db.properties中..) 下为db. ...