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
___________________________________________________________________________________

Reply via email to