TeXLive 对于我来说是必须要安装的.
- sudo pacman -S texlive-most
- sudo pacman -S texlive-langcjk
安装过程中显示
texlive-core 的可选依赖
perl: for many useful tools
ruby: for old ConTeXT MkII and epspdf
tk: for texdoctk
python2: for dviasm
ghostscript: for epstopdf, epspdf and other ConTeXt tools
psutils: to manipulate the output of dvips
t1utils: can be useful when installing Type1 fonts
一般 perl, python2 ghostscript 已经安装, 可以用 pacman 安装其他的软件包.
texlive-most 中包含了下面这么多宏包()
pacman -Q -l texlive-core
列出texlive-core 所安装的位置. 默认安装在 /usr/share/texmf-dist/...
安装完成, 可以测试一下, 将下面的代码保存为 test.tex, 然后运行 xelatex test, 即可生成 pdf 文件.
- \documentclass{ctexart}
- \begin{document}
- Hello, haifeng!
- # 你好!
- \end{document}
如果只有英文, 则是没有问题的. 但是要排版中文, 则很可能会出现下面的提示:
- kpathsea: Running mktexmf SimSun
- ! I can't find file `SimSun'.
- <*> ...:=ljfour; mag:=1; nonstopmode; input SimSun
-
- Please type another input file name
- ! Emergency stop.
- <*> ...:=ljfour; mag:=1; nonstopmode; input SimSun
-
- Transcript written on mfput.log.
- grep: SimSun.log: 没有那个文件或目录
- mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input SimSun' failed to make SimSun.tfm.
- kpathsea: Appending font creation commands to missfont.log.
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !
- ! fontspec error: "font-not-found"
- !
- ! The font "SimSun" cannot be found.
- !
- ! See the fontspec documentation for further information.
- !
- ! For immediate help type H .
- !...............................................
此时, 按 x 退出.
解决办法参考
安装字体一文, 主要是修改 /usr/share/texmf-dist/tex/latex/ctex/fontset/ 下面的几个文件.
阅读(3450) | 评论(0) | 转发(0) |