ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] missing space with French quotation
@ 2024-05-30 15:34 Peter Münster
  2024-05-30 17:21 ` [NTG-context] " Rik Kabel
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Peter Münster @ 2024-05-30 15:34 UTC (permalink / raw)
  To: ConTeXt users

Hi,

When using \start/stopquotation in French documents, there is a missing space:

\mainlanguage[fr]
\setcharacterspacing[frenchpunctuation]
\starttext
bla \quotation{OK} bla\\
bla «OK» bla
\startquotation
  Not Ok: a space is missing
\stopquotation
\stoptext

Is this a bug or a feature?

How could I get a space before "»" please?

TIA for any help,
-- 
           Peter
___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-05-30 15:34 [NTG-context] missing space with French quotation Peter Münster
@ 2024-05-30 17:21 ` Rik Kabel
  2024-05-30 20:33   ` Wolfgang Schuster
  2024-06-04 18:31 ` Peter Münster
  2024-06-07 11:31 ` Peter Münster
  2 siblings, 1 reply; 9+ messages in thread
From: Rik Kabel @ 2024-05-30 17:21 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 641 bytes --]

 From my basic environment file, a useful reminder:

    %% \mainlanguage sets language used for labels (TOC, chapters, ...)
    %% \language sets language to use for hyphenation, quote rules, ...

-- 
Rik


On 2024-05-30 11:34, Peter Münster wrote:
> Hi,
>
> When using \start/stopquotation in French documents, there is a missing space:
>
> \mainlanguage[fr]
> \setcharacterspacing[frenchpunctuation]
> \starttext
> bla \quotation{OK} bla\\
> bla «OK» bla
> \startquotation
>    Not Ok: a space is missing
> \stopquotation
> \stoptext
>
> Is this a bug or a feature?
>
> How could I get a space before "»" please?
>
> TIA for any help,

[-- Attachment #1.2: Type: text/html, Size: 1118 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-05-30 17:21 ` [NTG-context] " Rik Kabel
@ 2024-05-30 20:33   ` Wolfgang Schuster
  2024-05-30 21:29     ` Rik Kabel
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2024-05-30 20:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Rik Kabel

Rik Kabel schrieb am 30.05.2024 um 19:21:
>  From my basic environment file, a useful reminder:
> 
>     %% \mainlanguage sets language used for labels (TOC, chapters, ...)
>     %% \language sets language to use for hyphenation, quote rules, ...

\mainlanguage includes all settings of \language.

As you can see in the following example \mainlanguage change the float 
label and the quotation marks but \language changes only the quotation 
marks and uses the label of the main language.

%%%% begin example
\starttext

\startplacefigure[title=\quotation{English quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=red]}
\stopplacefigure

\start \mainlanguage[nl]
\startplacefigure[title=\quotation{Dutch quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=green]}
\stopplacefigure
\stop

\start \language[fr]
\startplacefigure[title=\quotation{French quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=blue]}
\stopplacefigure
\stop

\stoptext
%%%% end example

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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-05-30 20:33   ` Wolfgang Schuster
@ 2024-05-30 21:29     ` Rik Kabel
  0 siblings, 0 replies; 9+ messages in thread
From: Rik Kabel @ 2024-05-30 21:29 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1732 bytes --]

My apologies to all, and thank you, Wolfgang. Time to update my notes.

-- 
Rik

On 2024-05-30 16:33, Wolfgang Schuster wrote:
> Rik Kabel schrieb am 30.05.2024 um 19:21:
>>  From my basic environment file, a useful reminder:
>>
>>     %% \mainlanguage sets language used for labels (TOC, chapters, ...)
>>     %% \language sets language to use for hyphenation, quote rules, ...
>
> \mainlanguage includes all settings of \language.
>
> As you can see in the following example \mainlanguage change the float 
> label and the quotation marks but \language changes only the quotation 
> marks and uses the label of the main language.
>
> %%%% begin example
> \starttext
>
> \startplacefigure[title=\quotation{English quotes}]
> \midaligned{\blackrule[width=6cm,height=2cm,color=red]}
> \stopplacefigure
>
> \start \mainlanguage[nl]
> \startplacefigure[title=\quotation{Dutch quotes}]
> \midaligned{\blackrule[width=6cm,height=2cm,color=green]}
> \stopplacefigure
> \stop
>
> \start \language[fr]
> \startplacefigure[title=\quotation{French quotes}]
> \midaligned{\blackrule[width=6cm,height=2cm,color=blue]}
> \stopplacefigure
> \stop
>
> \stoptext
> %%%% end example
>
> 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
> ___________________________________________________________________________________ 
>

[-- Attachment #1.2: Type: text/html, Size: 3186 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-05-30 15:34 [NTG-context] missing space with French quotation Peter Münster
  2024-05-30 17:21 ` [NTG-context] " Rik Kabel
@ 2024-06-04 18:31 ` Peter Münster
  2024-06-07 11:31 ` Peter Münster
  2 siblings, 0 replies; 9+ messages in thread
From: Peter Münster @ 2024-06-04 18:31 UTC (permalink / raw)
  To: ntg-context

On Thu, May 30 2024, Peter Münster wrote:

> Is this a bug or a feature?

And if it’s a bug, will it be fixed?

TIA for any hints,
-- 
           Peter
___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-05-30 15:34 [NTG-context] missing space with French quotation Peter Münster
  2024-05-30 17:21 ` [NTG-context] " Rik Kabel
  2024-06-04 18:31 ` Peter Münster
@ 2024-06-07 11:31 ` Peter Münster
  2024-06-07 12:18   ` Wolfgang Schuster
  2 siblings, 1 reply; 9+ messages in thread
From: Peter Münster @ 2024-06-07 11:31 UTC (permalink / raw)
  To: ntg-context

On Thu, May 30 2024, Peter Münster wrote:

> \mainlanguage[fr]
> \setcharacterspacing[frenchpunctuation]
> \starttext
> bla \quotation{OK} bla\\
> bla «OK» bla
> \startquotation
>   Not Ok: a space is missing
> \stopquotation
> \stoptext

It seems, that this workaround solves the problem:
\setupquotation[before={\setcharacterspacing[reset]}]

What do you think about it? Is this the right way to do it?

-- 
           Peter
___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-06-07 11:31 ` Peter Münster
@ 2024-06-07 12:18   ` Wolfgang Schuster
  2024-06-07 14:21     ` Alan Braslau via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2024-06-07 12:18 UTC (permalink / raw)
  To: ntg-context

Peter Münster schrieb am 07.06.2024 um 13:31:
> On Thu, May 30 2024, Peter Münster wrote:
> 
>> \mainlanguage[fr]
>> \setcharacterspacing[frenchpunctuation]
>> \starttext
>> bla \quotation{OK} bla\\
>> bla «OK» bla
>> \startquotation
>>    Not Ok: a space is missing
>> \stopquotation
>> \stoptext
> 
> It seems, that this workaround solves the problem:
> \setupquotation[before={\setcharacterspacing[reset]}]


The quotation environment doesn't rely on the characterspacing mechanism 
to add the spaces before and the after the quotes but uses language 
dependent skips.

The example below shows how it works and where it fails when you use 
characterspacing. Resetting spacing (and probably other settings like 
charcterkerning etc.) when the quotes are added as you noticed fixes the 
problem.

%%%% begin example
\starttext

\dontleavehmode
\hbox{«\hspace[fr][quotation]}%
xxx%
\hbox{\hspace[fr][quotation]»}

\setcharacterspacing[frenchpunctuation]

\dontleavehmode
\hbox{«\hspace[fr][quotation]}%
xxx%
\hbox{\hspace[fr][quotation]»}

\dontleavehmode
\hbox{\expand\everyresettypesetting\relax «\hspace[fr][quotation]}%
xxx%
\hbox{\expand\everyresettypesetting\relax \hspace[fr][quotation]»}

\stoptext
%%%% end example

> What do you think about it? Is this the right way to do it?

I would use the symstyle key as hook to disable charcterspacing for the 
quotes in the environment.

%%%% begin example
\mainlanguage[fr]

\setcharacterspacing[frenchpunctuation]

\setupquotation[symstyle=\resetcharacterspacing]

\starttext

«xxx»

\startquotation xxx\stopquotation

\stoptext
%%%% end example

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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-06-07 12:18   ` Wolfgang Schuster
@ 2024-06-07 14:21     ` Alan Braslau via ntg-context
  2024-06-07 17:40       ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Braslau via ntg-context @ 2024-06-07 14:21 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Alan Braslau

I have *never* understood how this works and, in fact, have always done
weird stuff like explicitly putting a nbps before double punctuation
(:;) in my document sources. I do this as it makes the sources much
more readable, preventing my text editor from ever breaking lines
before the punctuation (and not having some space in the source looks
awkward when reading French text).

I use:

\setupcharacterspacing
  [frenchpunctuation]
  [language=fr]
\mainlanguage [fr]
\setcharacterspacing [frenchpunctuation] % why necessary?
\setupitemize [symbol=2] % dash rather than bullet

This gives proper spacing with \quotation{} and with \startquotation
... \stopquotation. Also, {\en\quotation{}} and {\de\quotation{}} in
the document correctly do not add spaces.


Is \setupquotation[symstyle=\resetcharacterspacing]
necessary?

Alan



On Fri, 7 Jun 2024 14:18:19 +0200
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> Peter Münster schrieb am 07.06.2024 um 13:31:
> > On Thu, May 30 2024, Peter Münster wrote:
> >   
> >> \mainlanguage[fr]
> >> \setcharacterspacing[frenchpunctuation]
> >> \starttext
> >> bla \quotation{OK} bla\\
> >> bla «OK» bla
> >> \startquotation
> >>    Not Ok: a space is missing
> >> \stopquotation
> >> \stoptext  
> > 
> > It seems, that this workaround solves the problem:
> > \setupquotation[before={\setcharacterspacing[reset]}]  
> 
> 
> The quotation environment doesn't rely on the characterspacing
> mechanism to add the spaces before and the after the quotes but uses
> language dependent skips.
> 
> The example below shows how it works and where it fails when you use 
> characterspacing. Resetting spacing (and probably other settings like 
> charcterkerning etc.) when the quotes are added as you noticed fixes
> the problem.
> 
> %%%% begin example
> \starttext
> 
> \dontleavehmode
> \hbox{«\hspace[fr][quotation]}%
> xxx%
> \hbox{\hspace[fr][quotation]»}
> 
> \setcharacterspacing[frenchpunctuation]
> 
> \dontleavehmode
> \hbox{«\hspace[fr][quotation]}%
> xxx%
> \hbox{\hspace[fr][quotation]»}
> 
> \dontleavehmode
> \hbox{\expand\everyresettypesetting\relax «\hspace[fr][quotation]}%
> xxx%
> \hbox{\expand\everyresettypesetting\relax \hspace[fr][quotation]»}
> 
> \stoptext
> %%%% end example
> 
> > What do you think about it? Is this the right way to do it?  
> 
> I would use the symstyle key as hook to disable charcterspacing for
> the quotes in the environment.
> 
> %%%% begin example
> \mainlanguage[fr]
> 
> \setcharacterspacing[frenchpunctuation]
> 
> 

> 
> \starttext
> 
> «xxx»
> 
> \startquotation xxx\stopquotation
> 
> \stoptext
> %%%% end example
> 
> 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
> ___________________________________________________________________________________


___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: missing space with French quotation
  2024-06-07 14:21     ` Alan Braslau via ntg-context
@ 2024-06-07 17:40       ` Wolfgang Schuster
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2024-06-07 17:40 UTC (permalink / raw)
  To: Alan Braslau; +Cc: mailing list for ConTeXt users

Alan Braslau schrieb am 07.06.2024 um 16:21:
> I have *never* understood how this works and, in fact, have always done
> weird stuff like explicitly putting a nbps before double punctuation
> (:;) in my document sources. I do this as it makes the sources much
> more readable, preventing my text editor from ever breaking lines
> before the punctuation (and not having some space in the source looks
> awkward when reading French text).
> 
> I use:
> 
> [...]
> 
> This gives proper spacing with \quotation{} and with \startquotation
> ... \stopquotation. Also, {\en\quotation{}} and {\de\quotation{}} in
> the document correctly do not add spaces.

1. \setcharacterspacing[frenchpunctuation] takes care about the space 
before/after quotation marks when you use manual quotes in a document.

It doesn't matter whether you use or don't use space between the 
quotations marks and the quoted text.

%%%% begin example
\starttext

\startlines
«quoted text»
« quoted text »
\stoplines

\setcharacterspacing[frenchpunctuation]

\startlines
«quoted text»
« quoted text »
\stoplines

\stoptext
%%%% end example

2. When you use the quotation command or environment ConTeXt adds a 
space between the quotation marks and the quoted text by itself but in 
the quotation-environment the space before the closing mark disappears 
when you add \setcharacterspacing.

%%%% begin example
\language[fr]

\starttext

\startquotation
quoted text
\stopquotation

\quotation{quoted text}

\setcharacterspacing[frenchpunctuation]

\startquotation
quoted text
\stopquotation

\quotation{quoted text}

\stoptext
%%%% end example

> Is \setupquotation[symstyle=\resetcharacterspacing] necessary?

It's a temporary fix for the problem with the quotation environment by 
disabling the characterspacing mechanism when ConTeXt places the 
quotation marks.

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] 9+ messages in thread

end of thread, other threads:[~2024-06-07 17:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-30 15:34 [NTG-context] missing space with French quotation Peter Münster
2024-05-30 17:21 ` [NTG-context] " Rik Kabel
2024-05-30 20:33   ` Wolfgang Schuster
2024-05-30 21:29     ` Rik Kabel
2024-06-04 18:31 ` Peter Münster
2024-06-07 11:31 ` Peter Münster
2024-06-07 12:18   ` Wolfgang Schuster
2024-06-07 14:21     ` Alan Braslau via ntg-context
2024-06-07 17:40       ` 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).