[NTG-context] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster wolfgang.schus...@gmail.com writes:

 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:

 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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread Wolfgang Schuster

Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster wolfgang.schus...@gmail.com writes:

 Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread Wolfgang Schuster

Am 30.10.2012 um 13:25 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:
 
 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster wolfgang.schus...@gmail.com writes:

 Am 30.10.2012 um 13:25 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:
 
 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___