[NTG-context] system modes

2008-07-31 Thread Alan Stone
Hi,

There are *some* system modes listed in the modes manual and main manual.
Are *all* system modes listed somewhere ?

Alan
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Using modes

2005-04-28 Thread Matthias Weber
Hello,
when using modes, the names of all used modes are printed on the first 
page
of the document like

[screen]
[print]
etc.
What's the purpose, and how can I get rid of this?
I could see this being useful if the disabled modes were stricken out.
Thanks,
Matthias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \doifmodeselse?

2009-04-02 Thread Alan Stone
On Thu, Apr 2, 2009 at 6:01 PM, Gerben Wierda gerben.wie...@rna.nl wrote:

 Using --mode or --modes with texexec sets up modes which can be used in the
 files to parse different parts.

 For that I use \doifmodeelse{}{}{}

 But combining various modes in one \doiffmodeelse would be handy.

 e.g. (pseudocode)

  if mode is workinprogress or test

 or the other way around

  if mode is all or editor

 So I would like something like

 \doifmodeselse{all,editor)


Do you mean something like this ?

\starttext
\doifmodeelse{a,b}
 {\doifmode{a}{a}
  \doifmode{b}{b}}
 {c}
\stoptext

context.cmd --modes=a modes
context.cmd --modes=a,b modes
context.cmd --modes=c modes

Alan




 or even better booleans

 \doiffmodeselse{not test or editor}

 so I do not need to build a large setup of nested \ifmodeelse

 This is not in ConTeXt currently. Would it be easy to program such a
 multiple modes selector?

 G
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] system modes

2008-08-01 Thread Taco Hoekwater


Alan Stone wrote:
 Hi,
 
 There are *some* system modes listed in the modes manual and main manual.
 Are *all* system modes listed somewhere ?

The modes manual has all modes documented except for a really obscure
one (as Hans explained). There is a small error, though: *marking 
should be marking (without *)

Best wishes,
Taco
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes in newtexexec

2005-12-12 Thread Hans Hagen

Johan Sandblom wrote:


Hello.

Doing

texmfstart texexec

now appears to call newtexexec. However, newtexexec does not seem to
handle --mode at all. Is it coming? Should I set it up so I can call
texexec directly in order to use modes?
 

i ran into that as well, it does recognize the modes (plural) option; 
the problem is (was since i fixed it) in


--modes
--modefile

and mode got resolved to modefile

Hans

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \doifmodeselse?

2009-04-02 Thread Alan Stone
For your information...

http://www.pragma-ade.com/general/manuals/mmodes.pdf

Alan

On Thu, Apr 2, 2009 at 6:28 PM, Alan Stone software.list.1e...@gmail.comwrote:

  On Thu, Apr 2, 2009 at 6:01 PM, Gerben Wierda gerben.wie...@rna.nlwrote:

 Using --mode or --modes with texexec sets up modes which can be used in
 the files to parse different parts.

 For that I use \doifmodeelse{}{}{}

 But combining various modes in one \doiffmodeelse would be handy.

 e.g. (pseudocode)

  if mode is workinprogress or test

 or the other way around

  if mode is all or editor

 So I would like something like

 \doifmodeselse{all,editor)


 Do you mean something like this ?

 \starttext
 \doifmodeelse{a,b}
  {\doifmode{a}{a}
   \doifmode{b}{b}}
  {c}
 \stoptext

 context.cmd --modes=a modes
 context.cmd --modes=a,b modes
 context.cmd --modes=c modes

 Alan




 or even better booleans

 \doiffmodeselse{not test or editor}

 so I do not need to build a large setup of nested \ifmodeelse

 This is not in ConTeXt currently. Would it be easy to program such a
 multiple modes selector?

 G


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes

2010-10-15 Thread Henning Hraban Ramm

Am 2010-10-14 um 15:57 schrieb Hans Hagen:


(for module writers)

The latest beta gives access to modes at the lua end


Wikified (unmodified):
http://wiki.contextgarden.net/Modes#Modes_in_LuaTeX


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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
___


Re: [NTG-context] Modes in Lua

2017-05-31 Thread MF
if tex.modes['specialmode'] then
context('I’m special.')
end
 
Best greetings,
Massi

> Hi, this should be easy:
> 
> How can I access ConTeXt’s modes in Lua? Is it any different with
> language modes (*en)?
> 
> e.g.
> 
> \startluacode
> 
> if context.modes['specialmode'] then
> context('I’m special.')
> end
> 
> \stopluacode
> 

___
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
___

[NTG-context] modes questions

2008-09-11 Thread Alan Stone
Hi,

(1) --mode=modelist

(1.1) Is there a limit to the number of modes in modelist ?

(1.2) Is there a way to call the modelist and submit it to conditional
testing within ConTeXt ? For example, to lookup (true/false) the
presence of modes containing/starting with (an) alphannumeric
string(s) ?

(2) --modefile=file

(2.1) What's the syntax of a modefile ?

(2.2) How does ConTeXt handle a modefile ? Are the modes parsed into a
modelist ( re: question 1.2 ) ?

-- 
Best,
Alan

* using ConTeXt ver: 2008.08.18 14:00 MKIV fmt: 2008.8.22 int:
english/english (on Windows XP)
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-11 Thread Taco Hoekwater
Hans Hagen wrote:
 
 (1.2) Is there a way to call the modelist and submit it to conditional
 testing within ConTeXt ? For example, to lookup (true/false) the
 presence of modes containing/starting with (an) alphannumeric
 string(s) ?
 
 \doifmodeelse{somemode} { } { } etc etc etc

This presumes that you actually know the list of enabled modes, so
I think a commalist of set modes would be useful as well. Modules
could use that to set up keyword-based behaviours.

Best wishes,
Taco
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \doifmodeselse?

2009-04-02 Thread Gerben Wierda
Using --mode or --modes with texexec sets up modes which can be used  
in the files to parse different parts.


For that I use \doifmodeelse{}{}{}

But combining various modes in one \doiffmodeelse would be handy.

e.g. (pseudocode)

  if mode is workinprogress or test

or the other way around

  if mode is all or editor

So I would like something like

\doifmodeselse{all,editor)

or even better booleans

\doiffmodeselse{not test or editor}

so I do not need to build a large setup of nested \ifmodeelse

This is not in ConTeXt currently. Would it be easy to program such a  
multiple modes selector?


G
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Using modes

2005-04-28 Thread Willi Egger
Hi Matthias
I see there is a problem in your case. Still it is not possible to give 
you a meaningful answer if there is no detailed information.

Could you provide a minimal example which is producing the mentioned 
bahviour?

Willi
Matthias Weber wrote:
Hello,
when using modes, the names of all used modes are printed on the first page
of the document like
[screen]
[print]
etc.
What's the purpose, and how can I get rid of this?
I could see this being useful if the disabled modes were stricken out.
Thanks,
Matthias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] modes with Scite

2006-07-22 Thread dwarnold45
All,

I am using the Scite editor provided by one of the Context dristributions.

Is there a way to include modes with one of the various compiling commands?
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Slides and notes

2003-11-03 Thread Fabrice Popineau

 I use the modes mechanism (\startmode, \stopmode and friends) and I am
 lacking imagination as to want more.

Something like :

\startslide

\stopslide

\startnote

\stopnote

together with modes screen and handout that would either generate 
only slides or print them like this :


| --   |
| ||   notes   |
| ||   notes   |
| ||   |
| ||   |
| --   |
|  |
| --   |
| ||   notes   |
| ||   notes   |
| ||   |
| ||   |
| --   |


Fabrice

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] new small manual

2005-02-23 Thread Hans Hagen
A small manual on modes (i need a place to discuss system modes -)
http://www.pragma-ade.com/show-man-41.htm
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] system modes

2008-08-01 Thread Alan Stone
Never mind, the main sections system modes do the trick.

Best,
Alan

On Fri, Aug 1, 2008 at 11:42 AM, Alan Stone
[EMAIL PROTECTED]wrote:

 Unless I'm mistaken, the non-documented *headertext isn't operational any
 more.
 Has it been replaced with something else ? If not, I'm misunderstanding its
 meaning.

 Alan

 On Fri, Aug 1, 2008 at 10:20 AM, Hans Hagen [EMAIL PROTECTED] wrote:

 Alan Stone wrote:
  Hi,
 
  There are *some* system modes listed in the modes manual and main
 manual.
  Are *all* system modes listed somewhere ?

 only the official ones -)

 when you uncover features in the manual that is not documented it can be

 - something new, official, that should be documented

 - something secret (maybe experimental) but visible since everything is
 visible

 - something just for me (can be something obscure)

 Hans



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Using modes

2005-04-28 Thread Matthias Weber
Hello Willi,
I have just change a major projects to modes, so in producing a minimal 
example
the effect takes a slightly different form:

\starttext
\disablemode[screen]
\enablemode[print]
\startmode[screen]
Screen Version
\stopmode[screen]
\startmode[print]
Print Version
\stopmode[print]
\stoptext

Matthias

On Apr 28, 2005, at 2:00 PM, Willi Egger wrote:
Hi Matthias
I see there is a problem in your case. Still it is not possible to 
give you a meaningful answer if there is no detailed information.

Could you provide a minimal example which is producing the mentioned 
bahviour?

Willi
Matthias Weber wrote:
Hello,
when using modes, the names of all used modes are printed on the 
first page
of the document like
[screen]
[print]
etc.
What's the purpose, and how can I get rid of this?
I could see this being useful if the disabled modes were stricken out.
Thanks,
Matthias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Question on enabling/disabling modes

2018-08-27 Thread Mikael P. Sundqvist
Hi!

I am writing notes for my teaching and would like to do the following with
modes:

* If the file is compiled with context file.tex then everything (i.e. the
content in all modes) is typeset.
* If the file is compiled with context --mode=test1 file.tex then only mode
test1 is typeset.

I do not see how to do this easily. The example I am working on looks like
this:

%%% file.tex
\definemode[test1][keep]
\definemode[test2][keep]
\starttext
\startmode[test1]
We are in mode test1.
\stopmode
\startmode[test2]
We are in mode test2.
\stopmode
\stoptext
%%%

This, however, naturally gives not output, since the modes test1 and test2
are not activated. If I compile with context --mode=test1 file.tex I get
the content in mode test1, as I want.

I have tried to change "keep" to "yes" in the setup of the modes, but then
the material in both modes are typeset no matter what command flag I use.

Do I miss something?

/Mikael

PS In reality I have about 25 lectures, so using this method there will be
about 25 modes in total.
___
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
___

Re: [NTG-context] Project structure and modes

2011-11-11 Thread Aditya Mahajan

On Fri, 11 Nov 2011, Hans Hagen wrote:


On 11-11-2011 16:02, Wolfgang Schuster wrote:

Hi Hans,

can you add the systemmodes for products, components etc. in MkIV because 
they are missing.


\startproduct test
\doifmodeelse{*product}{YES}{NO}
\stopproduct


I've added it but it needs checking as we need to push/pop modes (so there is 
now also \pushmode \popmode).


I have a hard time imagining a situation where push/pop modes will be 
useful. It it just so that we can avoid a group?


Aditya
___
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
___


[NTG-context] Modes for configuration

2005-10-15 Thread Alan Bowen
Following the example in the ConTeXt Wiki (http:// 
wiki.contextgarden.net/Modes) I have defined an environment file that  
specifies two modes (screen, print) for the production of the same  
source file. This works well when the appropriate texexec commands  
are given at the command line.


The problem is that I am trying to set  this production up for users  
who are happier with a GUI. Is there a way to do generate diverse  
outputs from the same source file without resorting to the command  
line? I have experimented with TeXShop—the users tend to works on Macs 
—but without success thus far.


Thanks for any suggestions.

Alan


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Modes in Lua

2017-05-31 Thread Henning Hraban Ramm
Hi, this should be easy:

How can I access ConTeXt’s modes in Lua? Is it any different with language 
modes (*en)?

e.g.

\startluacode

if context.modes['specialmode'] then
context('I’m special.')
end

\stopluacode


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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
___

Re: [NTG-context] system modes

2008-08-01 Thread Hans Hagen
Alan Stone wrote:
 Hi,
 
 There are *some* system modes listed in the modes manual and main manual.
 Are *all* system modes listed somewhere ?

only the official ones -)

when you uncover features in the manual that is not documented it can be

- something new, official, that should be documented

- something secret (maybe experimental) but visible since everything is 
visible

- something just for me (can be something obscure)

Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] system modes

2008-08-01 Thread Alan Stone
Unless I'm mistaken, the non-documented *headertext isn't operational any
more.
Has it been replaced with something else ? If not, I'm misunderstanding its
meaning.

Alan

On Fri, Aug 1, 2008 at 10:20 AM, Hans Hagen [EMAIL PROTECTED] wrote:

 Alan Stone wrote:
  Hi,
 
  There are *some* system modes listed in the modes manual and main manual.
  Are *all* system modes listed somewhere ?

 only the official ones -)

 when you uncover features in the manual that is not documented it can be

 - something new, official, that should be documented

 - something secret (maybe experimental) but visible since everything is
 visible

 - something just for me (can be something obscure)

 Hans

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-11 Thread Alan Stone
On Thu, Sep 11, 2008 at 12:52 PM, Taco Hoekwater [EMAIL PROTECTED] wrote:
 Hans Hagen wrote:

 (1.2) Is there a way to call the modelist and submit it to conditional
 testing within ConTeXt ? For example, to lookup (true/false) the
 presence of modes containing/starting with (an) alphannumeric
 string(s) ?

 \doifmodeelse{somemode} { } { } etc etc etc

 This presumes that you actually know the list of enabled modes, so
 I think a commalist of set modes would be useful as well. Modules
 could use that to set up keyword-based behaviours.

That's what I meant. Thanks for clarifying.

 Best wishes,
 Taco

-- 
Best,
Alan

* using ConTeXt ver: 2008.08.18 14:00 MKIV fmt: 2008.8.22 int:
english/english (on Windows XP)
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Modes for configuration

2005-10-17 Thread Hans Hagen

Alan Bowen wrote:

Following the example in the ConTeXt Wiki (http:// 
wiki.contextgarden.net/Modes) I have defined an environment file that  
specifies two modes (screen, print) for the production of the same  
source file. This works well when the appropriate texexec commands  
are given at the command line.


The problem is that I am trying to set  this production up for users  
who are happier with a GUI. Is there a way to do generate diverse  
outputs from the same source file without resorting to the command  
line? I have experimented with TeXShop�the users tend to works on Macs 
�but without success thus far.


(1) at the top of the file you can say:

% modes=...

i can think of a 'plugin' in texexec that pops up a menu asking what 
mode to use (maybe you should put it put it on the wish list in the 
context portal -)


Hans


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A problem with modes

2012-06-26 Thread Wolfgang Schuster

Am 26.06.2012 um 22:12 schrieb Marcin Borkowski:

 Hello,
 
 this doesn't work for me:
 
 \definestartstop[amode][before={\startmode[a]},
after={\stopmode}]
 
 \starttext
 
 All modes.
 \startamode
  ``A'' mode.
 \stopamode
 
 \stoptext
 
 Can I use \startmode with \definestartstop?

No you can’t.

 Or is there a better way to do something like this?

It depends on what you want to do. You can create a buffer command:

\def\startamode{\grabbufferdata[amode][startamode][stopamode]}
%\def\stopamode {\getbuffer[amode]}

\starttext

All modes.
\startamode
“A” mode.
\stopamode

\stoptext

or you use my annotation module:

\usemodule[annotation]

\defineannotation[amode][alternative=text]
%\defineannotation[amode][alternative=none]

\starttext

All modes.
\startamode
“A” mode.
\stopamode

\stoptext

Wolfgang
___
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
___


Re: [NTG-context] Document structure - some questions

2005-03-13 Thread Taco Hoekwater
Hi Willi,
Hi Marcin,
How do the system modes (*...-modes) work exactly?  I managed to make
\startmode[*interaction] ... \stopmode
work, but what about the others starred modes?
Most of these modes are only set part of the time. For instance,
the *sectionnumber mode is only sensible when it used from a macro that
is called from within the processing of the section title's typesetting
commands.
This would for instance happen if you had
  \setuphead[section][command=\Mymacro]
somewhere. This entire *sectionnumber system mode makes no sense at
an other time.
I hope that helps.
What are the possible parameters for the \setupoutput command?

[pdftex][dvi]
To be a bit more precise (stuff on same line is an alias):
  dvipsone  % dvi for processing by YandY's dvipsone
  dviwindo  % dvi for viewing by dviwindo
  dvips % dvi for processing by dvips
  dviview   % dvi for viewing by dviview
  pdftex,pdf% pdf for pdftex
  dvipdfm,dpm   % dvi for subsequent use with dvipdfm
  dvipdfmx,dpx  % dvi for subsequent use with dvipdfmx
  acrobat   % dvi for subsequent distilling with acrobat
  xetex,xtx % xdv for XeTeX
default is normally 'dvips'
Greetings, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Using modes

2005-04-28 Thread Matthias Weber
Hello again,
oh my, this was a stupid mistake. I added the
[screen] and [print] parameters to \stopmode.
No wonder that is what is being printed.
Sorry for the confusion!
Matthias
On Apr 28, 2005, at 2:00 PM, Willi Egger wrote:
Hi Matthias
I see there is a problem in your case. Still it is not possible to 
give you a meaningful answer if there is no detailed information.

Could you provide a minimal example which is producing the mentioned 
bahviour?

Willi
Matthias Weber wrote:
Hello,
when using modes, the names of all used modes are printed on the 
first page
of the document like
[screen]
[print]
etc.
What's the purpose, and how can I get rid of this?
I could see this being useful if the disabled modes were stricken out.
Thanks,
Matthias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Modes in Lua

2017-05-31 Thread Pablo Rodriguez
On 05/31/2017 11:03 AM, MF wrote:
> if tex.modes['specialmode'] then
> context('I’m special.')
> end
>  
> Best greetings,
> Massi
> 
>> Hi, this should be easy:
>>
>> How can I access ConTeXt’s modes in Lua? Is it any different with
>> language modes (*en)?

This is the way to detect system modes, but I don’t know how to do it
for \mainlanguage (**en).

\mainlanguage[es]
\starttext
\en\startlua
if tex.systemmodes['en'] then
context('Language is English.')
else
context('Language is not English.')
end
context('\\par')
if tex.modes['es'] then
context('Main language is Spanish.')
else
context('Main language is not Spanish.')
end
\stoplua
\stoptext

Just in case it help,

Pablo
-- 
http://www.ousia.tk
___
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
___

Re: [NTG-context] Modes in Lua

2017-05-31 Thread Hans Hagen

On 5/31/2017 4:51 PM, Pablo Rodriguez wrote:

On 05/31/2017 11:03 AM, MF wrote:

if tex.modes['specialmode'] then
 context('I’m special.')
end
  
Best greetings,

Massi


Hi, this should be easy:

How can I access ConTeXt’s modes in Lua? Is it any different with
language modes (*en)?


This is the way to detect system modes, but I don’t know how to do it
for \mainlanguage (**en).

 \mainlanguage[es]
 \starttext
 \en\startlua
 if tex.systemmodes['en'] then
 context('Language is English.')
 else
 context('Language is not English.')
 end
 context('\\par')
 if tex.modes['es'] then
 context('Main language is Spanish.')
 else
 context('Main language is not Spanish.')
 end
 \stoplua
 \stoptext

Just in case it help,

tex.modes['*en']
tex.modes['**en']

tex.systemmodes['en']
tex.systemmodes['*en']

-
  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
___

Re: [NTG-context] Question on enabling/disabling modes

2018-08-27 Thread Taco Hoekwater


> On 27 Aug 2018, at 14:14, Mikael P. Sundqvist  wrote:
> 
> Hi!
> 
> I am writing notes for my teaching and would like to do the following with 
> modes:
> 
> * If the file is compiled with context file.tex then everything (i.e. the 
> content in all modes) is typeset.
> * If the file is compiled with context --mode=test1 file.tex then only mode 
> test1 is typeset.
> 
> I do not see how to do this easily.


This is what I would do if the list of modes is small:

\doifnotmode{test1}{\enablemode[test1,test2]}

(and don’t use the \definemode lines)

But if you need many of them, that could get problematic with
many nested \doifmodeelse statements. 

In that case, I would use a separate ‘all’ mode, and call the
context script with that as argument in the generic case.


%%% file.tex
\starttext
\startmode[test1,all]
We are in mode test1.
\stopmode
\startmode[test2,all]
We are in mode test2.
\stopmode
\stoptext
%%%


Best wishes,
Taco

Taco Hoekwater
Elvenkind BV




___
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
___

[NTG-context] setting mode in ctx-file

2008-08-27 Thread Peter Münster
Hello,

How can I set a mode in a ctx-file? I would like to pass such a file to
context --ctx=file ...

If further modes are passed with --mode=..., these modes should not replace
the mode in the ctx-file, but should be added.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] multiple modes

2006-08-11 Thread Hans Hagen
Taco Hoekwater wrote:
 David Arnold wrote:
   
 All,

 Is this sort of thing ok?

 texexec --mode=short,copyright,paging chapter1
 

 I think so ...
   
 ah, i see, the chapter 1 is not part of the modes -) 

isn't that in mmodes.pdf ? must check 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] modes in newtexexec

2005-12-09 Thread Johan Sandblom
Hello.

Doing

texmfstart texexec

now appears to call newtexexec. However, newtexexec does not seem to
handle --mode at all. Is it coming? Should I set it up so I can call
texexec directly in order to use modes?

Regards, Johan
--
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
- Bertrand Russell
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] A problem with modes

2012-06-26 Thread Marcin Borkowski
Hello,

this doesn't work for me:

\definestartstop[amode][before={\startmode[a]},
after={\stopmode}]

\starttext

All modes.
\startamode
  ``A'' mode.
\stopamode

\stoptext

Can I use \startmode with \definestartstop?  Or is there a better way
to do something like this?

TIA

-- 
Marcin Borkowski
http://mbork.pl
___
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
___


[NTG-context] nested modes

2009-09-16 Thread Peter Münster
Hello,

Here is a problem with nested modes:

\starttext
no mode
\startmode[mode1]
  mode1a
  \startmode[mode2]
mode2
  \stopmode
  mode1b % this is printed, but it should not
\stopmode
no mode
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-11 Thread Hans Hagen
Taco Hoekwater wrote:
 Hans Hagen wrote:
 (1.2) Is there a way to call the modelist and submit it to conditional
 testing within ConTeXt ? For example, to lookup (true/false) the
 presence of modes containing/starting with (an) alphannumeric

\doifinstring

 string(s) ?
 \doifmodeelse{somemode} { } { } etc etc etc
 
 This presumes that you actually know the list of enabled modes, so
 I think a commalist of set modes would be useful as well. Modules
 could use that to set up keyword-based behaviours.

there is already such a mechanism (thomas uses it in his module)

maybe at some point in mkiv we can provide the list because then i can 
use lua for keeping track of things; maintaining a comma separated list 
is tex is not that fast (and i use modes a lot to control styles that 
need a high performance); think of

\enablemode[a,b,c]

and a large list of enabled modes that we need to check for already set 
nodes (in lua it's just a hash and a the fill list a list-of-keys)

btw, this would make mkiv incompatible with mkii

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-11 Thread Alan Stone
On Thu, Sep 11, 2008 at 1:37 PM, Hans Hagen [EMAIL PROTECTED] wrote:
 Taco Hoekwater wrote:
 Hans Hagen wrote:
 (1.2) Is there a way to call the modelist and submit it to conditional
 testing within ConTeXt ? For example, to lookup (true/false) the
 presence of modes containing/starting with (an) alphannumeric

 \doifinstring

 string(s) ?
 \doifmodeelse{somemode} { } { } etc etc etc

 This presumes that you actually know the list of enabled modes, so
 I think a commalist of set modes would be useful as well. Modules
 could use that to set up keyword-based behaviours.

 there is already such a mechanism (thomas uses it in his module)

Is this mechanism documented somewhere ?

 maybe at some point in mkiv we can provide the list because then i can
 use lua for keeping track of things; maintaining a comma separated list
 is tex is not that fast (and i use modes a lot to control styles that
 need a high performance); think of

 \enablemode[a,b,c]

 and a large list of enabled modes that we need to check for already set
 nodes (in lua it's just a hash and a the fill list a list-of-keys)

 btw, this would make mkiv incompatible with mkii

-- 
Best,
Alan

* using ConTeXt ver: 2008.08.18 14:00 MKIV fmt: 2008.8.22 int:
english/english (on Windows XP)
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Does \startnotallmodes work?

2022-05-10 Thread Rik Kabel via ntg-context

On 2022-05-10 17:39, Gerben Wierda via ntg-context wrote:

Example. Call with

context —mode=FR

- Uncomment the first commented lines. Compilation fails because mode 
FR is on so that works


But I get English anyway. Uncomment the second commented part and it 
fails, but it should not because mode=EN is not turned on.


%\startmode[FR]
%  \BLURBONE
%  \stopmode

\startnotallmodes[FR,RU]% english is the default
\enablemode[EN]
\stopnotallmodes

\startmode[EN]
%  \BLURBTWO
\setuplanguage[en][patterns={en}]
\setupexternalfigure[directory=../LMTX-Output/without-ids/en/ArchiMate 
3.1 Metamodel ESv4]

\stopmode
\startmode[FR]
\setuplanguage[fr][patterns={en,fr}]
\setupexternalfigure[directory=../LMTX-Output/without-ids/fr/ArchiMate 
3.1 Metamodel ESv4]

\stopmode
\startmode[RU]
\setuplanguage[ru][patterns={en,ru}]
\setupexternalfigure[directory=../LMTX-Output/without-ids/ru/ArchiMate 
3.1 Metamodel ESv4]

\stopmode

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R IT Strategy <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture 
<https://ea.rna.nl/the-book/>

Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>


Gerben,

\startnotallmodes is behaving as it should. Here, it is not the case 
that RU and FR (all the listed modes) are set, so EN is enabled, and you 
actually have both FR and EN set.


Try the following with

   context —mode=FR

and make sure you understand the result.

   \starttext
   \doifmode{EN}{EN is enabled\par}
   \doifmode{FR}{FR is enabled\par}
   \doifmode{RU}{RU is enabled\par}
   \doifmode{FR,RU}{at least one of FR and RU modes is enabled\par}
   \doifmode{EN,RU}{at least one of EN and RU modes is enabled\par}
   \doifmode{EN,FR}{at least one of EN and FR modes is enabled\par}
   \doifmode{EN,FR,RU}{at least one of EN, FR, and RU modes is enabled\par}
   \doifnotmode{EN}{EN is not enabled\par}
   \doifnotmode{FR}{FR is not enabled\par}
   \doifnotmode{RU}{RU is not enabled\par}
   \doifnotmode{EN,RU}{neither EN nor RU is enabled\par}
   \doifnotmode{EN,FR}{neither EN nor FR is enabled\par}
   \doifnotmode{RU,FR}{neither RU nor FR is enabled\par}
   \doifnotallmodes{FR,RU}{all of FR and RU modes are not enabled\par}
   \doifnotallmodes{EN,RU}{all of EN and RU modes are not enabled\par}
   \doifnotallmodes{EN,FR}{all of EN and FR modes are not enabled\par}
   \doifnotallmodes{EN,FR,RU}{all of EN, FR, and RU modes are not
   enabled\par}
   \stoptext

Then, add the following block to the beginning of the file and try again.

   \definemode[EN,FR,RU][keep]
   \doifmodeelse{EN}
  {    \disablemode[FR]
   \disablemode[RU]}
  {\doifmodeelse{FR}
   {   \disablemode[EN]
   \disablemode[RU]}
   {\doifmodeelse{RU}
 { \disablemode[EN]
   \disablemode[FR]}}
 { \enablemode[EN]}}

I find it useful to add such a block to the environment of every file 
that uses mutually-exclusive modes. This version pf the block sets a 
default value if none is on the command line.


--
Rik



___
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
___


Re: [NTG-context] modes questions

2008-09-17 Thread Alan Stone
On Thu, Sep 11, 2008 at 12:46 PM, Hans Hagen [EMAIL PROTECTED] wrote:

 Alan Stone wrote:
  Hi,
 
  (1) --mode=modelist
 
  (1.1) Is there a limit to the number of modes in modelist ?

 no, just what the console and memory permit

  (1.2) Is there a way to call the modelist and submit it to conditional
  testing within ConTeXt ? For example, to lookup (true/false) the
  presence of modes containing/starting with (an) alphannumeric
  string(s) ?

 \doifmodeelse{somemode} { } { } etc etc etc

  (2) --modefile=file
 
  (2.1) What's the syntax of a modefile ?

 this concerns examodes stuff that we use for process control at pragma

  (2.2) How does ConTeXt handle a modefile ? Are the modes parsed into a
  modelist ( re: question 1.2 ) ?

 best use ctx files instead, like in

 == somefile.ctx ===

 ?xml version='1.0' standalone='yes'?

 ctx:job
 ctx:preprocess/
 ctx:flags
 ctx:flagtexengine=luatex/ctx:flag
 ctx:flaginterface=en/ctx:flag
 /ctx:flags
 ctx:process
 ctx:resources
 ctx:modeproofing/ctx:mode
 ctx:environmentsomestyle.tex/ctx:environment
 /ctx:resources
 /ctx:process
 ctx:postprocess/
 /ctx:job

 texexec  --ctx=somefile


As I'm not familiar with XML, neither using ConTeXt with XML...

What if I want to pass a list of modes: mode1, mode2, mode3,  ?


-- 
Best,
Alan

* ConTeXt ver: 2008.09.10 14:01 MKIV fmt: 2008.9.14 int: english/english
* Windows XP Home SP3
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-17 Thread Hans Hagen
Alan Stone wrote:
 On Thu, Sep 11, 2008 at 12:46 PM, Hans Hagen [EMAIL PROTECTED] wrote:
 
 Alan Stone wrote:
 Hi,

 (1) --mode=modelist

 (1.1) Is there a limit to the number of modes in modelist ?
 no, just what the console and memory permit

 (1.2) Is there a way to call the modelist and submit it to conditional
 testing within ConTeXt ? For example, to lookup (true/false) the
 presence of modes containing/starting with (an) alphannumeric
 string(s) ?
 \doifmodeelse{somemode} { } { } etc etc etc

 (2) --modefile=file

 (2.1) What's the syntax of a modefile ?
 this concerns examodes stuff that we use for process control at pragma

 (2.2) How does ConTeXt handle a modefile ? Are the modes parsed into a
 modelist ( re: question 1.2 ) ?
 best use ctx files instead, like in

 == somefile.ctx ===

 ?xml version='1.0' standalone='yes'?

 ctx:job
 ctx:preprocess/
 ctx:flags
 ctx:flagtexengine=luatex/ctx:flag
 ctx:flaginterface=en/ctx:flag
 /ctx:flags
 ctx:process
 ctx:resources
 ctx:modeproofing/ctx:mode
 ctx:environmentsomestyle.tex/ctx:environment
 /ctx:resources
 /ctx:process
 ctx:postprocess/
 /ctx:job

 texexec  --ctx=somefile
 
 
 As I'm not familiar with XML, neither using ConTeXt with XML...
 
 What if I want to pass a list of modes: mode1, mode2, mode3,  ?

just add more

ctx:modeanothermode/ctx:mode
ctx:modeandanotherone/ctx:mode


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-20 Thread Hans Hagen
Alan Stone wrote:
 Are such macros possible ?
 
 modes: ma, mb, ... mz
 values: va, vb, ... vz
 command: cmd
 parameter: p
 
 (1) instead of
 
 \doifmode{ma}{\cmd[name][va]}
 \doifmode{mb}{\cmd[name][vb]}
 
 \doifmode{mz}{\cmd[name][vz]}
 
 a macro which does: \doifmode{m*}{\cmd[name][v*]}
 
 (2) instead of
 
 \doifmode{ma}{\cmd[p=va]}
 \doifmode{mb}{\cmd[p=vb]}
 
 \doifmode{mz}{\cmd[p=vz]}
 
 a macro which does: \doifmode{m*}{\cmd[p=v*]}

nl, because there is no knowledge of what modes are set (i could cook 
something up for mkiv or course)

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Project structure and modes

2011-11-12 Thread Hans Hagen

On 12-11-2011 00:38, Aditya Mahajan wrote:

On Fri, 11 Nov 2011, Hans Hagen wrote:


On 11-11-2011 16:02, Wolfgang Schuster wrote:

Hi Hans,

can you add the systemmodes for products, components etc. in MkIV
because they are missing.

\startproduct test
\doifmodeelse{*product}{YES}{NO}
\stopproduct


I've added it but it needs checking as we need to push/pop modes (so
there is now also \pushmode \popmode).


I have a hard time imagining a situation where push/pop modes will be
useful. It it just so that we can avoid a group?


indeed and in this case, environments and such are definitely nit grouped

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] document structure (small bug)

2006-07-22 Thread Taco Hoekwater
Hi Hans-es,

Hans van der Meer wrote:
 
 
 No, I must be my fault, but even with the above help I cannot get it  
 working.
 As far as I can figure out the value of \currentproduct seems NOT to  
 guard entry to the body of \startlocalenvironment[syllabus-s].  

This took a bit of digging, it appears to be a bug in core-job.tex.
The definition of \setvalue{\e!start\v!localenvironment} ends with:

  {\grabuntil{\e!stop\v!localenvironment}\relax}}

but that should be:

  {\grabuntil{\e!stop\v!localenvironment}\gobbleoneargument}}


 Also \localenvironment seems to accept any  
 file for reading instead of rejecting everything except the current  
 product/component.

Yes, it only guards against loading the environment file twice. The
name is irrelevant.

 In the code of core-job.tex I read:
 
 % more or less replaced by modes
 \setvalue{\e!start\v!localenvironment}[#1]%
 
 
 Must I conclude from this that localenvironments are more or less  
 passe? So that I can better avoid them and use modes (after
 \enablemode) as discriminating criterium?

There are probably system modes predefined for the products
name etc. I'll leave the question to be answered by Hans.

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A problem with modes

2012-06-26 Thread Marcin Borkowski
Dnia 2012-06-26, o godz. 22:44:40
Wolfgang Schuster schuster.wolfg...@googlemail.com napisał(a):

 
 Am 26.06.2012 um 22:12 schrieb Marcin Borkowski:
 
  Hello,
  
  this doesn't work for me:
  
  \definestartstop[amode][before={\startmode[a]},
 after={\stopmode}]
  
  \starttext
  
  All modes.
  \startamode
   ``A'' mode.
  \stopamode
  
  \stoptext
  
  Can I use \startmode with \definestartstop?
 
 No you can’t.

I was afraid of this...

  Or is there a better way to do something like this?
 
 It depends on what you want to do. You can create a buffer command:
 
 \def\startamode{\grabbufferdata[amode][startamode][stopamode]}
 %\def\stopamode {\getbuffer[amode]}
 
 \starttext
 
 All modes.
 \startamode
 “A” mode.
 \stopamode
 
 \stoptext

Thanks, it worked.  One question: is there any difference between

\def\starta{...}
\def\stopa{...}

and

\definestartstop[a][before={...},after={...}]

?

 Wolfgang

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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
___

[NTG-context] Modes in MkIV minimals (bug?)

2010-10-24 Thread Matija Šuklje
Hullo,


I'm working on my thesis (and it's pf_ul styling[1]) and I tried to include 
modes.

The thing is that modes seem to be set right and work when invoked in CLI 
(e.g. 'context --mode=osnutek,zaslon diplomska.tex', but ConteXt seems to 
completely igonore lines in text such as:

\enablemode[osnutek]

Is this a bug or am I doing something wrong?

I'm using minimals:
MTXrun | current version: 2010.06.18 11:26


Cheers,
Matija

P.S. Is ConTeXt (mkIV) in TexLive 2010 deemed as stable and usable?
-.-.-
[1] 
http://wiki.contextgarden.net/Law_Faculty_University_of_Ljubljana_Styling_and_citations
-- 
gsm:+386 41 849 552
www:http://matija.suklje.name
xmpp:   matija.suk...@gabbler.org


signature.asc
Description: This is a digitally signed message part.
___
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
___


Re: [NTG-context] Modes in MkIV minimals (bug?)

2010-10-24 Thread Wolfgang Schuster

Am 24.10.2010 um 21:21 schrieb Matija Šuklje:

 Hullo,
 
 
 I'm working on my thesis (and it's pf_ul styling[1]) and I tried to include 
 modes.
 
 The thing is that modes seem to be set right and work when invoked in CLI 
 (e.g. 'context --mode=osnutek,zaslon diplomska.tex', but ConteXt seems to 
 completely igonore lines in text such as:
 
 \enablemode[osnutek]
 
 Is this a bug or am I doing something wrong?

Do you enable the mode before it is used or after it, e.g.

\enablemode[foo]
\startmode[foo]
...
\stopmode

use the content of the mode „foo“ while

\startmode[foo]
...
\stopmode
\enablemode[foo]

doesn’t use it because at the time the mode was called it was disabled and the 
\enablemode has therefore no effect because it’s calles to late.

If this doesn’t apply to you make a minimals example.

Wolfgang

___
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
___


Re: [NTG-context] Passing and retrieveing a variable

2011-01-05 Thread Wolfgang Schuster

Am 05.01.2011 um 20:22 schrieb Procházka Lukáš:

 Hello,
 
 I'd need to pass a variable to Ctx and to retrieve it inside a compiled 
 document - via Ctx itself and also by Lua. Something like modes; but modes 
 allow just to check whether they are on or off. I'd need something like this:

You can check modes in Lua:

context --arguments=size=small --mode=print test.tex

\starttext

Print mode: \doifmodeelse{print}{yes}{no}

\startluacode
if tex.modes['print'] then
context(Print mode is enabled)
else
context(Print mode is disabled)
end
\stopluacode

\doifenvelse{size}
  {\processaction
 [\env{size}]
 [  small=Small size,
   medium=Medium size,
  big=Big size,
  unknown=Other size: \env{size}]}
  {No value “size”}

\stoptext

Wolfgang


___
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
___


[NTG-context] Document structure - some questions

2005-03-12 Thread Marcin Borkowski
Hello!

I have quite a few questions about ConTeXt (and more coming, I guess!).  
As a newbie, many things seem difficult for me.  For now, the questions 
are:

How does \part exactly work?  I could see: messing with pagenumbers; part
title not appearing; strange behaviour in eg backmatter...

How do exactly front, body, back matter and appendices environments work?

How do the system modes (*...-modes) work exactly?  I managed to make
\startmode[*interaction] ... \stopmode
work, but what about the others starred modes?

What are the possible parameters for the \setupoutput command?

Sorry for asking so many things...  I hope that when I know the answers I 
will be able to put some articles on ConTeXt wiki, so that other people do 
not bother you with the same questions again and again.

Greetings

-- 
Marcin Borkowski
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Language dependency in environment-project file

2018-11-28 Thread Marco Patzer
On Wed, 28 Nov 2018 09:20:49 +0100
Hans Hagen  wrote:

> 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

I do use modes and modesets in this project, but mainly in the
components. In the environment files it's a bit more tricky because
the language is unknown at this point and the system modes trigger
the wrong language. But Wolfgang already provided a solution, which
works fine.

Marco
___
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
___

Re: [NTG-context] Modes and conditional part of the source

2019-02-28 Thread Aditya Mahajan

On Thu, 28 Feb 2019, Procházka Lukáš Ing. wrote:


Hello,

I'm struggling with using modes to make a part of the text conditional.

Here is my code:


\def\b#1{\startmode[#1]}
\def\e{\stopmode}

% \enablemode[100] % For optional usage

\starttext
A
\b{100} % Should be start of some conditional text from here ...
  B
\e % ... to here
\stoptext


Modes don't work that way. You can do something like this:

\define[1]\bbb
{\doifnotmode{#1}
{\grabbufferdata[dummy][bbb][eee]}}

\let\eee\relax

\enablemode[100]

\starttext
A

\bbb{100}
  Inside mode 100
\eee

\bbb{101}
  Inside mode 101
\eee

\stoptext


Depending on the actual use case, there might be simpler ways.

Aditya___
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
___


Re: [NTG-context] Modes and conditional part of the source

2019-02-28 Thread Hans Hagen

On 2/28/2019 11:29 AM, Procházka Lukáš Ing. wrote:

Hello,

I'm struggling with using modes to make a part of the text conditional.

Here is my code:


\def\b#1{\startmode[#1]}
\def\e{\stopmode}

% \enablemode[100] % For optional usage

\starttext
   A
   \b{100} % Should be start of some conditional text from here ...
     B
   \e % ... to here
\stoptext


Compilation fails with:

"
tex error   > tex error on line 0 in file : ! Emergency stop
<*> cont-yes.mkiv

*** (job aborted, no legal \end found)
"

How to make the sample work?

modes are like buffers ... don't wrap them in macros

(using names like \b \e is a bad idea anyway)

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
___


[NTG-context] Conditional formatting with *frontpart, *bodypart, *backpart modes

2021-08-12 Thread Joey McCollum via ntg-context
Hi,

I was curious about the possibility of handling general formatting settings
(e.g., page layout, headers and footers, page numbering, alignment, default
body font assignment, etc.) conditionally for front, body, and back matter
using modes. According to the wiki page at
https://wiki.contextgarden.net/Modes, this should be doable with blocks
like \startmode[*frontpart] ... \stopmode, but even in the following
minimal example, the conditional formatting isn't getting applied:

```

\startmode[*frontpart]

\setupbodyfont[modern, 12pt]

\stopmode

\startmode[*bodypart]

\setupbodyfont[pagella, 12pt]

\stopmode

\startmode[*backpart]

\setupbodyfont[termes, 12pt]

\stopmode


\starttext

\startfrontmatter

\input knuth\par

\stopfrontmatter

\startbodymatter

\input knuth\par

\stopbodymatter

\startbackmatter

\input knuth\par

\stopbackmatter

\stoptext
```

Is there something obvious that I'm missing? Or is there a different
recommended approach to conditional formatting by front/body/back matter
division?

Thank you!

Joey
___
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
___


Re: [NTG-context] How do I write a digital book that can become a physical book without a lot of modifications?

2022-09-10 Thread Mikael Sundqvist via ntg-context
On Sat, Sep 10, 2022 at 2:43 PM amano.kenji via ntg-context
 wrote:
>
> A digital book doesn't need to be double-sided.
>
> But, a physical book can be double-sided.
>
> Double-sidedness may require adjusting contents in many places.
>
> How can I write a digital book that doesn't have to be heavily modified in 
> order to become a physical book? I want almost no modification at all.

I think you can use modes: https://wiki.contextgarden.net/Modes.
Simply do different setups in different modes. Then choose the mode at
compilation time.

/Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] hierarchical modes

2008-05-15 Thread Janko Hauser
Hello, I need to prepare a document for different audiences. The  
question here is, how to encapsulate the different parts of the  
document. There are paragraphs which are public, some more which are  
internal and some which are private. People who are in the private  
group should see everything, the group internal only the public parts  
and the internal ones. As far as I see, modes are not additive.
What would be the best way to structure such a document and to style  
the different paragraphs, so that the different audiences see, who can  
read what?

Thanks in advance,

__Janko Hauser
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Project structure and modes

2011-11-11 Thread Hans Hagen

On 11-11-2011 16:02, Wolfgang Schuster wrote:

Hi Hans,

can you add the systemmodes for products, components etc. in MkIV because they 
are missing.

\startproduct test
\doifmodeelse{*product}{YES}{NO}
\stopproduct


I've added it but it needs checking as we need to push/pop modes (so 
there is now also \pushmode \popmode).


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes with Scite

2006-07-24 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
 All,

 I am using the Scite editor provided by one of the Context dristributions.

 Is there a way to include modes with one of the various compiling commands?
   
no, but you can 

(1) temporary put \enablemode[...] at the to of the file
(2) use a separate file where you set the mode, and load the file 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] modes with Scite

2006-07-24 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
 All,

 I am using the Scite editor provided by one of the Context dristributions.

 Is there a way to include modes with one of the various compiling commands?
   
btw, you can make a local scite options file and add menu items (key bindings); 
so you can map say ctrl-F10 to process your doc using your mode; see 
context.properties for examples); local scite files are per directory 

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A problem with modes

2012-06-26 Thread Aditya Mahajan
On 2012-06-26, at 10:12 PM, Marcin Borkowski mb...@wmi.amu.edu.pl wrote:

 Hello,
 
 this doesn't work for me:
 
 \definestartstop[amode][before={\startmode[a]},
after={\stopmode}]
 
 \starttext
 
 All modes.
 \startamode
  ``A'' mode.
 \stopamode
 
 \stoptext
 
 Can I use \startmode with \definestartstop?  Or is there a better way
 to do something like this?
 
(Untested): try the \doifmodeelse version. 

Aditya
___
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
___


Re: [NTG-context] nested modes

2009-09-16 Thread Hans Hagen

Peter Münster wrote:

Hello,

Here is a problem with nested modes:

\starttext
no mode
\startmode[mode1]
  mode1a
  \startmode[mode2]
mode2
  \stopmode
  mode1b % this is printed, but it should not
\stopmode
no mode
\stoptext


indeed, will never work, when nested use \startlocalmode or \doifmodeelse

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Mode for footnote?

2015-06-23 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

there are many modes for various situations 
(http://wiki.contextgarden.net/Modes).

Is there a mode to signal being inside a footnote?

This would be handy for head definition:


\definehead[paragraph][subsubsubject]

\define\ShBlank{\doifnotmode{*footnote}{\blank}}

\setuphead[paragraph][before=\ShBlank]


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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
___

Re: [NTG-context] Modes in Lua

2017-05-31 Thread Pablo Rodriguez
On 05/31/2017 04:51 PM, Pablo Rodriguez wrote:
> [...]
> This is the way to detect system modes, but I don’t know how to do it
> for \mainlanguage (**en).

It was simple (not even using tex.systemmodes):

\mainlanguage[es]
\starttext
\en\startlua
if tex.modes['*en'] then
context('Language is English.')
else
context('Language is not English.')
end
context('\\par')
if tex.modes['**es'] then
context('Main language is Spanish.')
else
context('Main language is not Spanish.')
end
\stoplua
\stoptext

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
___
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
___

Re: [NTG-context] Checking for singlesided/doublesided at run-time

2020-06-24 Thread Aditya Mahajan

On Wed, 24 Jun 2020, Henning Hraban Ramm wrote:



I wanted to refer to the mmodes manual, but it’s gone.
Was it accidentally removed, or are modes now explained in some other manual? I 
didn’t find it.


http://www.pragma-ade.com/general/manuals/mmodes.pdf

and my tugboat article wikified at:
https://wiki.contextgarden.net/Modes

Aditya___
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
___


Re: [NTG-context] modes questions

2008-09-11 Thread Hans Hagen
Alan Stone wrote:
 Hi,
 
 (1) --mode=modelist
 
 (1.1) Is there a limit to the number of modes in modelist ?

no, just what the console and memory permit

 (1.2) Is there a way to call the modelist and submit it to conditional
 testing within ConTeXt ? For example, to lookup (true/false) the
 presence of modes containing/starting with (an) alphannumeric
 string(s) ?

\doifmodeelse{somemode} { } { } etc etc etc

 (2) --modefile=file
 
 (2.1) What's the syntax of a modefile ?

this concerns examodes stuff that we use for process control at pragma

 (2.2) How does ConTeXt handle a modefile ? Are the modes parsed into a
 modelist ( re: question 1.2 ) ?

best use ctx files instead, like in

== somefile.ctx ===

?xml version='1.0' standalone='yes'?

ctx:job
 ctx:preprocess/
 ctx:flags
 ctx:flagtexengine=luatex/ctx:flag
 ctx:flaginterface=en/ctx:flag
 /ctx:flags
 ctx:process
 ctx:resources
 ctx:modeproofing/ctx:mode
 ctx:environmentsomestyle.tex/ctx:environment
 /ctx:resources
 /ctx:process
 ctx:postprocess/
/ctx:job

texexec  --ctx=somefile


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Project structure and modes

2011-11-11 Thread Wolfgang Schuster
Hi Hans,

can you add the systemmodes for products, components etc. in MkIV because they 
are missing.

\startproduct test
\doifmodeelse{*product}{YES}{NO}
\stopproduct

Wolfgang
___
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
___


Re: [NTG-context] multiple modes

2006-08-10 Thread Taco Hoekwater
David Arnold wrote:
 All,
 
 Is this sort of thing ok?
 
 texexec --mode=short,copyright,paging chapter1

I think so ...

Taco

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] beta

2006-09-28 Thread Hans Hagen
latest upload (in 10 minutes)

- static graphics with mpenvironments
- fix for modes and protection

Hans

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Modes for configuration

2005-10-16 Thread Willi Egger

Hi Alan,

This is simle to solve:

%\enablemode[screen]
\enablemode[print]
\envrionment yourenvironment

Important is to enable the required mode before loading the environment 
file. - Dit you know that you can select multiple modes e.g. you have a 
print-mode and the document should be created for
letter, A4 and A5. So you could define a letter-mode an A4-mode and an 
A5-mode.


In the document you can say

\enablemode[print,A4]
\envrionment yourenvironment

Hope that this helps

Willi

Alan Bowen wrote:

Following the example in the ConTeXt Wiki (http:// 
wiki.contextgarden.net/Modes) I have defined an environment file that  
specifies two modes (screen, print) for the production of the same  
source file. This works well when the appropriate texexec commands  
are given at the command line.


The problem is that I am trying to set  this production up for users  
who are happier with a GUI. Is there a way to do generate diverse  
outputs from the same source file without resorting to the command  
line? I have experimented with TeXShop—the users tend to works on Macs 
—but without success thus far.


Thanks for any suggestions.

Alan


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Modes for configuration

2005-10-17 Thread Alan Bowen

Willi—

Many thanks. That is helpful and much appreciated. I missed the  
closing remark about \enablemode on the Mode page of  ConTeXt wiki  
(which I come to rely on extensively).


The advantage of the command line/texexec approach is that one can  
specify the name of the output using --result xxx and so avoid  
clobbering files. But I suspect that the users will find it easier to  
play with \enablemode commands using their various editors of choice  
and to rename the output before recompiling the file.


Alan

On Oct 16, 2005, at 2:53 PM, Willi Egger wrote:


Hi Alan,

This is simle to solve:

%\enablemode[screen]
\enablemode[print]
\envrionment yourenvironment

Important is to enable the required mode before loading the  
environment file. - Dit you know that you can select multiple modes  
e.g. you have a print-mode and the document should be created for
letter, A4 and A5. So you could define a letter-mode an A4-mode and  
an A5-mode.


In the document you can say

\enablemode[print,A4]
\envrionment yourenvironment

Hope that this helps

Willi

Alan Bowen wrote:


Following the example in the ConTeXt Wiki (http://  
wiki.contextgarden.net/Modes) I have defined an environment file  
that  specifies two modes (screen, print) for the production of  
the same  source file. This works well when the appropriate  
texexec commands  are given at the command line.


The problem is that I am trying to set  this production up for  
users  who are happier with a GUI. Is there a way to do generate  
diverse  outputs from the same source file without resorting to  
the command  line? I have experimented with TeXShop—the users tend  
to works on Macs —but without success thus far.


Thanks for any suggestions.

Alan


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Modes for configuration

2005-10-17 Thread Alan Bowen
Many thanks, Hans. The idea of a pop-up menu for texexec does have a  
peculiar charm.


Best, Alan

On Oct 17, 2005, at 4:21 AM, Hans Hagen wrote:


Alan Bowen wrote:


Following the example in the ConTeXt Wiki (http://  
wiki.contextgarden.net/Modes) I have defined an environment file  
that  specifies two modes (screen, print) for the production of  
the same  source file. This works well when the appropriate  
texexec commands  are given at the command line.


The problem is that I am trying to set  this production up for  
users  who are happier with a GUI. Is there a way to do generate  
diverse  outputs from the same source file without resorting to  
the command  line? I have experimented with TeXShop�the users  
tend to works on Macs �but without success thus far.




(1) at the top of the file you can say:

% modes=...

i can think of a 'plugin' in texexec that pops up a menu asking  
what mode to use (maybe you should put it put it on the wish list  
in the context portal -)


Hans


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Typesetting products and components

2005-02-15 Thread Peter Münster
On Mon, 14 Feb 2005, Randall Skelton wrote:

 Is it possible to determine if texexec is being run on a product or a
 component and have optional processing similar to different modes?

\ifx\currentproduct\empty
no product defined
\else
the product is \currentproduct
\fi

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Using modes

2005-04-28 Thread David Munger
Reminds me of this post:
http://archive.contextgarden.net/message/20041101.205339.1e76d98d.html

I bet that is what we all do!

David

Matthias Weber :
 Hello again,
 
 oh my, this was a stupid mistake. I added the
 [screen] and [print] parameters to \stopmode.
 No wonder that is what is being printed.
 
 Sorry for the confusion!
 
 Matthias


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Question on enabling/disabling modes

2018-08-27 Thread Henning Hraban Ramm
Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist :

> > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist  wrote:
> > 
> > Hi!
> > 
> > I am writing notes for my teaching and would like to do the following with 
> > modes:
> > 
> > * If the file is compiled with context file.tex then everything (i.e. the 
> > content in all modes) is typeset.
> > * If the file is compiled with context --mode=test1 file.tex then only mode 
> > test1 is typeset.
> > 
> > I do not see how to do this easily.
> 
> 
> This is what I would do if the list of modes is small:
> 
> \doifnotmode{test1}{\enablemode[test1,test2]}
> 
> (and don’t use the \definemode lines)
> 
> But if you need many of them, that could get problematic with
> many nested \doifmodeelse statements. 
> 
> In that case, I would use a separate ‘all’ mode, and call the
> context script with that as argument in the generic case.
> 
> 
> %%% file.tex
> \starttext
> \startmode[test1,all]
> We are in mode test1.
> \stopmode
> \startmode[test2,all]
> We are in mode test2.
> \stopmode
> \stoptext
> %%%
> 
> ___
> 
> Thank you, Taco!
> 
> I have around 25 of them, and your solution with "all" works indeed well for 
> me.


There’s also

\startnotmode[some]
This is not typeset in "some" mode.
\stopnotmode


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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
___

Re: [NTG-context] Question on enabling/disabling modes

2018-08-27 Thread Mikael P. Sundqvist
On Mon, Aug 27, 2018 at 3:17 PM Taco Hoekwater  wrote:

>
>
> > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist  wrote:
> >
> > Hi!
> >
> > I am writing notes for my teaching and would like to do the following
> with modes:
> >
> > * If the file is compiled with context file.tex then everything (i.e.
> the content in all modes) is typeset.
> > * If the file is compiled with context --mode=test1 file.tex then only
> mode test1 is typeset.
> >
> > I do not see how to do this easily.
>
>
> This is what I would do if the list of modes is small:
>
> \doifnotmode{test1}{\enablemode[test1,test2]}
>
> (and don’t use the \definemode lines)
>
> But if you need many of them, that could get problematic with
> many nested \doifmodeelse statements.
>
> In that case, I would use a separate ‘all’ mode, and call the
> context script with that as argument in the generic case.
>
>
> %%% file.tex
> \starttext
> \startmode[test1,all]
> We are in mode test1.
> \stopmode
> \startmode[test2,all]
> We are in mode test2.
> \stopmode
> \stoptext
> %%%
>
>
> Best wishes,
> Taco
>
> Taco Hoekwater
> Elvenkind BV
>
>
>
>
>
> ___
> 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
>
> ___


Thank you, Taco!

I have around 25 of them, and your solution with "all" works indeed well
for me.

/Mikael
___
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
___

Re: [NTG-context] Can modes be used for content control?

2021-11-17 Thread Henning Hraban Ramm via ntg-context

> Am 17.11.2021 um 04:06 schrieb ⁨Idris Samawi Hamid ادريس سماوي حامد via 
> ntg-context⁩ <⁨ntg-context@ntg.nl⁩>:
> 
> Unfortunately - as pointed out on the wiki - modes cannot be nested.

Why would you need that?

You know about \startnotmode and that you can use lists of modes?

\startmode[short,long]
Something that appears everywhere.
\stopmode

\startmode[long] % or \startnotmode[short]
Something that’s only in the long version.
\stopmode

There are also language modes (\startmode[*en]) that might be handy with 
translations.

> Furthermore, each mode is unique and there is apparently no 
> inheritance/continuance.

Can you give an example for a use case?

> What is needed is something like this
> 
> \startmode[abridged]
> \input knuth
> 
> \startmode[unabridged]
> \startblockquote
> \input ward
> \stopblockquote
> \stopmode
> 
> \input zapf
> \stopmode

That looks to me like flawed logic – why should content for the unabridged 
version appear within the abridged version?

It might be a bit annoying, but you could end the previous mode before starting 
the next.
And, as mentioned above, you can use \startmode with lists.

HTH

Hraban
___
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
___


Re: [NTG-context] Can modes be used for content control?

2021-11-16 Thread Aditya Mahajan via ntg-context
On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context wrote:

> Dear gang,
> 
> For creating/authoring content in ConTeXt: Can modes or the like be used  
> for content control? For example, someone wants to write at least two  
> versions of a book managed from a single file. So, e.g., we may have
> 
> a) abridged content
> b) unabridged content - includes a)
> c) abridged content + translation
> d) unabridged content + translation
> [:]
> 
> One can author and organize this in XML - pre-ConteXt - but perhaps one  
> prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe
> 
> \defineparagraphs[unabridged]
> \defineparagraphs[abridged]
> \defineparagraphs[translation]
> 
> Then one authors the complete work in a single project, but you can  
> produce a variety of versions, depending on the mode chosen:
> 
> \definemode[unabridged]
> etc.
> 
> Can one do this in context? 

Yes!

This is what I do (for solutions in homework assignments):

\definebuffer[solution][local=yes,nested=yes]

\startmode[solution]
\defineenumeration[solution][fancy setup...]
\stopmode

Then, in the main tex file:


\startsolution
...
\stopsolution


By default, gives the version without solution. Compile with --mode=solution to 
get the version with solution. The same thing should work in your case by 
defining two modes: unabridged and translation. And then use 
--mode=unabridged,translate etc to get multiple modes.

Aditya
___
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
___


Re: [NTG-context] Can modes be used for content control?

2021-11-17 Thread Hans Hagen via ntg-context

On 11/17/2021 6:56 PM, Aditya Mahajan via ntg-context wrote:

On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد wrote:


Hi Aditya,

Many thanks; see below:

On Tue, 16 Nov 2021 17:23:59 -0700, Aditya Mahajan via ntg-context
 wrote:


On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context
wrote:


Dear gang,

For creating/authoring content in ConTeXt: Can modes or the like be used
for content control? For example, someone wants to write at least two
versions of a book managed from a single file. So, e.g., we may have

a) abridged content
b) unabridged content - includes a)
c) abridged content + translation
d) unabridged content + translation
[:]

One can author and organize this in XML - pre-ConteXt - but perhaps one
prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe

\defineparagraphs[unabridged]
\defineparagraphs[abridged]
\defineparagraphs[translation]

Then one authors the complete work in a single project, but you can
produce a variety of versions, depending on the mode chosen:

\definemode[unabridged]
etc.

Can one do this in context?


Yes!

This is what I do (for solutions in homework assignments):

\definebuffer[solution][local=yes,nested=yes]

\startmode[solution]
\defineenumeration[solution][fancy setup...]
\stopmode

Then, in the main tex file:


\startsolution
...
\stopsolution


By default, gives the version without solution. Compile with --mode=solution
to get the version with solution. The same thing should work in your case by
defining two modes: unabridged and translation. And then use
--mode=unabridged,translate etc to get multiple modes.


Here's a working sample:

===
% \definebuffer[unabridged]
% \definebuffer[abridged]

\setupwhitespace[big]

\starttext
\startmode[unabridged]
\input knuth

\startblockquote
\input ward
\stopblockquote

% \startmode[abridged]
% \input knuth
% \stopmode
\stopmode

\startmode[abridged]
\input knuth
\stopmode

% \startmode[abridged]
% \input zapf
% \stopmode
\stoptext
===

Unfortunately - as pointed out on the wiki - modes cannot be nested.


But you don't have to directly use the modes. The following will work:

\definestartstop[abridged]

% By default, don't show the unabridged text
\definebuffer[unabridged][local=yes, nested=yes]

\startmode[unabridged]
% In the unabridged mode, show the abridged text
\definestartstop[unabridged]
\stopmode

\starttext
\startabridged
\input knuth

\startunabridged
\startblockquote
\input ward
\stopblockquote
\stopunabridged

\input zapf
\stopabridged

Blocks are a better mechanism, but I still prefer modes here because I find the 
\beginblock ... \endblock syntax to be a bit awkward in a context document.
it also depends on usage ... you can have blocks and delay them or reuse 
them or call them up later etc .. so you can code answers with questions 
and then call them up in an appendix



-
  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
___


Re: [NTG-context] Can modes be used for content control?

2021-11-17 Thread Aditya Mahajan via ntg-context
On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد wrote:

> Hi Aditya,
> 
> Many thanks; see below:
> 
> On Tue, 16 Nov 2021 17:23:59 -0700, Aditya Mahajan via ntg-context
>  wrote:
> 
> > On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context
> > wrote:
> > 
> > > Dear gang,
> > > 
> > > For creating/authoring content in ConTeXt: Can modes or the like be used
> > > for content control? For example, someone wants to write at least two
> > > versions of a book managed from a single file. So, e.g., we may have
> > > 
> > > a) abridged content
> > > b) unabridged content - includes a)
> > > c) abridged content + translation
> > > d) unabridged content + translation
> > > [:]
> > > 
> > > One can author and organize this in XML - pre-ConteXt - but perhaps one
> > > prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe
> > > 
> > > \defineparagraphs[unabridged]
> > > \defineparagraphs[abridged]
> > > \defineparagraphs[translation]
> > > 
> > > Then one authors the complete work in a single project, but you can
> > > produce a variety of versions, depending on the mode chosen:
> > > 
> > > \definemode[unabridged]
> > > etc.
> > > 
> > > Can one do this in context?
> > 
> > Yes!
> > 
> > This is what I do (for solutions in homework assignments):
> > 
> > \definebuffer[solution][local=yes,nested=yes]
> > 
> > \startmode[solution]
> > \defineenumeration[solution][....fancy setup...]
> > \stopmode
> > 
> > Then, in the main tex file:
> > 
> > 
> > \startsolution
> > ...
> > \stopsolution
> > 
> > 
> > By default, gives the version without solution. Compile with --mode=solution
> > to get the version with solution. The same thing should work in your case by
> > defining two modes: unabridged and translation. And then use
> > --mode=unabridged,translate etc to get multiple modes.
> 
> Here's a working sample:
> 
> ===
> % \definebuffer[unabridged]
> % \definebuffer[abridged]
> 
> \setupwhitespace[big]
> 
> \starttext
> \startmode[unabridged]
> \input knuth
> 
> \startblockquote
> \input ward
> \stopblockquote
> 
> % \startmode[abridged]
> % \input knuth
> % \stopmode
> \stopmode
> 
> \startmode[abridged]
> \input knuth
> \stopmode
> 
> % \startmode[abridged]
> % \input zapf
> % \stopmode
> \stoptext
> ===
> 
> Unfortunately - as pointed out on the wiki - modes cannot be nested.

But you don't have to directly use the modes. The following will work:

\definestartstop[abridged]

% By default, don't show the unabridged text
\definebuffer[unabridged][local=yes, nested=yes]

\startmode[unabridged]
% In the unabridged mode, show the abridged text
\definestartstop[unabridged]
\stopmode

\starttext
\startabridged
\input knuth

\startunabridged
\startblockquote
\input ward
\stopblockquote
\stopunabridged

\input zapf
\stopabridged

Blocks are a better mechanism, but I still prefer modes here because I find the 
\beginblock ... \endblock syntax to be a bit awkward in a context document.

Aditya___
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
___


Re: [NTG-context] Does \startnotallmodes work?

2022-05-11 Thread Gerben Wierda via ntg-context
> On 11 May 2022, at 02:37, Rik Kabel via ntg-context  
> wrote:
> 
> On 2022-05-10 17:39, Gerben Wierda via ntg-context wrote:
>> Example. Call with 
>> 
>> context —mode=FR
>> 
>> - Uncomment the first commented lines. Compilation fails because mode FR is 
>> on so that works
>> 
>> But I get English anyway. Uncomment the second commented part and it fails, 
>> but it should not because mode=EN is not turned on.
>> 
>> %\startmode[FR]
>> %  \BLURBONE
>> %  \stopmode
>> 
>> \startnotallmodes[FR,RU]% english is the default
>> \enablemode[EN]
>> \stopnotallmodes
>> 
>> \startmode[EN]
>> %  \BLURBTWO
>> \setuplanguage[en][patterns={en}]
>> \setupexternalfigure[directory=../LMTX-Output/without-ids/en/ArchiMate 3.1 
>> Metamodel ESv4]
>> \stopmode
>> \startmode[FR]
>> \setuplanguage[fr][patterns={en,fr}]
>> \setupexternalfigure[directory=../LMTX-Output/without-ids/fr/ArchiMate 3.1 
>> Metamodel ESv4]
>> \stopmode
>> \startmode[RU]
>> \setuplanguage[ru][patterns={en,ru}]
>> \setupexternalfigure[directory=../LMTX-Output/without-ids/ru/ArchiMate 3.1 
>> Metamodel ESv4]
>> \stopmode
>> 
>> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
>> R IT Strategy <https://ea.rna.nl/> (main site)
>> Book: Chess and the Art of Enterprise Architecture 
>> <https://ea.rna.nl/the-book/>
>> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
>> 
> Gerben,
> 
> \startnotallmodes is behaving as it should. Here, it is not the case that RU 
> and FR (all the listed modes) are set, so EN is enabled, and you actually 
> have both FR and EN set.
> 
> Try the following with 
> 
> context —mode=FR
> 
> and make sure you understand the result.
> 
> \starttext
> \doifmode{EN}{EN is enabled\par}
> \doifmode{FR}{FR is enabled\par}
> \doifmode{RU}{RU is enabled\par}
> \doifmode{FR,RU}{at least one of FR and RU modes is enabled\par}
> \doifmode{EN,RU}{at least one of EN and RU modes is enabled\par}
> \doifmode{EN,FR}{at least one of EN and FR modes is enabled\par}
> \doifmode{EN,FR,RU}{at least one of EN, FR, and RU modes is enabled\par}
> \doifnotmode{EN}{EN is not enabled\par}
> \doifnotmode{FR}{FR is not enabled\par}
> \doifnotmode{RU}{RU is not enabled\par}
> \doifnotmode{EN,RU}{neither EN nor RU is enabled\par}
> \doifnotmode{EN,FR}{neither EN nor FR is enabled\par}
> \doifnotmode{RU,FR}{neither RU nor FR is enabled\par}
> \doifnotallmodes{FR,RU}{all of FR and RU modes are not enabled\par}
> \doifnotallmodes{EN,RU}{all of EN and RU modes are not enabled\par}
> \doifnotallmodes{EN,FR}{all of EN and FR modes are not enabled\par}
> \doifnotallmodes{EN,FR,RU}{all of EN, FR, and RU modes are not enabled\par}
> \stoptext
> 
> Then, add the following block to the beginning of the file and try again.
> 
> \definemode[EN,FR,RU][keep]
> \doifmodeelse{EN}
>   {\disablemode[FR]
>\disablemode[RU]}
>   {\doifmodeelse{FR}
>{   \disablemode[EN]
>\disablemode[RU]}
>{\doifmodeelse{RU}
>  { \disablemode[EN]
>\disablemode[FR]}}
>  { \enablemode[EN]}}
> 
> 
> I find it useful to add such a block to the environment of every file that 
> uses mutually-exclusive modes. This version pf the block sets a default value 
> if none is on the command line.
> 

Thanks. It seems that the last part has a {}-issue. \enablemode[EN] is always 
wxecuted if on the commandline only FR or RU is set 

\definemode[EN,FR,RU][keep]
\doifmodeelse{EN}
  {
\disablemode[FR]
\disablemode[RU]
  }
  {
\doifmodeelse{FR}
{
  \disablemode[EN]
  \disablemode[RU]
}
{
  \doifmodeelse{RU}
  {
\disablemode[EN]
\disablemode[FR]
  }
}
{
  \enablemode[EN]
}
  }

I am now using

\doifmodeelse{EN}
  {
\disablemode[FR]
\disablemode[RU]
  }
  {
\doifmodeelse{FR}
{
  \disablemode[EN]
  \disablemode[RU]
}
{
  \doifmodeelse{RU}
  {
\disablemode[EN]
\disablemode[FR]
  }
  {
\enablemode[EN]
  }
}
  }

> -- 
> Rik
> 
> 
> 
> 
> 
> 
> 
> ___
> 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
> ___

___
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
___


Re: [NTG-context] new features

2016-05-22 Thread Hans Hagen

On 5/22/2016 10:07 AM, Meer, Hans van der wrote:



On 26 Jun 2014, at 12:08, Hans Hagen <pra...@wxs.nl> wrote:

Another addition is that

\definemode[something][keep]

define an undefined mode; the keep makes sure that the already set value is 
kept (another option is 'yes').

Using defined modes (that is, set with: \enablemode, \disablemode or 
\definemode) can be tested about twice as fast as undefined modes which can 
make a small difference



I do not understand this fully:
- if the mode is undefined, how can "define an undefined mode" for a mode that has 
already been given a value with either \enablemode or \disablemode keep a value? Must not 
\enablemode, \disablemode do some sort of 'defining' in order to facilitate testing? Does 
"define" here implements some other mechanism than the 'defining' done by \enablemod, 
\disablemode?


it's more an internal issue. less checking at the tex end and so .. it's 
only relevant when you check modes tens of thousands of times in a run



Is this what happens:
- if \enablemode or \disablemode has been used before to set a value for the 
mode, than \definemode[themode][keep] stashes some special definition of that 
mode and does not change c.q. transfers its value;
- \definemode[themode][yes] and \definemode[themode][no] always set that value 
for the mode in case, regardless of what has been done by a preceding 
\enablemode or \disablemode.

Is that the correct interpretation? Just to make sure I understand.

Finally, when \definemode makes testing a lot faster why than not implement 
this always? That is, using \enablemode or \disablemode the first time implies 
a \definemode for that mode. Doing so avoids another macro to remember: less 
clutter for my brain ;-)


because one property of modes is that one doesn't have to define them, 
you'd be quite unhappy if you would have to define all possible modes 
that could be introduced in styles


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] selectively turn off captions

2007-11-29 Thread Roger Mason
Hello,

I'm making progress in using modes - thanks again for the help so far
that was given in the switching to Context thread.

I have followed Thomas Schmitz' practex article and have set up modes
for presentation and manuscript.  I am using external figures on most
of the slides.  In presentation mode there is no need for figure
captions (the slide heading and my waffling will suffice).  In
manuscript mode I'd like to have captions to the figures.  I know I
can disable captions with {none} for each individual figure, but can I
do this _just_ for the presentation?  I have looked up \setupcaptions
but there does not seem to be a none option that could be used for
this purpose.

Thanks,

Roger
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] selectively turn off captions

2007-11-29 Thread Wolfgang Schuster
2007/11/29, Roger Mason [EMAIL PROTECTED]:
 Hello,

 I'm making progress in using modes - thanks again for the help so far
 that was given in the switching to Context thread.

 I have followed Thomas Schmitz' practex article and have set up modes
 for presentation and manuscript.  I am using external figures on most
 of the slides.  In presentation mode there is no need for figure
 captions (the slide heading and my waffling will suffice).  In
 manuscript mode I'd like to have captions to the figures.  I know I
 can disable captions with {none} for each individual figure, but can I
 do this _just_ for the presentation?  I have looked up \setupcaptions
 but there does not seem to be a none option that could be used for
 this purpose.

 Thanks,

 Roger

\setupfloat[figure][default=none]

Wolfgang
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] hierarchical modes

2008-05-15 Thread Hans Hagen
Janko Hauser wrote:
 Hello, I need to prepare a document for different audiences. The  
 question here is, how to encapsulate the different parts of the  
 document. There are paragraphs which are public, some more which are  
 internal and some which are private. People who are in the private  
 group should see everything, the group internal only the public parts  
 and the internal ones. As far as I see, modes are not additive.
 What would be the best way to structure such a document and to style  
 the different paragraphs, so that the different audiences see, who can  
 read what?

\defineblock cum suis ...

quite old stuff btw (reminds me to provide a mkiv variant)

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] setting mode in ctx-file

2008-08-28 Thread Hans Hagen
Peter Münster wrote:
 Hello,
 
 How can I set a mode in a ctx-file? I would like to pass such a file to
 context --ctx=file ...
 
 If further modes are passed with --mode=..., these modes should not replace
 the mode in the ctx-file, but should be added.

?xml version='1.0' standalone='yes'?

ctx:job
 ctx:messagesome project/ctx:message
 ctx:preprocess/
 ctx:flags
 ctx:flagtexengine=luatex/ctx:flag
 ctx:flaginterface=en/ctx:flag
 /ctx:flags
 ctx:process
 ctx:resources
 ctx:environmentsomestyle.tex/ctx:environment
 ctx:modeproofing/ctx:mode
 /ctx:resources
 /ctx:process
 ctx:postprocess/
/ctx:job



-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-20 Thread Alan Stone
Are such macros possible ?

modes: ma, mb, ... mz
values: va, vb, ... vz
command: cmd
parameter: p

(1) instead of

\doifmode{ma}{\cmd[name][va]}
\doifmode{mb}{\cmd[name][vb]}
...
\doifmode{mz}{\cmd[name][vz]}

a macro which does: \doifmode{m*}{\cmd[name][v*]}

(2) instead of

\doifmode{ma}{\cmd[p=va]}
\doifmode{mb}{\cmd[p=vb]}
...
\doifmode{mz}{\cmd[p=vz]}

a macro which does: \doifmode{m*}{\cmd[p=v*]}

-- 
Best,
Alan

* texmfstart texexec --lua foo
* ConTeXt  ver: 2008.09.16 19:49 MKIV fmt: 2008.9.20  int: english/english
* Windows XP Home SP3
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-29 Thread Alan Stone
On Thu, Sep 11, 2008 at 12:46 PM, Hans Hagen [EMAIL PROTECTED] wrote:

 Alan Stone wrote:
  (2.2) How does ConTeXt handle a modefile ? Are the modes parsed into a
  modelist ( re: question 1.2 ) ?

 best use ctx files instead, like in

 == somefile.ctx ===

 ?xml version='1.0' standalone='yes'?

 ctx:job
 ctx:preprocess/
 ctx:flags
 ctx:flagtexengine=luatex/ctx:flag
 ctx:flaginterface=en/ctx:flag
 /ctx:flags
 ctx:process
 ctx:resources
 ctx:modeproofing/ctx:mode
 ctx:environmentsomestyle.tex/ctx:environment
 /ctx:resources
 /ctx:process
 ctx:postprocess/
 /ctx:job

 texexec  --ctx=somefile


How about the other texexec options,
re: http://linux.die.net/man/1/texexec ?
Which ones go where in the ctx file
+ what is their syntax ?

-- 
Best,
Alan

Ubuntu 8.04 Hardy Heron (Desktop)
  * ConTeXt  ver: 2008.09.16 19:49 MKIV  fmt: 2008.9.20  int:
english/english  (ConTeXt minimals installation)
  * texexec --lua foo
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modes questions

2008-09-29 Thread Hans Hagen
Alan Stone wrote:
 On Thu, Sep 11, 2008 at 12:46 PM, Hans Hagen [EMAIL PROTECTED] wrote:
 
 Alan Stone wrote:
 (2.2) How does ConTeXt handle a modefile ? Are the modes parsed into a
 modelist ( re: question 1.2 ) ?
 best use ctx files instead, like in

 == somefile.ctx ===

 ?xml version='1.0' standalone='yes'?

 ctx:job
 ctx:preprocess/
 ctx:flags
 ctx:flagtexengine=luatex/ctx:flag
 ctx:flaginterface=en/ctx:flag
 /ctx:flags
 ctx:process
 ctx:resources
 ctx:modeproofing/ctx:mode
 ctx:environmentsomestyle.tex/ctx:environment
 /ctx:resources
 /ctx:process
 ctx:postprocess/
 /ctx:job

 texexec  --ctx=somefile

 
 How about the other texexec options,

i implement them stepwise, i leave out those no longer relevant and all 
--pdf* ones will be done with ctx files instead


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Custom parameters/options for t-vim

2011-08-30 Thread Andreas Schneider

Hi,

I worked with t-vim a bit more and encountered a small problem with the 
way vim handles syntax definitions. Some of them have several modes that 
get activated by setting a variable first. For example the syntax sh 
(shell scripts) can be enhanced for bash, ksh, etc.


Example:
let g:is_bash=1
set syntax=sh

Now a line like export foo=bar is highlighted differently than when I 
would omit the let g:is_bash=1.


Therefore I would propose another options to \setupvimtyping to specify 
custom options to be passed to vim. Preferably they should be passed at 
least before the set syntax=... line to make sure that this particular 
case -- i.e. switching syntax modes -- works well (which may be the only 
necessary case).


--
Best Regards,
Andreas
___
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
___


Re: [NTG-context] modes with Scite

2006-07-25 Thread dwarnold45
Hans,

I thought Shift+F8, paramters, would have something to do with adding options 
at the command line, but it did not work with --mode=short.

 Hans Hagen [EMAIL PROTECTED] wrote: 
 [EMAIL PROTECTED] wrote:
  All,
 
  I am using the Scite editor provided by one of the Context dristributions.
 
  Is there a way to include modes with one of the various compiling commands?

 no, but you can 
 
 (1) temporary put \enablemode[...] at the to of the file
 (2) use a separate file where you set the mode, and load the file 
 
 Hans 
 
 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] modes with Scite

2006-07-25 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
 Hans,

 I thought Shift+F8, paramters, would have something to do with adding options 
 at the command line, but it did not work with --mode=short.

   
in your user scite props you need to say:

name.context.texexec=texmfstart texexec $(name.texexec.flag.pdfopen) $(1)


  Hans Hagen [EMAIL PROTECTED] wrote: 
   
 [EMAIL PROTECTED] wrote:
 
 All,

 I am using the Scite editor provided by one of the Context dristributions.

 Is there a way to include modes with one of the various compiling commands?
   
   
 no, but you can 

 (1) temporary put \enablemode[...] at the to of the file
 (2) use a separate file where you set the mode, and load the file 

 Hans 

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
 

   


-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec --mode=xxx --mode=yyy

2007-01-16 Thread Peter Münster
On Tue, 16 Jan 2007, Hans Hagen wrote:

  the question is, if you could modify texexec to behave the same way, when
  used with these 2 command-lines:
  1.) texexec --mode=xxx --mode=yyy file
  2.) texexec --mode=xxx,yyy file

 this will not happen soon since i dislike multiple same-name - options

All right. I've just seen, that texexec --modes=xxx --mode=yyy works as I
want. Can I rely on it for the future?

  Imagine a command (an alias) my-texexec = texexec --mode=xxx that is used
  for example like this:
  my-texexec --mode=yyy file
  Then, the mode=xxx gets overwritten...

 yeah, that shat i used it for -)
 
 i can add support for modes to the ctx file feature (ctx files control 
 texexec)

That would be nice too.

Thanks, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Problem installing ConTeXt jedit syntax

2005-08-31 Thread Elliot Clifton
Hans,

Sorry about taking a long time to get back to you. 

I checked the syntax of the ConTeXt mode files. They seem to be
consistent with the syntax in modes that are known to work. The
delegate syntax doesn't seem to have changed. I don't recieve XML
validation errors for any other parts of the code. Just the
delegation. I can't see why the XML is invalid.



For the record, I'm using jEdit 4.2final

Elliot

Elliot Clifton wrote:

Hi,

I've added the context jedit mode files to the modes directory inside
my jedit settings directory, and appended the mode to the catalogue. I
get XML validation errors that state the various DELEGATEs are
invalid. The external files (*-en, *-de, etc...) do not import. Why?
What am I doing wrong?


is there a more detailed report?

can you figure otu if the delegates syntax has changed?

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] mode dependend character handling

2006-01-14 Thread Mojca Miklavec
Taco Hoekwater wrote:
 Henning Hraban Ramm wrote:
  \startencoding[ec]
  \startmode[swiss]
  \definecharacter ssharp {ss}
  \stopmode
  \stopencoding
  than the order of commands doesn't matter any more (but then the
  automatic conversion will only work for the ec encoding).

 mode processing is based on modes that are in effect
 at the execution time of the \startmode macro, not
 the typeset time. This would work:

\enablemode[swiss]
\startencoding[ec]
   \startmode[swiss]
   \definecharacter ssharp {ss}
   \stopmode
\stopencoding

 but then it would be on always, since it effectively becomes

\startencoding[ec]
   \definecharacter ssharp {ss}
\stopencoding

 whereas without the \enablemode it becomes only:

\startencoding[ec]
\stopencoding

 which does nothing.

OK, thanks Taco. Now I understand the problem. I always compiled with or without
texexec --mode=swiss
which worked fine. If mixing modes within the same document is
required (\enablemode/\disablemode[swiss]), it fails of course (I
didn't think about it).

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A problem with modes

2012-06-26 Thread Wolfgang Schuster

Am 26.06.2012 um 23:25 schrieb Marcin Borkowski:

 Or is there a better way to do something like this?
 
 It depends on what you want to do. You can create a buffer command:
 
 \def\startamode{\grabbufferdata[amode][startamode][stopamode]}
 %\def\stopamode {\getbuffer[amode]}
 
 \starttext
 
 All modes.
 \startamode
 “A” mode.
 \stopamode
 
 \stoptext
 
 Thanks, it worked.  One question: is there any difference between
 
 \def\starta{...}
 \def\stopa{...}
 
 and
 
 \definestartstop[a][before={...},after={…}]

Yes because in my definition for \startamode I start a buffer which reads 
everything
untill the delimiting \stopamode and stores it in memory, afterwards you can 
access
the stored content with \getbuffer[…]. When you use \definestartstop to create
the environment you have only two commands which perform a few things at the 
begin
and end of the environment but you can do much with the content itself, the only
way to gobble the content is to store it in a box but than the buffer method is 
easier.

Wolfgang
___
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
___


[NTG-context] Alternative width of figures in different documents (problem with modes?)

2013-02-05 Thread Jaroslav Hajtmar

Hello ConTeXist.

I would like use modes alternative to change of image dimensions in 
different documents (presentation or print version).
Compilation in ConTeXt TeXLive 2012 version will compile without error, 
but without visual effect. Compilation with the standalone version 
fails. What is problem or eventually. how to solve my problem another way.


Thanks
Jaroslav Hajtmar

Here is my minimal example:




\enablemode[presentation]

\def\alternativewidth#1#2{
 \doifmodeelse{presentation}
 {width=#1}
 {width=#2}
}



\useexternalfigure[COW][cow.pdf][height=5cm, \alternativewidth{3cm}{5cm}]


\starttext

\input tufte

\placefigure[here,force][cowref]{Caption}{\externalfigure[COW]}

\input tufte

\stoptext


___
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
___


[NTG-context] writing additional compilation info to the log (or other) file

2008-11-21 Thread Alan STONE
Hi,

How do you write the

TeXExec | processing document ...
TeXExec | loading ctx file ...
TeXExec | using flags texengine=... interface=... result=...
TeXExec | using modes ...
TeXExec | outputfile ...
TeXExec | tex processing method: ...
TeXExec | TeX run ...
TeXExec | writing option file ...
TeXExec | using randomseed ...
TeXExec | tex engine: ...
TeXExec | tex format: ...

part (or some of them, for ex. modes) of the console window compilation
output to the log (or other) file ?

-- 
Best,
Alan

* TeX engine = LuaTeX
*ConTeXt minimals ver: 2008.11.10 21:40 MKIV  fmt: 2008.11.21  int:
english/english
* Ubuntu 8.04 Hardy Heron
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to capture a typeset page into a box instead of shipping it out

2009-02-01 Thread Roger Mason
Hello,

Kevin D. Robbins krobb...@alumni.princeton.edu writes:

Thanks for the suggestions Wolfgang and Luigi. I've now got several
good options to research.
Kevin


I use 3  modes for teaching:

manuscript -- notes that go on-line for students to download
presentation -- pictures for use in class
speakernotes -- miniatures of the pictures, each on a separate page,
 that I scrawl on for use in class (so I know what I'm
 supposed to say).

I got a lot of help from this list in putting these together.  Context
experts might find them laughable, but I'm attaching the modes in a
tarball just in case they are useful.  They are still evolving, by the
way -- I wrote speakernotes last week, inspired by something of the same
name on the wiki (sorry, I can't remember who the author is).

Cheers,
Roger



modes.tar.gz
Description: Binary data
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New to TeX, ConTeXt - How to conditionally include document sections?

2009-07-24 Thread Stephen Gadsby
 From: Hans Hagen

 \doifelse{stringa}{stringb}{...}{...}

 From: Aditya Mahajan

 For what you want, modes should be sufficient. If for
 something else you really want to do string comparisons,
 ConTeXt provides a bunch of \doifelse commands
 http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions

Thank you both. I feel quite foolish for somehow overlooking \doifelse. I 
appreciate how kindly you've pointed out what should have been obvious to me.

I'll also look more closely at modes. I'll admit I did briefly look at 
information on them, but I didn't immediately see their usefulness. I'll now 
spend some time reading up on them.

Thank you.

   -Stephen J. Gadsby, Multimedia Specialist
Web  Multimedia Services, Information Technology
Millersville University of Pennsylvania, USA
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] modes

2010-10-14 Thread Hans Hagen

Hi,

(for module writers)

The latest beta gives access to modes at the lua end

\starttext

\enablemode[test]
\enablemode[]

\doifallmodes{test,xxx}{NO}
\doifallmodes{test,}{YES}
\doifmode{test}{YES}
\doifnotmode{xxx}{YES}

\startluacode
tex.sprint(tex.modes['x']and YES or NOP)
tex.sprint(tex.modes['xx']   and YES or NOP)
tex.sprint(tex.modes['xxx']  and YES or NOP)
tex.sprint(tex.modes[''] and YES or NOP)
tex.sprint(tex.modes['test'] and YES or NOP)
\stopluacode

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Hans Hagen

On 17-10-2010 8:54, Aditya Mahajan wrote:


Maybe Hans forgot it for mkii but it doesn’t matter whether mkii/mkiv
is a normal mode or a system mode.


IIRC, system modes cannot be reset using \(enable|disable)mode.


there is nothing special about system modes: they just have a * in front 
so you can enable and disable them (but of course deep down they can be 
set as well)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


  1   2   3   4   5   6   7   >