1.安装源里的texlive-xetex
代码:sudo apt-get install texlive-xetex2.安装源里的texmaker
代码:sudo apt-get install texmaker
让管理器自己装相关包及依赖去吧。
3.根据需要可以安装
texlive-math-extra
texlive-science
texlive-bibtex-extra
latex-beamer
4.让texmaker可以用xelatex(xetex的编译命令是xelatex)(ps,其实用latex也要配置的)
打开texmaker ,Options,Configure Texmaker
附件:
![[转载]ubuntu 10.04下 tevlive-xetex 、texmaker 、ctex宏包 安装成功 - kayneo - Kayneo 最天使~ [转载]ubuntu 10.04下 tevlive-xetex 、texmaker 、ctex宏包 安装成功 - kayneo - Kayneo 最天使~](http://img.bimg.126.net/photo/SdGxbA5ElYFIgRvDqzNWGQ==/3976396996008483740.jpg)
options.png [ 34.72 KiB | 被浏览 913 次]
Quick Build 一栏里,选中user那一项,在命令里添加
代码:xelatex -interaction=nonstopmode%.tex|
命令最后有个“|”
附件:
![[转载]ubuntu 10.04下 tevlive-xetex 、texmaker 、ctex宏包 安装成功 - kayneo - Kayneo 最天使~ [转载]ubuntu 10.04下 tevlive-xetex 、texmaker 、ctex宏包 安装成功 - kayneo - Kayneo 最天使~](http://img.bimg.126.net/photo/_BpzXyGyts7LvKACUY2_KQ==/4003981543726120081.jpg)
quickbuild.png [ 66.01 KiB | 被浏览 913 次]
Quick Build 下面一栏 Editor 中
Editor Font Encoding 选UTF8 (这是latex也要配置的部分)
* 使用texmaker的时候,F1(Quick Build )是xelatex,F2是latex, F6是PDFLatex,F7是View PDF。
5.安装ctex包
方法在这里: http://code.google.com/p/ctex-kit/wiki/CTeXPackage
但是texmf目录不止一个,到底该把ctex装在哪里?
首先 ctex 要装/texmf/tex/latex/这么一串路径里,搜索xcolor文件夹的位置,选那个/texmf/tex/latex/xcolor的路径。我自己是在/usr/share/texmf/tex/latex/
然后进入该目录
代码:sudo svn checkouthttp://ctex-kit.googlecode.com/svn/trunk/ctex
如果没装svn,根据命令错误提示,装上subversion后,再做上面一步。
代码:sudo apt-get install subversion
装好ctex后,进入ctex目录更新
代码:cd ~/texmf/tex/latex/ctex
sudo svn update
然后刷新(其实我也不知道刷新的ls-R到底是什么)
代码:sudo texhash
6. 试验字体
因为系统既没有winfont也没有adobefont,所以让ctex包不要用预先设定的字体
代码:\documentclass[UTF8,nofonts]{ctexart}
在texmaker写个 test.tex 文件,英文系统默认,中文用微米黑字体。
代码:\documentclass[UTF8,nofonts]{ctexart}
\setCJKmainfont{WenQuanYi Micro Hei} %中文为wqy 微米黑字体
\begin{document}
中文
English Test. 插入中文字,看看zh如何? This is a simple template for a
XeLaTeX document using the article class, with the fontspec packageto
easily select fonts.
\end{document}
按F1试试
---------------------------------------------------------------------------------------------------------------------------
这里的更新不是必须的,只是更新了之后,tex的中文处理会更好。
8.更新
源里的xeCJK.sty太老了 还是Version 2.3.10(30-Sept-2009)。ctex-kit上有最新的xecjk版本。顺便学习下ctex-kit的svn用法。
来到ctex-kit http://code.google.com/p/ctex-kit/
点击source标签页
点击trunk的下拉箭头,找到想要文件位置。我们要xeCJK,位置是 引用:http://code.google.com/p/ctex-kit/source/browse/#svn/trunk/xecjk/tex/xelatex/xecjk
附件:
![[转载]ubuntu 10.04下 tevlive-xetex 、texmaker 、ctex宏包 安装成功 - kayneo - Kayneo 最天使~ [转载]ubuntu 10.04下 tevlive-xetex 、texmaker 、ctex宏包 安装成功 - kayneo - Kayneo 最天使~](http://img.bimg.126.net/photo/B-HsJJwRT-NURj8fMlfJZA==/4566650022170722113.jpg)
ctex-kit.jpg [ 27.61 KiB | 被浏览 821 次]
我们只要在自己的/tex/xelatex/目录下添加xecjk即可。如果想添加doc的内容也可以。但是source文件夹的内容xeCJK.dtx、xeCJK.ins我在kubuntu下没找到旧的。
搜索自己xelatex的位置(或者xeCJK.sty的位置,这样更简单),选那个非doc目录下的。(doc是文档文件夹)比如/usr/share/texmf-texlive/tex/xelatex
进入xelatex目录
把原来的xecjk或者xeCJK.sty删了
终端输入
代码:sudo svn checkouthttp://ctex-kit.googlecode.com/svn/trunk/xecjk/tex/xelatex/xecjk
完成后,进入xecjk文件夹更新(其实刚装完已经是最新的了,但以后也许需要)
代码:sudo svn update
更新完自然要刷新
代码:sudo texhash
<script type="text/javascript" id="wumiiRelatedItems"> </script>