I have been using wined and ctex for Chinese editing. Recently I found that texstudio is very useful, so I picked up texstudio to handle English, but encountered a very difficult problem when dealing with Chinese, after two hours, I tried to find a solution on the Internet. Unfortunately, it was not found. It was called speechless ~
Wined can compile documents to texstudio. This compilation is garbled and cannot be understood. On the internet, we all think that texstudio is better compatible with Chinese than win ~
The final solution, utf8 instead of GB, solves the garbled problem. This abnormal bug wastes a lot of time.
The problem of mixed Chinese and English sorting is attached.
A space is added by default when a line break is entered in English, but Chinese typographical la s do not have this habit.
\ Begin {CJK} {GB} {SONG}
Content in English
\ End {CJK}
There will be extra spaces in each line during Chinese formatting. To avoid this problem, we recommend that you use
\ Begin {CJK *} {GB} {SONG}
\ Cjktilde
Content ~ English ~ Content
\ End {CJK *}
At this time, the CJK * environment will eat unprotected spaces by default. If spaces are needed after Chinese characters, use the symbol ~, \ Cjktilde redefined the Tilde ~ Meaning, so that this symbol does not represent a space that cannot be broken, but an elastic distance that can be broken, the distance between Chinese and English characters is adjusted (generally a space of 1/4 characters in CJK ). that is to say, to get a beautiful mix of Chinese and English, you must use a large number ~, This may slow down the input speed, but it is good to get used to it.
In addition, \ standardtilde can be used to make ~ Restore the original definition, but generally there is no need to do so. You can use \ NBS (non-breakabel space, latex command \ nonbreakspace abbreviation) to generate a non-Interrupting space.
You can also use the following command to switch the CJK * Environment:
\ Cjkspace CJK * ----> CJK
\ Cjknospace CJK -----> CJK *