Home
zhs-man.
Contents
1. h ItalicFont cwTeXKailtalic Mapping tex text cwTeXMing setsansf ont BoldFont cwTeXHeiBold Mapping tex text cwTeXYen setmonof ont cwIleXFangSongTT usepackage zhspacing newfontfamily zhfont BoldFont SimHei SimSun newfontfamily zhcjkextafont Sun ExtA newfontfamily zhcjkextbfont Sun ExtB zhspacing You can surely change these lines to your own taste 4 Getting zhspacing You can get latest stable version of zhspacing on CTAN zhspacing was hosted on an open source project at google code The old project homepage is http code google com p zhspacing Now zhspacing is part of ctex kit project http code google com p ctex kit You can get the lastest source via SVN 11 File II zhfont sty 1 Introduction To simplify the complex font setting to use NFSS in BTFX the package zhfont is coded It also adds simple interface to define fonts with fake slant and also supports fake bold 2 Package Options zhfont currently has only one option fakebold This option sets Chinese show fake boldface when the current series is bold 3 Provided Macros e zhrmfont e zhsffont e zhttfont The font commands to be executed according to the current font family You can redefine them to customize your fonts e setzhmainfont e setzhsansfont e setzhmonofont Simply macro to set zh rm sf tt font using newfontfamily e newfontfamilywithslant Create a font family with fake slant Take one argument as t
2. cases is wider than the skip between and Eng That is because the space is pro duced by the space token after the letter g not the skip automatically inserted by zhspacing s skip mechanism The space ignoring and skip auto inserting ability of zhspacing can make writing documents much comfortable You don t need to worry about the manual insertion of skips such as adding the annoying in CJK Now come to the topic of punctuation skip adjustment Proper Chinese typesetting requires consecutive fullwidth punctuations be compressed and a linebreak before or after a fullwidth punctuation will cut off the blank spaces of this punctuation making it align to the margin zhspacing does have solved these problems as well as proper prohibitions 4 Wl Here s an example 4 WIRI ZARR BEAD Fe CE Br A BRE Risk Sr B Cty WARM TTE YE EBT FA BEE MAIL WAT ARN SE BCEAO UR BA GY REKER 3 Advanced Usage 3 1 Fonts zhspacing uses an extensible way of selecting fonts The rules can be summarized as follows e Western characters i e those that are not CJKV ideographies nor CJKV punctuations use the same font as default e Chinese characters use seperate fonts Font changes in the doc ument does not affect the font used to display Chinese unless you are using NFSS and change the font series or shape e On displaying basic Chinese ideographies execute the command zhfont e On dis
3. font family in BT X and two argument as the font command for alphas and numbers accordingly in plain T X 14 e zhmathalphanumf ont The font command which determines the math font for alphas and numbers in BIFX Should always call setalphanummathfonts zhmathalphanumfont after it changes e zhmathletterfont e zhmathnumberf ont The font command which determines the math font for alphas and numbers in plain TeX After their change setalphanummathfonts with corresponding arguments should be called 4 Examples in math il _ik usecustommathfonts Large EE mc72 s_ 1 over 2 at 2 P inmathillll x BEEE mc sa sat 15
4. Typesetting Chinese in XHIFX zhspacing user s manual YIN Diani 2012 03 14 Contents I zhspacing st 1 Introductio 2 Getting Started Advanced Usage a S Seeeeeennnee eea ure OET 4 Getting zhspacing Revision 2012 03 14 7 9 10 10 11 tLab of Network Comm System amp Control Univ of Sci amp Tech of China 1 2 Package Options Provided Macro 2 Package Options Provided Macro m m MT _ j a 5 In N zi eg 2 E 2 z 5 B a B a e ol I5 o Ja ot WN ot 11 11 12 12 12 13 13 13 14 15 File I zhspacing sty 1 Introduction XHIEX is a new TRX engine by Jonathan Kew and SIL International which combines TRX with pervasive Unicode support and advanced font support Using XIX it is possible to typeset scripts of any languages whose glyphs are contained in the font in use without the help of any extra packages such as CJ However XTX itself does not solve all the problems Some details in Chinese typesetting have not been dealt with by X4I X such as the automatic font switch between Chinese and Western characters the skip adjustment of fullwidth punctuations the automatic skip insertion between Chinese and Western characters or math formulas etc To meet the need of easy and high quality typesetting of Chinese documents using X4IFX the package zhspacing is coded utilizing the new primitive of XeTeXinte
5. he font name Example newfontfamilywithslant zhrmfont SimSun e newfontfamilywithslantandbold Create a font family with fake slant and specify another font for its boldface Take two arguments as the font name and bold font name Example newf ontfamilywithslantandbold zhrmfont SimSun SimHei 12 4 Examples The following example is generated with zhfont loaded with option fakebold newf ontfamilywithslant zhrmfont SimSun 1 X textbf Mlik textit F lt textbf Mik newfontfamilywithslant zhrmfont FangSong 1 X textbf Mlik textit F lt textbf Mik PARR PLW PAWA CM File III zhmath sty 1 Introduction zhmath is a generic package which allows the Chinese characters to be displayed in math formulas It also allows changing the math font for alphas and numbers zhmath only sets the basic Chinese characters to be displayable not CJK Ext A B ones as they are seldom used and discouraged in math You can use hbox to let zhspacing display them however 2 Package Options In BIFX zhmath has two options active and noactive They set the method to implement Chinese character displaying in math The default is noactive When active is set the Chinese characters in math formulas are set to active which when executed display the corresponding characters in zhmathfont This behavior is much like that of the 13 package mathcjk The font size in d
6. ifferent styles are also set in mathcjksizea b c d When noactive is set the mathcodes of Chinese characters are set to use a special math font family to display them This way is more native than to use active characters Both active and noactive have disadvantages In active mode the Chinese math font sizes are determined by mathcjksizea b c d so they are somewhat independent with the main text size which means their size cannot change when the main font size changes which gives ugly results However in noactive mode although Chi nese math font size varies with the main font size Chinese inside mathrm etc cannot be displayed because the math font family are set to mathrm s So choose the option to your own need In plain T X no package options are available 3 Provided Macros e setzhmathf ont Set the math font used to display Chinese Take one argument as the font command Preamble only e zhmathf ont The font command which determines the math font for Chi nese However if you use noactive option in BIEX or you re in plain TeX they are not executed when Chinese in math occur but when setzhmathfont is invoked So you should always call setzhmathfont zhmathfont after the change e usecustommathfonts Enable the use of custom math fonts for alphas and numbers The default is Times New Roman e setalphanummathfonts Set the math font used to display alphas and numbers Pream ble only Take one argument as the
7. ions such as e 29O r eS N ba F etc skipzhinterhalfstop Skip after a fullwidth halfstop punctuation when followed by another fullwidth punctuation skipzhlineendhalfstop Skip after a fullwidth halfstop punctua tion when it occurs at the end of a line skipnegzhlinestartopen Negative skip to skipzhlinestartopen skipnegzhlineendclose Negative skip to skipzhlineendclose skipnegzhlineendfullstop Negative skip to skipzhlineendfullstop skipnegzhlineendhalfstop Negative skip to skipzhlineendhalfstop All of the skip commands above are defined in the pattern def skipxxx hskip xxxxx zhspacing comes with three pre defined skip schemes namely simsunskipscheme emptyskipscheme and haltskipscheme The first scheme should be suitable for font SimSun and other popular Chi nese fonts used in China which does not support OpenType features of halt and needs negative spaces be inserted before opening punc tuations and after closing or judou punctuations The second scheme simply addes zero length And the last one should be fit for OpenType Chinese fonts supporting halt feature such as Adobe Song Std where positive spaces should be inserted before or after certain punctuations You can define your own skip schemes for customization of course 3 4 Vertical Chinese Vertical Chinese can be achieved by adding raw feature vertical to the specified font An example could be documentclass 12pt article
8. playing Chinese punctuations execute the command zhpunctfont e On displaying CJK Ext A characters execute the command zhcjkextafont e On displaying CJK Ext B characters execute the command zhcjkextbfont e When switching from non Chinese characters to Chinese char acters execute zhs savefont When switching back execute zhs restorefont When importing zhspacing from plain XH4I X the default defi nitions of the above commands are font zhfont SimSun at 10pt font zhpunctfont SimSun at 10pt def zhcjkextafont message CJK Ext A def zhcjkextbfont message CJK Ext B let zhs savefont begingroup let zhs restorefont endgroup When imported from X4BTFX the defaults are newfontfamily zhfont BoldFont SimHei SimSun newfontfamily zhpunctfont SimSun def zhcjkextafont message CJK Ext A def zhcjkextbfont message CJK Ext B def zhs savefont zhs savef nt old def zhs restorefont zhs restoref nt old Here zhs savef nt and zhs restoref nt are internal macros to save and restore the NFSS info of the current font to specified places CJK Ext A B fonts have not been defined by default in consid eration that not every user has installed the particular fonts I rec ommend to use Sun ExtA and Sun ExtB as the corresponding fonts You can define the ext font macros manually in a similar way to the definition of zhfont An example of mixed typesetting of various classes of characters is as follow
9. rchartoks provided in X4I X ver sion 0 997 2 Getting Started zhspacing can be used in both plain XqIRX or X4MIFX The usage is quite straightforward For instance in plain XqTRX input zhspacing sty o Zz PI Ro P XMEnglishty iF kagen 2 HY IL HE o bye ag Words copied from the ConTeXt Wiki 2CJK is a LaTeX 2e macro package which enables the use of CJK scripts Chi nese Japanese Korean in various encodings written by Werner Lemberg And in X4BTFX documentclass article usepackage zhspacing zhspacing n PH Ro F XMEnglishty IH xh E mc 2 Hy ih HF end document ag Both of the examples above produce the same result as follows eP PLM PM English HEHE PLM E mc RFF As you can see spaces after Chinese characters are always ig nored Moreover a noticable skip is inserted between Chinese char acters and English characters as well as math formulas In fact all of the following inputs can produce mixed langauge output with skip automatically inserted between Chinese and English characters Eng Engx Eng X and Eng X And their corresponding output is F Eng X P Eng X Eng X and Eng X Look close and yov ll find that the first and second input gen erates exactly the same output and so does the third and fourth However the skip between Eng and X in the last two
10. s cited from The Tale of Ki ul MERSI Tram nam trong cdi ngudi ta TEJ TF fins He Jif Chir tai cht m nh kh o l gh t nhau ER X a RHE Tr i qua m t cudc b dau ARE JE Nhimg di u tr ng thay ma dau n l ng 3 478M or Truy n Ki u a Vietnamese luc b t poem written in chit Nom Chit N6m is a system of ideographies created by the Vietnamese laboring people most of which are encoded in CJK Ext A B area or not even included in Unicode 4Some of the ideographies are replaced by similar characters due to the limi e of character set A picture of the original manuscript can be found at link 3 2 More on Fonts Sometimes it may be desirable to use different Chinese fonts for dif ferent NFSS font families in PT X This can be done by changing the definition of zhs savefont and zhfont without modifying the zhspacing source Here is the way to do itf makeatletter g addto macro zhs savefont long edef zhs tmpmacro f family def zhs curr fam 0 ifx zhs tmpmacro sfdefault def zhs curr fam 1 else ifx zhs tmpmacro ttdefault def zhs curr fam 2 fi fi edef zhs tmpmacro f family ifx zhs tmpmacro sfdefault def zhs curr fam 1 else ifx zhs tmpmacro ttdefault def zhs curr fam 2 fi fi newf ontfamily zhrmfont BoldFont SimHei ItalicFont KaiTi SimSun newfontfamily zhsffont SimHei newfontfamily zhttfont BoldFont SimHei KaiTi def zhf ont ifcase zhs curr fam zhrmfon
11. t or zhsffont or zhttfont else zhrmfont fi 3 3 Skips The skip mechanism in zhspacing is also flexible zhspacing utilizes the following skip commands Note that they are defined as macros instead of skip register values in order that the skip varies according to font size changes 5See zhfont sty later for convenient ways skipzh Skip between adjacent Chinese characters skipenzh Skip between a Chinese character and a Western character or a math formula skipzhopen Skip before fullwidth opening punctuations such as en 6c C 6c C etc skipzhinteropen Skip before a fullwidth opening punctuation when preceded by another fullwidth punctuation skipzhlinestartopen Skip before a fullwidth opening punctuation when it occurs at the start of a line 66 99 99 skipzhclose Skip after fullwidth closing punctuations such as y Wy G etc skipzhinterclose Skip after a fullwidth closing punctuation when followed by another fullwidth punctuation skipzhlineendclose Skip after a fullwidth closing punctuation when it occurs at the end of a line skipzhfullstop Skip after fullwidth fullstop punctuations such as 66 6 6 3 i Rares in skipzhinterfullstop Skip after a fullwidth fullstop punctuation when followed by another fullwidth punctuation skipzhlineendfullstop Skip after a fullwidth fullstop punctuation when it occurs at the end of a line skipzhhalfstop Skip after fullwidth halfstop punctuat
12. toks faculty For example the polyglossia package some languages 3 6 Working with other Chinese package zhspacing is not compatible with xeCJK The latter can be only used in BIFX format zhspacing is now supposed to be mainly used in Plain T X format in ATX xeCJK is a better choice The ctex package made by ctex org is a widely used Chinese document framework which hides the underlying Chinese processing T was using begingroup and endgroup as the font saving restoring com mands However I found ulem redefines hskip and penalty to end the current hbox group and start a new hbox and thus group mismatch occurs So I changed the font saving restoring commands when used in ATEX using NFSS info instead of groups But in the new hbox group no Chinese font is applied by default so the Chinese characters disappears Therefore I changed the definitions of ulem s new hskip and penalty in zhulen and advice users to use this modified one 10 details to the user which enables portability between different Chinese processing packages or systems New version of ctex package supports XqTeX through xeCJK package zhspacing is not necessary To use zhspacing in cxetex a slight modification of the file ctexcjk clo should be made Change the corresponding lines to the followes means the original lines XeTeXlinebreaklocale zh XeTeXlinebreakskip Opt plus 1pt minus 0 ipt 4 setmainf ont BoldFont cwTeXHeiBold
13. usepackage graphicx usepackage zhspacing zhspacing begin document newf ontfamily zhfont RawFeature script hani language CHN vertical vert let zhpunctfont zhfont haltskipscheme rotatebox 0 HR FEA KZAGCHNHHA end document Note that in this example in order to have proper vertical punc tuations we set zhpunctfont to use the Adobe one supporting vert gt HHan 5 5 injsn Hy 44 o feature and change the skip scheme to haltskipscheme to match the vhal feature specified However there exists some bug in typesetting vertical Chinese containing punctuations using some fonts such as KaiTi_GB2312 etc I ve told this bug to jjgod in May but it seems that he hasn t solved the problem yet Moreover the baseline of vertical Chinese is not correct so mixed typesetting of Chinese and English in vertical mode generates ugly results and thus should be avoided 3 5 Compatibility Theoretically zhspacing should be compatible with all macro pack ages except those who change the definition of nskip and penalty in which case special treatment should be applied I haven t found any conflict when using common packages such as hyperref and fancyhdr However ulem redefineds hskip and penalty and causes unexpected output Use zhulem provided along with zhspacing instead zhspacing may be not compatible with macro packages which use XeTeXinterchar
Download Pdf Manuals
Related Search
zhs man. zhs manager zhs menu zsh manual zhs menzenschwand zsh manjaro zsh man page zhs munich zsh man color zs management consulting zs manesova stribro zs mandysova hk zs management gmbh zs manesova otrokovice zs manager salary
Related Contents
ASUS M2A690G User's Manual Samsung SyncMaster Viking F21286 User's Manual Guia do usuário do adaptador de rede sem fio da Xerox 詳細カタログ - アキュフェーズ notice omni DIGIVIEW USER'S GUIDE V2.6 Audio-Technica ATR6550 User's Manual Bosch Appliances 3540 Saw User Manual Copyright © All rights reserved.
Failed to retrieve file