Difference between revisions of "Chinese Japanese and Korean"
(Updating example of Chinese document.) |
|||
Line 4: | Line 4: | ||
* manual by Pragma: [http://www.pragma-ade.com/general/manuals/mchinese.pdf Chinese in ConTeXt] | * manual by Pragma: [http://www.pragma-ade.com/general/manuals/mchinese.pdf Chinese in ConTeXt] | ||
− | =Chinese in ConTeXt | + | =Chinese in ConTeXt= |
− | + | Get inspirated with importing Chinese fonts with this [https://github.com/BruXy/ConTeXt-Chinese script]. | |
+ | |||
+ | # You need some Chinese (TrueType) fonts; you may want to get for example Microsoft Truetype fonts: | ||
+ | ## [http://archive1.village.virginia.edu/spw4s/fonts/STSONG.TTF STSong], | ||
+ | ## [http://archive1.village.virginia.edu/spw4s/fonts/STZHONGS.TTF STZhongsong], | ||
+ | ## [http://archive1.village.virginia.edu/spw4s/fonts/STXIHEI.TTF STXihei], | ||
+ | ## [http://archive1.village.virginia.edu/spw4s/fonts/STKAITI.TTF STKaiti], | ||
+ | ## [http://archive1.village.virginia.edu/spw4s/fonts/STFANGSO.TTF STFangsong]. | ||
+ | # Example of some basic document with enabled Chinese: | ||
− | |||
− | |||
− | |||
− | |||
<texcode> | <texcode> | ||
+ | \mainlanguage[cn] | ||
+ | \language[cn] | ||
\enableregime[utf] | \enableregime[utf] | ||
− | \ | + | \setscript[hanzi] % hyphenation |
+ | |||
+ | % Enable fonts | ||
+ | \usetypescriptfile[mscore] | ||
+ | \setupbodyfont [mschinese,12pt] | ||
+ | \usebodyfont [mschinese-light,12pt] | ||
+ | \definebodyfontenvironment[24pt] | ||
+ | \definebodyfontenvironment[18pt] | ||
+ | |||
+ | \setuppagenumber [numberconversion=cn] | ||
+ | \definestructureconversionset[chinese][numbers][cn] | ||
+ | \setupheads [sectionconversionset=chinese] | ||
+ | |||
+ | \define[2]\ChineseChapter{第#1章 #2} | ||
+ | \setuphead[chapter][command=\ChineseChapter,style={\bf\switchtobodyfont[24pt]}] | ||
+ | \setuphead[section][style={\bf\switchtobodyfont[18pt]}] | ||
+ | |||
+ | |||
+ | \setuppagenumbering[state=start, | ||
+ | alternative=singlesided, | ||
+ | location={footer, center}, | ||
+ | style={\bf\switchtobodyfont[11pt]} | ||
+ | ] | ||
+ | |||
\starttext | \starttext | ||
− | + | \chapter{华文字体系列} | |
+ | |||
+ | 在微软提供的 Office 套装中附带了一定数量的中文字体,这些字体是常州华文印刷新技术有限公司制造的。 | ||
+ | |||
+ | \startitemize | ||
+ | \item \type{\it}: {\it 华文仿宋} | ||
+ | \item \type{\rm}: {\rm 华文仿宋} | ||
+ | \item \type{\bf}: {\bf 华文中宋} | ||
+ | \item \type{\ss}: {\ss 华文细黑} | ||
+ | \item \type{\tfxx}: {\tfxx 华文仿宋} | ||
+ | \item \type{\tfx}: {\tfx 华文仿宋} | ||
+ | \item \type{\tf}: {\tf 华文仿宋} | ||
+ | \item \type{\tfa}: {\tfa 华文仿宋} | ||
+ | \item \type{\tfb}: {\tfb 华文仿宋} | ||
+ | \item \type{\tfc}: {\tfc 华文仿宋} | ||
+ | \item \type{\tfd}: {\tfd 华文仿宋} | ||
+ | \stopitemize | ||
\stoptext | \stoptext | ||
</texcode> | </texcode> | ||
− | + | == Chinese numbers == | |
− | |||
− | |||
− | |||
− | + | Added by Xiao Jianfeng | |
As far as I know, it is wrong to use "零" with "一,二,....,十". | As far as I know, it is wrong to use "零" with "一,二,....,十". |
Revision as of 00:57, 6 September 2017
< Fonts | Encodings and Regimes >
- old introduction Uptodate by Pragma: screen and paper version
- manual by Pragma: Chinese in ConTeXt
Chinese in ConTeXt
Get inspirated with importing Chinese fonts with this script.
- You need some Chinese (TrueType) fonts; you may want to get for example Microsoft Truetype fonts:
- Example of some basic document with enabled Chinese:
\mainlanguage[cn] \language[cn] \enableregime[utf] \setscript[hanzi] % hyphenation % Enable fonts \usetypescriptfile[mscore] \setupbodyfont [mschinese,12pt] \usebodyfont [mschinese-light,12pt] \definebodyfontenvironment[24pt] \definebodyfontenvironment[18pt] \setuppagenumber [numberconversion=cn] \definestructureconversionset[chinese][numbers][cn] \setupheads [sectionconversionset=chinese] \define[2]\ChineseChapter{第#1章 #2} \setuphead[chapter][command=\ChineseChapter,style={\bf\switchtobodyfont[24pt]}] \setuphead[section][style={\bf\switchtobodyfont[18pt]}] \setuppagenumbering[state=start, alternative=singlesided, location={footer, center}, style={\bf\switchtobodyfont[11pt]} ] \starttext \chapter{华文字体系列} 在微软提供的 Office 套装中附带了一定数量的中文字体,这些字体是常州华文印刷新技术有限公司制造的。 \startitemize \item \type{\it}: {\it 华文仿宋} \item \type{\rm}: {\rm 华文仿宋} \item \type{\bf}: {\bf 华文中宋} \item \type{\ss}: {\ss 华文细黑} \item \type{\tfxx}: {\tfxx 华文仿宋} \item \type{\tfx}: {\tfx 华文仿宋} \item \type{\tf}: {\tf 华文仿宋} \item \type{\tfa}: {\tfa 华文仿宋} \item \type{\tfb}: {\tfb 华文仿宋} \item \type{\tfc}: {\tfc 华文仿宋} \item \type{\tfd}: {\tfd 华文仿宋} \stopitemize \stoptext
Chinese numbers
Added by Xiao Jianfeng
As far as I know, it is wrong to use "零" with "一,二,....,十". Following is the corresponding relationships between lower case and upper case Chinese numbers and arabic numbers.
Chinese lower:〇,一,二,三,四,五,六,七,八,九,十,百,千
Chinese upper:零,壹,贰,叁,肆,伍,陆,柒,捌,玖,拾,佰,仟
Arabic :0, 1, 2,3, 4,5, 6, 7,8, 9,10,100,1000
"零" is a upper case Chinese number, so it should not be mixed with other lower case Chinese numbers. Although in China, it is sometimes wrongly used.
The reason why numbers in Chinese has lower case and upper case in Chinese is for accounting safety. Lower case numbers are simple to write and far more often used in daily life, while upper case numbers are almost exclusively used in accouting.
We can see that every upper case Chinese number are very different from the others, hence cannot be easily modified to the other . But the lower case Chinese number or Arabic numbers are sometime easily to be modified. For example, "一", "二" and "三" are similar so one can easily modify a "一" to "二" or "三".And one can also modify "1" to "7" or "11", or one can modify "6" to "8".
In China, numbers must be written in both Chinese upper case and Arabic form together in accounting.