* language setting scope
@ 2016-04-20 13:44 massifr
2016-04-20 13:50 ` massifr
0 siblings, 1 reply; 3+ messages in thread
From: massifr @ 2016-04-20 13:44 UTC (permalink / raw)
To: ntg-context
Hello list,
I'm typesetting XHTML italian text with Context (version 4/4/16).
I've put a \language[it] just after \starttext, but I get words
with a wrong hyphenation.
As a patch, I just put \language[it] at the beginning of the xmlsetup
that processes the <p> tag, and now words are hyphenated right,
following the italian rules.
It looks like \language[it] get reset at some point.
Have you an explanation?
Thank you in advance,
Massi
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: language setting scope
2016-04-20 13:44 language setting scope massifr
@ 2016-04-20 13:50 ` massifr
2016-04-21 14:51 ` massifr
0 siblings, 1 reply; 3+ messages in thread
From: massifr @ 2016-04-20 13:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
I apologize for the noise.
\mainlanguage[it] before \starttext solves the problem.
> Hello list,
> I'm typesetting XHTML italian text with Context (version 4/4/16).
>
> I've put a \language[it] just after \starttext, but I get words
> with a wrong hyphenation.
>
> As a patch, I just put \language[it] at the beginning of the xmlsetup
> that processes the <p> tag, and now words are hyphenated right,
> following the italian rules.
>
> It looks like \language[it] get reset at some point.
>
> Have you an explanation?
>
> Thank you in advance,
> Massi
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: language setting scope
2016-04-20 13:50 ` massifr
@ 2016-04-21 14:51 ` massifr
0 siblings, 0 replies; 3+ messages in thread
From: massifr @ 2016-04-21 14:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
My problem was not related to \language or \mainlanguage.
It was the side-effect of a different mistake: \startnotmode
that was not closed by a \stopnotmode.
...
\startmode[Info]
... % things to do when mode Info is active
\stopmode
\startnotmode[Info]
... % things to do when mode Info is not active
\stopmode % <-- THE BUG: should be \stopnotmode
...
\mainlanguage[it] % without the right \stopnotmode this statement works only when mode Info is not active
...
I just copied and pasted \startmode[Info] ... \stopmode changing only
\startmode into \startnotmode, but not \stopmode into \stopnotmode.
context did not complain for that mismatch,
but --mode=Info made the \mainlanguage[it] ignored,
because \startnotmode[Info] was not closed.
Everything else seemed to work just fine, and the missing
italian hyphenation looked like a mistery.
Before that I used \doifmode{Info}{ ... } and \doifnotmode{Info}{ ... }:
they are less readable but more robust, since a missing brace gets
detected by context.
> I apologize for the noise.
> \mainlanguage[it] before \starttext solves the problem.
>
> > Hello list,
> > I'm typesetting XHTML italian text with Context (version 4/4/16).
> >
> > I've put a \language[it] just after \starttext, but I get words
> > with a wrong hyphenation.
> >
> > As a patch, I just put \language[it] at the beginning of the xmlsetup
> > that processes the <p> tag, and now words are hyphenated right,
> > following the italian rules.
> >
> > It looks like \language[it] get reset at some point.
> >
> > Have you an explanation?
> >
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-21 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 13:44 language setting scope massifr
2016-04-20 13:50 ` massifr
2016-04-21 14:51 ` massifr
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).