Xetex perfect Chinese configuration-general Linux technology-Linux technology and application information, the following is a detailed description. After two months of exploration, I finally learned how to make latex perfectly support Chinese, that is, Xetex.
Configuration:
Install xetex... OK from the source.
Xetex will use the font of your system, that is, you do not need to compile the font yourself.
Use $ fc-list: lang = zh-cn to view your Chinese font.
Use $ fc-list to view all your fonts.
# Su
# Mkdir/usr/share/texmf/tex/xelatex/zhfontcfg
Create a "zhfontcfg. sty" file in the zhfontcfg folder as follows:
% Xetex/xelatex font set macro package
\ ProvidesPackage {zhfontcfg}
\ Usepackage {fontspec, xunicode}
\ Defaultfontfeatures {Mapping = tex-text} % if not, some special tex characters, such as hyphens, cannot be used normally.
% Chinese disconnection
\ XeTeXlinebreaklocale "zh"
\ XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
% Ing System fonts into logical fonts for maintenance convenience
\ Newcommand \ fontnamehei {FZHeiTi}
\ Newcommand \ fontnamesong {Adobe Song Std}
\ Newcommand \ fontnamekai {FZKaiTi}
\ Newcommand \ fontnamemono {DejaVu Sans Mono}
\ Newcommand \ fontnameroman {Dustismo Roman}
% Set the document body font to
\ Setmainfont [BoldFont = \ fontnamehei] {\ fontnamesong}
\ Setsansfont [BoldFont = \ fontnamehei] {\ fontnamekai}
\ Setmonofont {\ fontnamemono}
% Entity body
\ Newfontinstance \ KAI {\ fontnamekai}
\ Newcommand {\ kai} [1] {{\ KAI #1 }}
%
\ Newfontinstance \ HEI {\ fontnamehei}
\ Newcommand {\ hei} [1] {\ HEI #1 }}
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.