[旧版] CASthesis 模板编译的问题
写在前面的话:国科大最新版的模板在这里(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 模板编译的问题的更多相关文章
- CASthesis 模板编译的问题
使用CASthesis模板(https://github.com/xiaoyao9933/UCASthesis,介绍里说这个版本是在ThuThesis的基础上修改的),自带的说明如下. 使用须知 == ...
- [新版] CASthesis 模板编译的问题
国科大官方学位论文latex模板 地址:https://github.com/mohuangrui/ucasthesis 它支持硕士和博士学位论文.博士后出站报告的撰写. 以下是使用记录. 一.撰写全 ...
- 写一个迷你版Smarty模板引擎,对认识模板引擎原理非常好(附代码)
前些时间在看创智博客韩顺平的Smarty模板引擎教程,再结合自己跟李炎恢第二季开发中CMS系统写的tpl模板引擎.今天就写一个迷你版的Smarty引擎,虽然说我并没有深入分析过Smarty的源码,但是 ...
- 迷你版 smarty --模板引擎和解析
http://blog.ipodmp.com/archives/php-write-a-mini-smarty-template-engine/ 迷你版Smarty模板引擎目录结构如下: ① 要开发一 ...
- 【转】【Html】Vuejs2.0学习之二(Render函数,createElement,vm.$slots,函数化组件,模板编译,JSX)
1.Render函数 所以直接来到Render,本来也想跳过,发现后面的路由貌似跟它还有点关联.先来看看Render 1.1 官网一开始就看的挺懵的,不知道讲的是啥,动手试了一下,一开头讲的是Rend ...
- Vuejs2.0学习之二(Render函数,createElement,vm.$slots,函数化组件,模板编译,JSX)
时隔一周多,因为一些别的事情绊住了,下面接着写.中间这段时间也有看官方文档,发现正如他所说90%的基础内容都一样,所以这里直接跳到我比较关注的东东上,要是想看看哪些不一样,可以参考这个http://v ...
- BugkuCTF——wp(旧版)
title: BugkuCTF--wp(旧版) date: 2020-4-25 tags: CTF,比赛 categories: CTF 比赛 Web篇 0x001-web2 解题思路: 1.直接按F ...
- SDKStyle的Framework项目使用旧版项目文件生成的Nuget包遇到的问题
随笔-2021-11-10 SDKStyle的Framework项目使用旧版项目文件生成的Nuget包遇到的问题 简介 C#从NetCore之后使用了新版的项目文件,SDK-Style项目,新版本的项 ...
- Arcgis API For IOS扩展AGSDynamicLayer新旧版API对比
AGSDynamicLayer(ForSubclassEyesOnly) Category Reference Description This category organizes the meth ...
随机推荐
- 解决mac启动springboot项目很慢的问题
1.打开终端输入: hostname 查看电脑名称 2.输入命令修改hosts文件 sudo vi /etc/hosts 3. 在127.0.0.1和::1后边分别增加你的电脑名称 127.0.0.1 ...
- PAT B1026.程序运行时间
AC代码 #include <cstdio> #define CLK_TCK 100 int main() { int C1, C2, C3; scanf("%d%d" ...
- 跑跑卡丁车(dp)
题意:https://www.nitacm.com/problem_show.php?pid=1470 #define IOS ios_base::sync_with_stdio(0); cin.ti ...
- 经验:什么影响了数据库查询速度、什么影响了MySQL性能 (转)
一.什么影响了数据库查询速度 1.1 影响数据库查询速度的四个因素 1.2 风险分析 QPS:Queries Per Second意思是“每秒查询率”,是一台服务器每秒能够相应的查询次数,是对一个特定 ...
- JS 装饰器,一篇就够
更多文章,请在Github blog查看 在 ES6 中增加了对类对象的相关定义和操作(比如 class 和 extends ),这就使得我们在多个不同类之间共享或者扩展一些方法或者行为的时候,变得并 ...
- T100——修改单身栏位,开窗,当前行
PRIVATE FUNCTION axmt500_update_xmdc028() ###更改出货库位 DEFINE l_i INT DEFINE l_index INT DIALOG ATTRIBU ...
- X86逆向15:OD脚本的编写技巧
本章节我们将学习OD脚本的使用与编写技巧,脚本有啥用呢?脚本的用处非常的大,比如我们要对按钮事件进行批量下断点,此时使用自动化脚本将大大减小我们的工作量,再比如有些比较简单的压缩壳需要脱壳,此时我们也 ...
- IntelliJ IDEA 2017.3.2 热加载(Hot Swap)
一.IntelliJ IDEA 自带热加载,修改代码后点击Ctrl + F9即可 缺点:1.Ctrl + F9只对当前类重新编译加载 2.只支持构造代码块的CRUD.方法体内代码修改.资源文件内容的修 ...
- Oracle学习笔记:窗口函数
目录 1.测试数据 2.聚合函数+over() 3.partition by子句 4.order by子句 5.序列函数 5.1 分析函数之 ntile 5.2 分析函数之 row_number 5. ...
- vue学习(2)-过滤器
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...