ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Language dependency in environment-project file
Date: Wed, 28 Nov 2018 09:20:49 +0100	[thread overview]
Message-ID: <0885f64e-bd6c-031e-e150-e0220ff5bf5d@xs4all.nl> (raw)
In-Reply-To: <9ad4931d-0152-65b3-7bc1-516651110e1d@gmail.com>

On 11/27/2018 10:05 PM, Wolfgang Schuster wrote:
> Marco Patzer schrieb am 27.11.18 um 21:56:
>> On Tue, 27 Nov 2018 21:41:52 +0100
>> Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
>>
>>>> A nudge in the right direction appreciated.
>>> \appendtoks
>>>     \mainlanguage[\documentvariable{language}]%
>>> %\doifdocumentvariable{language}{\mainlanguage[\documentvariable{language}]}% 
>>>
>>> \to \everysetupdocument
>> That's basically what I've done in my project file (te-proj.tex). At
>> least the code is supposed to do exactly that.
>>
>> But even your solution doesn't work here. Did you try it in the
>> example project file?
> 
> \startenvironment [*]
> 
> \startsetups [itemgroup:en]
>    \setupitemgroup [itemize] [i]
> \stopsetups
> 
> \startsetups [itemgroup:sv]
>    \setupitemgroup [itemize] [a]
> \stopsetups
> 
> \setuplanguage
>    [en]
>    [setups=itemgroup:en]
> 
> \setuplanguage
>    [sv]
>    [setups=itemgroup:sv]
> 
> \appendtoks
> \doifdocumentvariable{language}{\mainlanguage[\documentvariable{language}]}
> \to \everysetupdocument
> 
> \stopenvironment
An alternative is to use system modes:

\mainlanguage[nl]

% \startmode[*en]
%     \setupitemize[n]
% \stopmode

% \startmode[*nl]
%     \setupitemize[a]
% \stopmode

% \startmode[*de]
%     \setupitemize[i]
% \stopmode

\startmodeset
     [*en] {
         \setupitemize[n]
     }
     [*nl] {
         \setupitemize[a]
     }
     [*de] {
         \setupitemize[i]
     }
\stopmodeset

\starttext

\startitemize
     \startitem test \stopitem
     \startitem test \stopitem
\stopitemize

\stoptext

where modesets have a sort of special syntax (so probably only wolfgang 
and i know that this one exists),

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2018-11-28  8:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 20:37 Marco Patzer
2018-11-27 20:41 ` Wolfgang Schuster
2018-11-27 20:56   ` Marco Patzer
2018-11-27 21:05     ` Wolfgang Schuster
2018-11-27 21:23       ` Marco Patzer
2018-11-27 21:41         ` Wolfgang Schuster
2018-11-28  7:38           ` Marco Patzer
2018-11-28 21:17             ` Wolfgang Schuster
2018-11-29 19:30             ` Wolfgang Schuster
2018-11-29 20:57               ` Marco Patzer
2018-11-28  8:20       ` Hans Hagen [this message]
2018-11-28 10:09         ` Marco Patzer

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=0885f64e-bd6c-031e-e150-e0220ff5bf5d@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --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).