ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] full-width Chinese comma (U+FF0C) and ordinary comma (U+002C) in Chinese texts
@ 2024-11-14 16:45 mf
  2024-11-14 16:52 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: mf @ 2024-11-14 16:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

I'm typesetting a bibliography with some Chinese books that have both 
the English translation and the original title in Chinese ideograms.

The Chinese titles contain both full-width commas (U+FF0C) and ordinary 
commas (U+002C), followed by spaces.

Full-width comma has a wide glyph that incorporates some space on the 
right side; I read on Wikipedia it's a mistake putting a space after it.

THE PROBLEM
ConTeXt does not break a line after a full-width comma (even inside a 
"{\cn ... }" group), while it does with an ordinary comma, followed by a 
space.
When there are only full-width commas, sometimes I'll get overfull 
boxes, because ConTeXt finds no feasible breakpoints.

I'm tempted to replace all the full-width commas with ordinary commas 
followed by a space. Is it possible, or is it a mistake?

Or, how do I tell ConTeXt that breaks can occur after full-width commas?

Massi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: full-width Chinese comma (U+FF0C) and ordinary comma (U+002C) in Chinese texts
  2024-11-14 16:45 [NTG-context] full-width Chinese comma (U+FF0C) and ordinary comma (U+002C) in Chinese texts mf
@ 2024-11-14 16:52 ` Wolfgang Schuster
  2024-11-14 17:10   ` mf
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2024-11-14 16:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users, mf

mf schrieb am 14.11.2024 um 17:45:
> Hello,
>
> I'm typesetting a bibliography with some Chinese books that have both 
> the English translation and the original title in Chinese ideograms.
>
> The Chinese titles contain both full-width commas (U+FF0C) and 
> ordinary commas (U+002C), followed by spaces.
>
> Full-width comma has a wide glyph that incorporates some space on the 
> right side; I read on Wikipedia it's a mistake putting a space after it.
>
> THE PROBLEM
> ConTeXt does not break a line after a full-width comma (even inside a 
> "{\cn ... }" group), while it does with an ordinary comma, followed by 
> a space.
> When there are only full-width commas, sometimes I'll get overfull 
> boxes, because ConTeXt finds no feasible breakpoints.
>
> I'm tempted to replace all the full-width commas with ordinary commas 
> followed by a space. Is it possible, or is it a mistake?
>
> Or, how do I tell ConTeXt that breaks can occur after full-width commas?

Use \setscript[hanzi] to enable linebreaking for chinese.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: full-width Chinese comma (U+FF0C) and ordinary comma (U+002C) in Chinese texts
  2024-11-14 16:52 ` [NTG-context] " Wolfgang Schuster
@ 2024-11-14 17:10   ` mf
  2024-11-14 17:17     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: mf @ 2024-11-14 17:10 UTC (permalink / raw)
  To: Wolfgang Schuster, mailing list for ConTeXt users

Il 14/11/24 17:52, Wolfgang Schuster ha scritto:
> mf schrieb am 14.11.2024 um 17:45:
>> Hello,
>>
>> I'm typesetting a bibliography with some Chinese books that have both 
>> the English translation and the original title in Chinese ideograms.
>>
>> The Chinese titles contain both full-width commas (U+FF0C) and 
>> ordinary commas (U+002C), followed by spaces.
>>
>> Full-width comma has a wide glyph that incorporates some space on the 
>> right side; I read on Wikipedia it's a mistake putting a space after it.
>>
>> THE PROBLEM
>> ConTeXt does not break a line after a full-width comma (even inside a 
>> "{\cn ... }" group), while it does with an ordinary comma, followed by 
>> a space.
>> When there are only full-width commas, sometimes I'll get overfull 
>> boxes, because ConTeXt finds no feasible breakpoints.
>>
>> I'm tempted to replace all the full-width commas with ordinary commas 
>> followed by a space. Is it possible, or is it a mistake?
>>
>> Or, how do I tell ConTeXt that breaks can occur after full-width commas?
> 
> Use \setscript[hanzi] to enable linebreaking for chinese.
> 
> Wolfgang

Thank you, Wolfgang!

It works!

Since I'm typesetting mixed-languages text (mainly Italian, with some 
English, French and German), should I limit the \setscript[hanzi] to the 
Chinese spans of text, or can I set it for the whole bibliography 
containing Chinese titles?  It looks like the latter is true (and 
simpler, of course).

Massi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: full-width Chinese comma (U+FF0C) and ordinary comma (U+002C) in Chinese texts
  2024-11-14 17:10   ` mf
@ 2024-11-14 17:17     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2024-11-14 17:17 UTC (permalink / raw)
  To: mf; +Cc: mailing list for ConTeXt users

mf schrieb am 14.11.2024 um 18:10:
> Il 14/11/24 17:52, Wolfgang Schuster ha scritto:
>> mf schrieb am 14.11.2024 um 17:45:
>>> Hello,
>>>
>>> I'm typesetting a bibliography with some Chinese books that have 
>>> both the English translation and the original title in Chinese 
>>> ideograms.
>>>
>>> The Chinese titles contain both full-width commas (U+FF0C) and 
>>> ordinary commas (U+002C), followed by spaces.
>>>
>>> Full-width comma has a wide glyph that incorporates some space on 
>>> the right side; I read on Wikipedia it's a mistake putting a space 
>>> after it.
>>>
>>> THE PROBLEM
>>> ConTeXt does not break a line after a full-width comma (even inside 
>>> a "{\cn ... }" group), while it does with an ordinary comma, 
>>> followed by a space.
>>> When there are only full-width commas, sometimes I'll get overfull 
>>> boxes, because ConTeXt finds no feasible breakpoints.
>>>
>>> I'm tempted to replace all the full-width commas with ordinary 
>>> commas followed by a space. Is it possible, or is it a mistake?
>>>
>>> Or, how do I tell ConTeXt that breaks can occur after full-width 
>>> commas?
>>
>> Use \setscript[hanzi] to enable linebreaking for chinese.
>>
>> Wolfgang
>
> Thank you, Wolfgang!
>
> It works!
>
> Since I'm typesetting mixed-languages text (mainly Italian, with some 
> English, French and German), should I limit the \setscript[hanzi] to 
> the Chinese spans of text, or can I set it for the whole bibliography 
> containing Chinese titles?  It looks like the latter is true (and 
> simpler, of course).

I would limit it to chinese because it can mess up spacing for 
puntuation for the other languages.

You add the setting to the language switch with the following method:

\startsetups [chinese]
   \setscript[hanzi]
\stopsetups

\setuplanguage [cn] [setups=chinese]

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-14 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14 16:45 [NTG-context] full-width Chinese comma (U+FF0C) and ordinary comma (U+002C) in Chinese texts mf
2024-11-14 16:52 ` [NTG-context] " Wolfgang Schuster
2024-11-14 17:10   ` mf
2024-11-14 17:17     ` Wolfgang Schuster

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).