Chinese Garbled text in texstudio

Source: Internet
Author: User

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 *


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.