Install Tex Live under Linux and configure the Ctex environment __linux

Source: Internet
Author: User
References:The Tex Live documentation (ISO inside of Tex Live has) Ctex Readme,zhmetrics Readme

Previously installed on Fedora 8 teTeX, but for Ctex support also need to install themselves, after the attempt to reinstall the Tex live better. The following is an introduction to the installation of Tex Live 2010 and the process of configuring the Ctex environment. Using the ISO for Tex live, use ROOT to run./INSTALL-ST-GUI=PERLTK, and then install the default configuration. By default, CJK is installed, make sure that the package is installed. By default, TeX Live is installed under/usr/local/texlive. The following is mainly about the directory composition of Tex. Texmfmain: This will be the/USR/LOCAL/TEXLIVE/2010/TEXMF, the main body level of the configuration files, scripts, documents and so on. Texmfdist:/usr/local/texlive/2010/texmf-dist, the main storage of some distributions of additional additional macro packages, fonts and so on. Texmflocal:/usr/local/texlive/texmf-local, mainly store the user's own add local macro package and font. Texmfhome: ~/.texlive2010/, is where each user has some custom macros and configuration files for themselves. Add the PATH environment variable so that the shell can find the Tex bin. Add the following statement to the ~/.BASHRC (the specific path is changed according to your installation path):
Path=/usr/local/texlive/2010/bin/i386-linux: $PATH; Export PATH
Manpath=/usr/local/texlive/2010/texmf/doc/man: $MANPATH; Export Manpath
Infopath=/usr/local/texlive/2010/texmf/doc/info: $INFOPATH; Export INFOPATH writes the CJK Package test file Cjk.tex, as follows:
/documentclass{article}
/USEPACKAGE{CJK}
/BEGIN{CJK}{UTF8}{GBSN}
/begin{document}
You
/END{CJK}
/end{document}
Compile the above file, use Latex Cjk.tex, and then use XDVI to view the results, if normal, then the CJK package has been properly installed. This package is a test for the successful installation of the font under Utf-8 encoding. Write Ctex test file Ctex.tex, as follows:
/documentclass{ctexart}
/begin{document}
Hello, hello
/end{document}
Compile the file, with Pdflatex Ctex.tex, under normal circumstances, here will be an error, said that can not find the corresponding SIMSUN.TTC file. This is because the Zhmetrics.tex inside set the gbksong corresponding font file for SIMSUN.TTC. Do not know why, although in the zhmetrics that has supported TTC, but in my machine is still not recognized, so still use the Simsun.ttf. Just change all the SIMSUN.TTC in the Zhmetrics.tex into Simsun.ttf, and then put the Simsun.ttf file in the texmflocal/fonts/truetype/, Then you can run the Texhash with the root identity.
And then run once again Pdflatex Ctex.tex, you should be able to see the normal output PDF file. Finally, if the use of Ctex macro package, the default Simsun.ttf does not correspond to the lattice font, and if the use of PS as the output format, you must have a bit of the existence of the array font, so there will be errors. And if in PDF format (that is, compiled with Pdflatex), then the PDF is supported by vector format, that is, TrueType, so you can output normally.

At this point, ctex a normal working environment has been matched well. Fortunately, Tex Live has already installed Ctex-related dependency packs. Previously tried to add it manually in an environment that was not Ctex, and finally failed because of the font.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.