Latex supports CJK installation and configuration
Here, let's take a look at our latex Chinese installation and configuration methods to help those who have not yet done this.
The CJK installation package can be downloaded from here:
Http://www.cjk.org
We can also download a convenient installation program from Wang Yin's personal homepage:
Http://learn.tsinghua.edu.cn/homepage/2001315450/tex_frame.html
We now think that we will place the downloaded installer in the home directory of our users. Next we will start our installation:
1. Enter the/usr/local/share directory and execute the following command to create the directory we want to use:
Mkdir-P texmf/tex/latex/CJK
Mkdir-P texmf/fonts/TrueType/Chinese
2. Return to our user's home directory and decompress the CJK installation package:
Tar-xvzf cjk-4.6.0.tar.gz
3. Go to the decompressed directory and copy the texinput directory to the CJK directory we just created:
CD cjk-4.6.0
MV texinput/usr/local/share/texmf/tex/latex/CJK
4. decompress the font Generator program:
Tar-xvzf gbkfonts-linux-0.3.tar.gz
5. Go to the decompressed directory and copy the corresponding program to the corresponding directory:
CP go appendconf gbkfonts/usr/local/bin
6. Modify the go program:
VI/usr/local/bin/go
Find the following parts:
Gbkfonts $ {opts [*]} $ DIR/simsun. TTF song
Gbkfonts $ {opts [*]} $ DIR/simkai. TTF Kai
Gbkfonts $ {opts [*]} $ DIR/simhei. TTF Hei
Gbkfonts $ {opts [*]} $ DIR/simfang. TTF FS
In general, we can use these font programs. If there are no other fonts, We can comment out the content we will not use below.
7. Copy the font we need to the/usr/local/share/texmf/fonts/TrueType/Chinese directory. Generally, this font program is copied from the Windows directory, here we use simsun. TTC, simhei. TTF, simkai. TTF, simfang. four TTF fonts and simsun. the name of TTC is simsun. TTF
8. Font generation:
CD/usr/local/share/texmf
Go fonts/TrueType/Chines
In this way, we can see the font generation process.
9. Execute the following command:
Appendconf/usr/local/share/texmf
10. Modify the Tex configuration file:
VI/usr/share/texmf/dvips/config. Ps
Find the o | LPR line, comment it out, and add the following line below:
P + CJK. Map
11. Update the Tex font database:
Mktexlsr
Now we can use Chinese Characters in Tex. We can simply write a test file test. TEX:
/Documentclass {Article}
/Usepackage {CJK}
/Begin {document}
/Begin {CJK *} {GBK} {SONG}
Haha, hello CJK!
/End {CJK *}
/End {document}
After saving and exiting, run the following command:
Latex test. Tex
This will generate a test. DVI file. We can use the following command to preview it:
Xdvi test. DVI
If we can see the correct display of Chinese, it means that our installation configuration has been successful.
Reference: http://www.linuxsir.org
There is also a CJK installation tutorial written by Mr. He beiliang, which is very good. Basically it is done by him.
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.