Hi, There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code? \setuplabeltext[zh][figure=CHINESE_HERE ] \mainlanguage[zh] \language[zh] \starttext \labeltext{figure} \stoptext This just displays the English word "Figure". context --version mtx-context | ConTeXt Process Management 0.60 mtx-context | mtx-context | main context file: /opt/context/tex/texmf-context/tex/context/base/context.mkiv mtx-context | current version: 2012.09.16 23:18 Thanks, John -- John Devereux
Wolfgang Schuster
Am 29.10.2012 um 20:20 schrieb John Devereux
: Hi,
There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code?
No, you need “cn” for chinese.
Oh yes that works a lot better! :) Thanks Wolfgang. Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page. \usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \starttext Hello, World \footnote{话说林黛玉正自悲泣,忽听院门响处,只见宝钗出来了,宝玉袭人一群人送了 出来。待要上去问着宝玉,又恐当着众人问羞了宝玉不便,因而闪过一旁,让宝钗 去了,宝玉等进去关了门,方转过来,犹望着门洒了几点泪。自觉无味,方转身回 来,无精打彩的卸了残妆。} Hello, World \footnote{There were a king with a large jaw and a queen with a plain face, on the throne of England; there were a king with a large jaw and a queen with a fair face, on the throne of France. In both countries it was clearer than crystal to the lords of the State preserves of loaves and fishes, that things in general were settled for ever.} \stoptext mtx-context | current version: 2012.09.16 23:18 -- John Devereux
Am 30.10.2012 um 10:12 schrieb John Devereux
Wolfgang Schuster
writes: Am 29.10.2012 um 20:20 schrieb John Devereux
: Hi,
There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code?
No, you need “cn” for chinese.
Oh yes that works a lot better! :)
Thanks Wolfgang.
Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page.
By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points. Wolfgang
Wolfgang Schuster
Am 30.10.2012 um 10:12 schrieb John Devereux
: Wolfgang Schuster
writes: Am 29.10.2012 um 20:20 schrieb John Devereux
: Hi,
There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code?
No, you need “cn” for chinese.
Oh yes that works a lot better! :)
Thanks Wolfgang.
Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page.
By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points.
Hi Wolfgang, I did actually try this too but the problem remains in the footnotes (it fixes it for text in the main body). See: \usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \setscript[hanzi] \setupfootnotes[split=tolerant] \starttext 话说林黛玉正自悲泣,忽听院门响处,只见宝钗出来了,宝玉袭人一群人送了出 来。待要上去问着宝玉,又恐当着众人问羞了宝玉不便,因而闪过一旁,让宝钗 去了,宝玉等进去关了门,方转过来,犹望着门洒了几点泪。自觉无味,方转身 回来,无精打彩的卸了残妆。\footnote{话说林黛玉正自悲泣,忽听院门响 处,只见宝钗出来了,宝玉袭人一群人送了出来。待要上去问着宝玉,又恐当 着众人问羞了宝玉不便,因而闪过一旁,让宝钗去了,宝玉等进去关了门,方 转过来,犹望着门洒了几点泪。自觉无味,方转身回来,无精打彩的卸了残妆。} \blank There were a king with a large jaw and a queen with a plain face, on the throne of England; there were a king with a large jaw and a queen with a fair face, on the throne of France. In both countries it was clearer than crystal to the lords of the State preserves of loaves and fishes, that things in general were settled for ever. \footnote{There were a king with a large jaw and a queen with a plain face, on the throne of England; there were a king with a large jaw and a queen with a fair face, on the throne of France. In both countries it was clearer than crystal to the lords of the State preserves of loaves and fishes, that things in general were settled for ever.} \stoptext -- John Devereux
Am 30.10.2012 um 13:25 schrieb John Devereux
Wolfgang Schuster
writes: Am 30.10.2012 um 10:12 schrieb John Devereux
: Wolfgang Schuster
writes: Am 29.10.2012 um 20:20 schrieb John Devereux
: Hi,
There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code?
No, you need “cn” for chinese.
Oh yes that works a lot better! :)
Thanks Wolfgang.
Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page.
By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points.
Hi Wolfgang,
I did actually try this too but the problem remains in the footnotes (it fixes it for text in the main body). See:
\usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \setscript[hanzi] \setupfootnotes[split=tolerant]
Add this the following code to your document, context resets a few settings for footnotes to prevent unwanted side effects from a few commands and I guess this disables also the chinese line break mechanism. \startsetups footnote:hanzi \setscript[hanzi] \stopsetups \setupnote[footnote][setups={footnote:hanzi}] Wolfgang
Wolfgang Schuster
Am 30.10.2012 um 13:25 schrieb John Devereux
: Wolfgang Schuster
writes: Am 30.10.2012 um 10:12 schrieb John Devereux
: Wolfgang Schuster
writes: Am 29.10.2012 um 20:20 schrieb John Devereux
: Hi,
There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code?
No, you need “cn” for chinese.
Oh yes that works a lot better! :)
Thanks Wolfgang.
Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page.
By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points.
Hi Wolfgang,
I did actually try this too but the problem remains in the footnotes (it fixes it for text in the main body). See:
\usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \setscript[hanzi] \setupfootnotes[split=tolerant]
Add this the following code to your document, context resets a few settings for footnotes to prevent unwanted side effects from a few commands and I guess this disables also the chinese line break mechanism.
\startsetups footnote:hanzi \setscript[hanzi] \stopsetups
\setupnote[footnote][setups={footnote:hanzi}]
Wolfgang
Beautiful, that did it, thank you very much. -- John Devereux
John Devereux wrote:
There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code?
Wolfgang Schuster wrote:
No, you need “cn” for chinese.
Might it be advisable to add 'zh' as a synonym? Technically, 'cn' means the country China, and 'zh' means the Chinese language. (Country code vs. language code.) Thankfully 'cn' is not in use as a language code, so retaining it won't cause any collisions. --Sietse
On 30-10-2012 12:21, Sietse Brouwer wrote:
John Devereux wrote:
There do not seem to be translations for the labels for Chinese, is that correct? Is "zh" the correct language code?
Wolfgang Schuster wrote:
No, you need “cn” for chinese.
Might it be advisable to add 'zh' as a synonym? Technically, 'cn' means the country China, and 'zh' means the Chinese language. (Country code vs. language code.) Thankfully 'cn' is not in use as a language code, so retaining it won't cause any collisions.
we shouldn't confuse scripts with languages ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
John Devereux
-
Sietse Brouwer
-
Wolfgang Schuster