Chinese Chemicalization of TEX under FreeBSD

zhaozj2021-02-16  75

(Original article, not unauthorized deletion of this statement or change the content of the article without authorization, please indicate the source.)

1. Install TETEX first, you can install it through the Package, you can also install it through the ports.

# CD / USR / PORTS / PRINT / TETEX

# make install clean

If it is installed through the package, you can do this.

# setenv packageroot ftp://ftp.freebsdchina.org

# pkg_add -r testex

Quickly install the speed, save the compiled time

2. Check the directory tree and profile texmf.cnf. Don't know the directory tree? No, how can I use TEX? Then find a copy of your article yourself :)

TEXMF.CNF is in $ texmfmain / web2c / below, mainly to take a look at the settings of several variables, below is my setting, after you have finished installed, you should also

TEXMFMAIN = / usr / local / share / texmf

TEXMFLOCAL = / usr / local / share / texmf-local

HOMETEXMF = $ HOME / TEXMF

TEXMF = {$ HOMETEXMF, !! $ TEXMFLOCAL, !! $ texmfmain}

SYSTEXMF = $ TEXMF

VARTEXFONTS = / var / tmp / texfonts

TEXMFDBS = $ TEXMF; $ VARTEXFONTS

Web2c = $ TEXMF / Web2C

3. If you are installed by Ports, it is a certain installed CJK font, which is often used by the arphic font. If you do not install CJK, you will install one, the installation method is the same, everyone is certainly no problem. Now I can try to use Chinese, as long as you are installed through the ports, you can test it. It is important to pay attention to the GB font, that is, to use it.

......

/ begin {cjk *} {GB} {Song}% uses the Song body

/ newcommand {/ hei} {/ bf / cjkfamily {Song}}% use black body

Since ARPHIC fonts have only made ARB5KAI, Arb5sung, Argbkai, and Argbsung, so use / bf command when using black body. Ok, now test a Chinese article, latex, pdflatex, dvipdfm and other orders should have no problem, that is, the font looks uncomfortable, right, thin and long, punctuation, how to run to the middle, ugly, still It is better to compile it under CTEX. The purpose of this article is to use the settings in CTEX.

4. Now you have installed TETEX and can use Chinese through CJK. How do you install new fonts? After you installed CJK, you can look at its document, there is a detailed standard installation font method, here I want The introduction is a way of happiness. It is not necessary to use it without having to compile it. It is easy to use to copy a little bit setting, which is very convenient, you will love it. Here is my method:

# mount_msdosfs / dev / ad0s1 / mnt

(I have a Windows2000 installed in the C disk, I have ctex inside, I am using the Localtexmf inside, here is setting up, don't have to do it yourself, thank the CTEX producers! But I have no Windows, You can't use CTEX)

# CD / MNT

# CD "program files / ctex /" # cp -r localtexmf / usr / local / share; copy

# mv localtexmf texmf-local; rename

# umount / mnt

(Copy Localtexmf to $ TEXMFMAINLOCAL, my setting is / usr / local / share / texmf-local)

Now you have copied the settings of the CTEX related content, what is there in its directory?

| -cct /

| -DOC /

| -DVIPDFM /

| -DVIPS /

| -FONTS /

| -pdftex /

| -TEX /

| -TTF2TFM /

5. For me, CCT and DOC are extra, RM fall, save some space, huh, my hard drive is not big, you can stay, I don't have to use CCT maybe you use. then

# cp -r TTF2TFM TTF2PK

See two variables in Texmf.cnf

TTF2PKINPUTS = $ TEXMF / TTF2PK //

TTF2TFMINPUTS = $ TEXMF / TTF2TFM //

Now I know what the copy command above is what it means :)

6. I have already done a lot of effort, maybe you have already urged your article, ok, then try it, ..., forget, now it will be successful, huh, huh, but also the shortcomings, don't set, don't settle Urgent, just a minute.

# cd / usr / local / share / texmf / fonts / trueType

# mkdir chinese

# cd Chinese

# ln -s /usr/local/share/fonts/tueetype/simhei.ttf simhei.ttf

# ln-s /usr/local/share/fonts/tRueTyPe/simsun.ttc simsun.ttc

# ln -s /usr/local/share/fonts/tueetype/simli.ttf simli.ttf

# ln -s /usr/local/share/fonts/tRueType/simfang.ttf simfang.ttf

# ln -s /usr/lcoal/share/fonts/trueType/simkai.ttf simkai.ttf

# TexConfig Rehash

Ok, let's try your article now, you can use these familiar orders.

......

/ begin {cjk *} {gbk} {song}

/ newcommand {/ hei} {/ cjkfamily {hei}}

Compiled articles should look good :)

To talk about reason, CTEX's localtexmf is a set of Chinese cultural environments, which sets the TEX system for fonts under Windows, so you can use it on your machine, the only thing you need to confirm is Does your font have, one is your system font, and the other is that your Tex can find them. Remember the texmf.cnf mentioned at the beginning? This is all the path settings, take a short time to see it, thinking that it may be convenient

$ GREP '^ [^%]' Texmf.cnf> ~ / texmf.cnf

Then add the font to the corresponding path, you can let TEX find the font you set, I am in the texmf directory, because I don't want to change the content inside Texmf.cnf, so I will write according to the above The path to add the font, note that I added a symbolic link, there is no need to waste your space. Tell everyone a clue, in case you lost in these complicated settings, don't be discouraged, remember that arphic fonts can be used, why do you not use the fonts such as SIMSUN? Looking for it, which of which of the arphic font appears below, to do it in it, then refresh, you will be successful. All commonly used orders I have tested, Latex, Pdfidex, Dvipdfm, Texexec and XDVI can be used.

You can test it, if you have any questions, I hope everyone will come out, let's exchange, share TEX fun.

转载请注明原文地址:https://www.9cbs.com/read-15083.html

New Post(0)