ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Chinese footnotes too wide
Date: Tue, 30 Oct 2012 13:41:10 +0100	[thread overview]
Message-ID: <F8D85F5E-CA98-45A6-BD9B-D0890E70F841@gmail.com> (raw)
In-Reply-To: <87r4og2lkp.fsf@devereux.me.uk>


Am 30.10.2012 um 13:25 schrieb John Devereux <john@devereux.me.uk>:

> Wolfgang Schuster <wolfgang.schuster@gmail.com> writes:
> 
>> Am 30.10.2012 um 10:12 schrieb John Devereux <john@devereux.me.uk>:
>> 
>>> Wolfgang Schuster <wolfgang.schuster@gmail.com> writes:
>>> 
>>>> Am 29.10.2012 um 20:20 schrieb John Devereux <john@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
___________________________________________________________________________________


  reply	other threads:[~2012-10-30 12:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 19:20 Chinese setuplabeltext John Devereux
2012-10-29 19:30 ` Wolfgang Schuster
2012-10-30  9:12   ` Chinese footnotes too wide John Devereux
2012-10-30 11:54     ` Wolfgang Schuster
2012-10-30 12:25       ` John Devereux
2012-10-30 12:41         ` Wolfgang Schuster [this message]
2012-10-30 13:14           ` John Devereux
2012-10-30 11:21   ` Chinese setuplabeltext Sietse Brouwer
2012-10-30 17:25     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F8D85F5E-CA98-45A6-BD9B-D0890E70F841@gmail.com \
    --to=wolfgang.schuster@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).