Re: [NTG-context] Blocks inside a conditional mode.

2021-11-29 Thread Fabrice L via ntg-context
o this, even if I realized now that there is a similar example in the wiki. For the list, in case in the future this would be useful for another user, below is the complete minimal example using this approach. % - Minimal working example : \setuppapersize[S5][S5] \enablemode[Professor] \de

Re: [NTG-context] Blocks inside a conditional mode.

2021-11-28 Thread Fabrice L via ntg-context
, I tried to think differently. One solution would be to define a block for each course. Something like this (a working minimal example, redone in order this would be more easier to understand (I hope!) what I’m trying to do): % — \setuppapersize[S5][S5] \enablemode[Professor]

[NTG-context] Blocks inside a conditional mode.

2021-11-28 Thread Fabrice L via ntg-context
TeX capacity exceeded, sorry [input stack size=5] % The problem can be summarized in this minimal non working example : % — MWE — \setuppapersize[S5][S5] \enablemode[Professor] \defineblock[Complement] \setupblock[Complement][ before={\page[yes]\setuppagenum

Re: [NTG-context] Making text disappear depending on mode

2021-02-04 Thread Hans Hagen
} %{\stopsidebar} %{\stopbuffer}}, % ] \starttext Before \startChangePR \input knuth \stopChangePR After \stoptext \defineblock [ChangePR] \defineblock [ChangeRP] \setupblock [ChangePR] [before={\startsidebar[rulecolor=red]}, after={\blank[overlay]\stopsidebar}] \setupblock

Re: [NTG-context] using modeset

2020-06-12 Thread Jan Willem Flamma
trainings in both English and Dutch in the same file. Instead of modes, I use blocks. Like this: \defineblock[ENblok]\defineblock[NLblok] \setupblock[NLblok][before={\mainlanguage[nl]},after=]\setupblock[ENblok][before={\mainlanguage[en]},after=] Then, determine which blocks you want to use in your file

Re: [NTG-context] using modeset

2020-06-11 Thread r . ermers
up an xml file. You can then have the overview via scripts. Yet for short texts it can be a solution. I have case material for my trainings in both English and Dutch in the same file. Instead of modes, I use blocks. Like this: \defineblock[ENblok] \defineblock[NLblok] \setupblock[NLblok][before

Re: [NTG-context] start/stop executed conditionally on mode ?

2020-06-09 Thread Fabrice L
om} { >\keepblocks[Question] > } > > \starttext > >Text A > >\beginQuestion >Question A…. >\endQuestion > >Text B > >\beginQuestion >Question B…. >\endQuestion > >\page > >\doifnotmod

Re: [NTG-context] Get "right" numbers using blocks and enumerations

2016-09-06 Thread Mikael P. Sundqvist
re defined). > > Is it possible? What have I missed? > > Blocks only store their content without expanding counters etc. and when > you flush them you have the same result as putting them into the appendices > by hand. > > Related: Is there a better way to set answers to questions? (

Re: [NTG-context] Get "right" numbers using blocks and enumerations

2016-09-06 Thread Wolfgang Schuster
ithout expanding counters etc. and when you flush them you have the same result as putting them into the appendices by hand. Related: Is there a better way to set answers to questions? (Perhaps not having to write both the \begin... \start... \stop... \end... for every question? \setupblock[A][

Re: [NTG-context] disappearing margin text

2016-06-23 Thread josephcanedo
{margin}] %% \setupblock[question][before=\startquestion,after=\stopquestion] \setupinmargin[stack=continue] \starttext \beginquestion Text \endquestion \beginquestion Text \endquestion \useblocks[question] \stoptext Sent from Windows Mail From: Jan Willem Flamma Sent

Re: [NTG-context] disappearing margin text

2016-06-22 Thread Jan Willem Flamma
ible? > > Kind regards, > Jan Willem > > > MWE: > \defineblock[question] > \hideblocks[question] > > \defineenumeration >[question] >[text=Question] > > \setupblock[question][before=\startquestion,after=\stopquestion] > > > \start

Re: [NTG-context] disappearing margin text

2016-06-22 Thread Marco Patzer
\hideblocks[question] > > \defineenumeration > [question] > [text=Question] > > \setupblock[question][before=\startquestion,after=\stopquestion] \setupinmargin [stack=yes] %% yes or continue Marco _

[NTG-context] disappearing margin text

2016-06-22 Thread Jan Willem Flamma
Dear list members In the following MWE, the margin text appears at question 1 but not at question 2. How is this possible? Kind regards, Jan Willem MWE: \defineblock[question] \hideblocks[question] \defineenumeration [question] [text=Question] \setupblock[question][before

Re: [NTG-context] reset blocks with dorecurse

2014-01-15 Thread DesdeChaves
, text={Hint for question}, headstyle={\bi}, stopper={.}] \defineenumeration[answer] [alternative=hanging,width=4.5cm, text={Answer to question}, headstyle={\bi}, stopper={.}] \setupblock[question][before={\startquestion},after

[NTG-context] reset blocks with dorecurse

2014-01-14 Thread DesdeChaves
={Hint for question}, headstyle={\bi}, stopper={.}] \defineenumeration[answer] [alternative=hanging,width=4.5cm, text={Answer to question}, headstyle={\bi}, stopper={.}] \setupblock[question][before={\startquestion},after={\stopquestion

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Jaroslav Hajtmar
, text={}, headstyle={}, stopper={.}] \setupblock[question][before={\startquestion},after={\stopquestion}] \setupblock[hint][before={\starthint},after={\stophint}] \setupblock[answer][before={\startanswer},after={\stopanswer}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Otared Kavian
={}, headstyle={}, stopper={.}] \setupblock[question][before={\startquestion},after={\stopquestion}] \setupblock[hint][before={\starthint},after={\stophint}] \setupblock[answer][before={\startanswer},after={\stopanswer}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer] \starttext

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Jaroslav Hajtmar
=, before={\startcolumns[n=4]}, after=\stopcolumns, width=0.5em, text={}, headstyle={}, stopper={.}] \setupblock[question][before={\startquestion},after={\stopquestion}] \setupblock[hint][before={\starthint},after={\stophint}] \setupblock[answer][before={\startanswer},after

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-11 Thread Otared Kavian
Hi Wolfgang, Many thanks for your attention and insight. With your code everything works as expected. In case others would be interested, I give here a slight modification of what you sent, which works very well with mkiv: I only added \setupblock[question][before={\startquestion

[NTG-context] \startplacefigure breaking paragraph flow

2013-02-10 Thread Marcin Borkowski
, width=fit, ] \defineblock[question] \defineblock[answer] \keepblocks[question] \hideblocks[answer] \setupblock[question][before=\startquestion,after=\stopquestion] \setupblock[answer][before=\startanswer,after=\stopanswer] \def\noanswer{\incrementnumber[answer]} \starttext \beginquestion

Re: [NTG-context] setupblock with starttyping doesn't work

2013-02-01 Thread Ingo Hohmann
Thank you for your answers, in my case, start-/stoplines is actually much better. Kind regards, Ingo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

[NTG-context] setupblock with starttyping doesn't work

2013-01-31 Thread Ingo Hohmann
to accomplish: The user writes the address, and he should not have to use \crlf or have to use several distinct commands. Why does the following not work? \defineblock[Address] \setupblock[Address][ before=\starttyping, after=\stoptyping ] \starttext \beginAddress Peter Pan Somewhere over

Re: [NTG-context] setupblock with starttyping doesn't work

2013-01-31 Thread Hans Hagen
. So here it goes ... What I want to accomplish: The user writes the address, and he should not have to use \crlf or have to use several distinct commands. Why does the following not work? \defineblock[Address] \setupblock[Address][ before=\starttyping, after=\stoptyping ] you pick

Re: [NTG-context] setupblock with starttyping doesn't work

2013-01-31 Thread Aditya Mahajan
, and some problems are showing up now. So here it goes ... What I want to accomplish: The user writes the address, and he should not have to use \crlf or have to use several distinct commands. Why does the following not work? \defineblock[Address] \setupblock[Address][ before=\starttyping

Re: [NTG-context] Defining a command for enumeration+block

2010-11-20 Thread Glen Callaghan
--- \defineblock[Block] \defineenumeration[Enum][location=left,text=Test] \setupblock[Block][before=\startEnum,after=\stopEnum] \keepblocks[Block] \starttext \section{Use} \useblocks[Block] \reset[Enum] \section{Define} \beginBlock jhdsa hdsfhj lh dsfjh jkhasdf sdakjhfsal sdkajhf kljsdh

Re: [NTG-context] Defining a command for enumeration+block

2010-11-18 Thread Wolfgang Schuster
] \defineenumeration[Enum][location=left,text=Test] \setupblock[Block][before=\startEnum,after=\stopEnum] \starttext \beginBlock Some text A \endBlock \stoptext Wolfgang ___ If your question is of interest to others as well, please

[NTG-context] useblocks troubles

2010-01-25 Thread Bernhard Vogel
Dear all, When selecting multiple blocks: \useblocks[someblock,otherblock], the blocks are selected but the before and after statements are not processed. Is the expected behaviour? Tia, Bernard Example: \defineblock[someblock] \defineblock[otherblock] \setupblock[someblock] [before

Re: [NTG-context] \setupenumeration(s) was: defineenumeration does not work with MKIV

2010-01-05 Thread Wolfgang Schuster
), e.g. \setupenumerations[problem,remark][stopper=)] so name of commands are correct (in some sense one is a limit of several :). You could also use more names in \setuphead, \setupblock etc. but these command names are singular. Changing \setupenumerations/descriptions is no option but one can

[NTG-context] Design for Translation

2009-03-11 Thread John Devereux
the text from any tex commands (except for a single type of begin/end sequence). Conceptually :- manual-env.tex: \defineblock[EN,de,it] \setupblock[EN][file=EN] \setupblock[DE][file=DE] \setupblock[IT][file=IT] \doifmode[EN]{\def\lang{EN}} \doifmode[DE]{\def\lang{DE}} \doifmode[IT]{\def\lang

Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
# \setlayerframed # \setlocalhsize # \setstrut \settextvariable[name]{text} \setupalign[options] \setuparranging[options] # \setupattachments \setupbackground[options] \setupbackgrounds[position][position][state][settings] \setupblackrules[options] \setupblank[options] \setupblock[names][options

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread batela
sfarsit fin \stopelements \defineenumeration[Answer][text=Question] \defineenumeration[Question] \defineblock[answer,question] \setupblock [answer][before={\startAnswer\resetscore},after={\savescore\stopAnswer} ] \setupblock [question][before

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread Patrick Gundlach
[answer,question] \setupblock[answer][before={\startAnswer\resetscore},after={\savescore\stopAnswer}] \setupblock[question][before={\startQuestion},after={\stopQuestion}] \makecounter{totalscore} \definelist[Score] [ pagenumber=no, width=5em

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread Aditya Mahajan
fine sfarsit fin \stopelements \defineenumeration[Answer][text=Question] \defineenumeration[Question] \defineblock[answer,question] \setupblock [answer][before={\startAnswer\resetscore},after={\savescore\stopAnswer}] \setupblock

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread David Arnold
] \defineblock[answer,question] \setupblock [answer][before={\startAnswer\resetscore},after={\savescore \stopAnswer}] \setupblock [question][before={\startQuestion},after={\stopQuestion}] \makecounter{totalscore} \definelist[Score] [ pagenumber=no, width=5em

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-02 Thread Aditya Mahajan
sfarsit fin \stopelements \defineenumeration[Answer][text=Question] \defineenumeration[Question] \defineblock[answer,question] \setupblock [answer][before={\startAnswer},after={\stopAnswer}] \setupblock [question][before={\startQuestion},after

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-02 Thread batela
fine sfarsit fin \stopelements \defineenumeration[Answer][text=Question] \defineenumeration[Question] \defineblock[answer,question] \setupblock [answer][before={\startAnswer},after={\stopAnswer}] \setupblock

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-02 Thread Aditya Mahajan
konec fine sfarsit fin \stopelements \defineenumeration[Answer][text=Question] \defineenumeration[Question] \defineblock[answer,question] \setupblock [answer][before={\startAnswer\resetscore},after={\savescore

Re: [NTG-context] textblocks in tables

2007-03-18 Thread Wolfgang Schuster
in the 'begin' and 'after' fields of '\setupblock'. Does the '\useblocks' command not produce plain TeX-Code in iterative fashion (like a for-loop over all textblocks)? Is there somebody in the list, who already had a similar problem? Michael Hi Michael, I looked a little bit into the code

Re: [NTG-context] textblocks in tables

2007-03-17 Thread Bernhard Michael
. It would be really nice to have a solution where I can typeset the to textblocks (Requirements and Priority) in a list, each block in a cell. I don't understand why I can't place arbitrary commands in the 'begin' and 'after' fields of '\setupblock'. Does the '\useblocks' command not produce plain

[NTG-context] textblocks in tables

2007-03-16 Thread Bernhard Michael
but unfortunately it didn't work: \defineenumeration[Requirement][location=left,text=Req,width=broad,after={\blank[small]}] \defineblock[Requirement,Priority] \setupblock[Requirement][after=] \hideblocks[Priority] \starttext \chapter{Description of requirements} \beginRequirement \Requirement

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Wolfgang Schuster
to list all the requirements together with their priority. I tried the following code but unfortunately it didn't work: \defineenumeration[Requirement][location=left,text=Req,width=broad,after={\blank[small]}] \defineblock[Requirement,Priority] \setupblock[Requirement][after=] \hideblocks

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Bernhard Michael
want to list all the requirements together with their priority. I tried the following code but unfortunately it didn't work: \defineenumeration[Requirement][location=left,text=Req,width=broad,after={\blank[small]}] \defineblock[Requirement,Priority] \setupblock[Requirement][after=] \hideblocks

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Wolfgang Schuster
,text=Req,width=broad,after={\blank[small]}] \defineblock[Requirement,Priority] \setupblock[Requirement][after=] \hideblocks[Priority] \starttext \chapter{Description of requirements} \beginRequirement \Requirement A requirement \par \endRequirement \beginPriority

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Bernhard Michael
the requirements together with their priority. I tried the following code but unfortunately it didn't work: \defineenumeration[Requirement][location=left,text=Req,width=broad,after={\blank[small]}] \defineblock[Requirement,Priority] \setupblock[Requirement][after=] \hideblocks[Priority

Re: [NTG-context] blocks in itemize

2005-08-23 Thread Mojca Miklavec
Rob Ermers wrote: Hi, If I make sure there is enough space, i.e. more than one space, between the \begin... and the text, it works! However in the pdf the item drops a line down, like this: See \def\dodefineblock in core-buf.tex. Does \setupblock[Nederlandsblok][before=,after

Re: [NTG-context] blocks in itemize

2005-08-23 Thread Rob Ermers
] \setupblock[Nederlandsblok][before=,after=] \setupblock[Engelsblok][before=,after=] \hideblocks[Nederlandsblok] %\hideblocks[Engelsblok] \starttext there \beginNederlandsblok Ik vraag me af of ze ook appels verkopen 1 \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples 1

Re: [NTG-context] Blocks in a macro?

2005-02-14 Thread Michal Kvasnicka
] \defineblock[question, answer] \hideblocks[answer] \setupblock[question][before=\startquestion,after=\stopquestion] \setupblock[answer][before=\startanswer,after=\stopanswer] \starttext \chapter{Questions} \beginquestion Question one \endquestion \beginanswer Answer one \endanswer \beginquestion

[NTG-context] \setupblock[name][file=name]

2003-09-26 Thread Bernd Militzer
Hi, the example \setupblock[homework][file=student] that Hans describes in his docu does not work for me! Help needed! Thanks in advance Bernd ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context

Re: [NTG-context] \setupblock[name][file=name]

2003-09-26 Thread Hans Hagen
At 12:01 26/09/2003 +0200, you wrote: Hi, the example \setupblock[homework][file=student] that Hans describes in his docu does not work for me! Help needed! did you define the block? \defineblock[homework] == test.tex === \defineblock[homework] \setupblock[homework