MacTeX 下设置 CTeX 默认中文字体
来源:互联网 发布:王珊 数据库 编辑:程序博客网 时间:2024/04/27 13:28
1. 遇到问题
这回找到一些report/thesis/开题报告的模版,主要是中文的。
Why can’t I compile the simplest TeX file of only 6 lines?
This combination of packages is attempting to load the
xeCJK
package twice: once on line 11 ofctex-xecjk-engine.def
from thectex
package, and then again on line 43 ofxeCJK-listings.sty
from the listings package. The clash you are getting is that the options are different in each case (the first one specifies [BoldFont,normalindentfirst] while the second gives no options).
始终遇到如下错误:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "[SIMKAI.TTF]" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
看起来是个很普遍的错误,
- Solution to “[SIMKAI.TTF] cannot be found” error
- texlive2013升级为texlive2014后中文字体问题
- 安装TeX及中文支持
解决方法也很一致:
- 修改/usr/local/texlive/2013/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def 文件,把其中的 [SIMKAI.TTF] , [SIMFANG.TTF] 改成KaiTi, FangSong就可以了
结果怎么都不行!!
2. What happened???
显然在TexLive 2012之前用的是以上字体名字。
MacTeX 下设置 CTeX 默认中文字体就用的正确的字体变量名。
- 修改/usr/local/texlive/2013/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def 文件,把其中的 [SIMKAI.TTF] , [SIMFANG.TTF] 改成STKaiti, STFangsong就可以了
3. 扩充阅读
在Mac下使用LaTeX的中文字体 提到了Mac下的 系统的“字体册”,英文版叫Font Book。但并不是照文章里说的用 “PostScript名字” 就可以了!!
要找到真正的变量名,要用fc-list,比如MacTex 2010 XeLatex中文支持,然后找类似 STKaiti:style=regular 的字串!!
比如在我的机器上(TexLive2014, ML 10.9.5), 普通宋体既不是Songti,也不是STSongti,而是STSong,坑爹啊~~~
当上面的文章又说 因此需将"[SIMKAI.TTF]"改为“KaiTi_GB2312”
,而且 适用于MacTex 2013和MacTex 2014
— 偶滴神啊~~~
4. 完整学习
有空还是完整学习一下CTex的知识
- CTEX : HomePage
- TeX 基本知识 对了解整个TeX的历史和各个包的区别/作用也很有帮助
- MacTeX 下设置 CTeX 默认中文字体
- LaTeX技巧001:ctex下使用其他中文字体
- Ctex CJK 中文字体颜色深浅解决方案
- CTeX 2.9中给CJK添加中文字体
- ubuntu 下安装 texlive 并设置 ctex 中文套装
- fedora 11 英文环境下中文字体设置
- ubuntu下matplotlib中文字体的设置
- windows下emacs的中文字体设置
- Win7下Eclipse 3.7 - 4.2 的默认中文字体大小
- Linux操作系统下Wine程序的中文字体设置
- mac系统下为emacs设置中文字体,解决乱码问题
- ubuntu 64位下安装 texlive2015 并设置 ctex 中文套装
- WIndows平台下使用CTex
- CTEX
- Ubuntu下设置默认java
- Ubuntu下设置默认终端
- iis下设置默认页
- CentOS下设置默认JDK
- 荷兰,here I am
- php将session保存到数据库的类实例
- Android Api Demos登顶之路(100)View-->AutoComplete:Contacts
- C++基础编程----4.2运算符
- 指针转型
- MacTeX 下设置 CTeX 默认中文字体
- *LeetCode-Read N Characters Given Read4
- 进程与线程的区别
- 一周随记
- 使用Node.js+Socket.IO搭建WebSocket实时应用
- 蛇形填数
- Java中有关Null的9件事
- 文章标题
- React-Native进行时(三)--JS网络请求解析