ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: massifr@fastwebnet.it
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: language setting scope
Date: Thu, 21 Apr 2016 16:51:13 +0200	[thread overview]
Message-ID: <1964370.ei4xF9BsLk@max> (raw)
In-Reply-To: <2692539.iptM674Df3@max>

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	other threads:[~2016-04-21 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 13:44 massifr
2016-04-20 13:50 ` massifr
2016-04-21 14:51   ` massifr [this message]

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=1964370.ei4xF9BsLk@max \
    --to=massifr@fastwebnet.it \
    --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).