tex中文论文

来源:互联网 发布:a2淘宝旗舰店是真的吗 编辑:程序博客网 时间:2024/05/20 19:49

配置环境

当然,首先要配置latex的开发环境了:参考之前的http://blog.csdn.net/xmzwlw/article/details/47090393

下载模板

在www.latexstudio.net上可以搜到各大高校的latex模板,一下以清华的学位论文(在ubuntu14.04上实验成功)为例:
latex-studio-search

清华的这个模板(thuthesis)是Ruini Xue维护的,目前CTAN上的发布版是4.8.1 2014-12-09.

github上的是开发板,CTAN上的是发布版,我下载是发布版。

下载的thuthesis压缩包约为1.9M。解压后目录结构为:

├── data│   ├── ack.tex│   ├── appendix01.tex│   ├── chap01.tex│   ├── chap02.tex│   ├── cover.tex│   ├── denotation.tex│   └── resume.tex├── figures│   ├── hello.eps│   ├── hello.fig│   ├── hello.pdf│   ├── thu-fig-logo.eps│   ├── thu-fig-logo.pdf│   ├── thu-lib-logo.eps│   ├── thu-lib-logo.pdf│   ├── thu-text-logo.eps│   ├── thu-text-logo.pdf│   ├── thu-whole-logo.eps│   └── thu-whole-logo.pdf├── main.pdf├── main.tex├── Makefile├── README├── ref│   └── refs.bib├── shuji.pdf├── shuji.tex├── thubib.bst├── thufonts.def├── thuthesis.dtx├── thuthesis.ins├── thuthesis.pdf├── thutils.sty└── zhfonts.py

测试

make distcleanmake all

我下载的版本的Makefile的distclean下有一个小错误:

-@$(RM) $(PACKAGE).pdf $(THESISMAIN).pdf $(SHUJI).pdf

应该改为:

-@$(RM) $(PACKAGE).pdf $(THESISMAIN).pdf $(SHUJIMAIN).pdf

github上的代码已经更正了这个问题。

make all,编译过程出现的问题:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! fontspec error: "font-not-found"! ! The font "SimSun" cannot be found.! ! See the fontspec documentation for further information.! ! For immediate help type H <return>.!...............................................  l.5 ...ldFont={SimHei},ItalicFont={KaiTi}]{SimSun}? 

按H后:

? H|'''''''''''''''''''''''''''''''''''''''''''''''| A font might not be found for many reasons.| Check the spelling, where the font is installed etc. etc.| | When in doubt, ask someone for help!|...............................................? 

往上可以找个出错的位置在thufonts.def:

(/usr/share/texlive/texmf-dist/tex/latex/ctex/cfg/ctex.cfg) (./thufonts.defkpathsea: Running mktextfm SimSun/ICU/usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map source abbreviation I for ICU./usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update /usr/share/texlive/texmf-dist/fonts/map/fontname/special.map?mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ICUThis is METAFONT, Version 2.718281 (TeX Live 2013/Debian)kpathsea: Running mktexmf ICU! I can't find file `ICU'.<*> \mode:=ljfour; mag:=1; nonstopmode; input ICUPlease type another input file name! Emergency stop.<*> \mode:=ljfour; mag:=1; nonstopmode; input ICUTranscript written on mfput.log.grep: ICU.log: No such file or directorymktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ICU' failed to make ICU.tfm.kpathsea: Appending font creation commands to missfont.log.

或者

grep -rn "ldFont={SimHei},ItalicFont={KaiTi}]{SimSun}"

也可以找到出错的问题:

thuthesis.dtx:579:% \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}thufonts.def:5:\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}

这里找到出错位置其实不重要,因为明显就是缺少字体,而且使用的是CJK导致的。

解决中文问题

sudo apt-get install latex-cjk-all

待续

0 0
原创粉丝点击