Re: [NTG-context] Typing efficiency

2020-09-06 Thread Jan Willem Flamma
gt; Hi,> > Sounds like a job for the blocks mechanism more so than buffers:> > > \defineblock[entext]> \defineblock[nltext]>    > \defineselector [language] [max=2,n=1]> \startmode[en]>  \setupselector[language][n=1]>  \keepblocks[entext]> \stopmode> \sta

Re: [NTG-context] Typing efficiency

2020-09-04 Thread Wolfgang Schuster
Taco Hoekwater schrieb am 04.09.2020 um 15:51: Hi, Sounds like a job for the blocks mechanism more so than buffers: \defineblock[entext] \defineblock[nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \keepblocks[entext] \stopmode

Re: [NTG-context] Typing efficiency

2020-09-04 Thread Taco Hoekwater
Hi, Sounds like a job for the blocks mechanism more so than buffers: \defineblock[entext] \defineblock[nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \keepblocks[entext] \stopmode \startmode[nl] \setupselector[language][n=2

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-10 Thread Jan Willem Flamma
sList{>>> \page[yes] \stopmode>>> }>>> \definestartstop[Questions][>>> before=\StartQuestionsList,>>> after=\StopQuestionsList>>> ]>>> >>> >>> \startQuestions>>> Question A….>>> Question B….>>> \stopQu

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

2020-06-09 Thread Fabrice L
;>> \page[yes] \stopmode >>>> } >>>> \definestartstop[Questions][ >>>> before=\StartQuestionsList, >>>> after=\StopQuestionsList >>>> ] >>>> >>>> >>>> \startQuestions >>>> Question A…. >>>> Question B…. >>

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

2020-06-09 Thread Hans Hagen
tions Question A…. Question B…. \stopQuestions Some other text... % One of the oldest mechanism available ... blocks: \enablemode[classroom] % comment this \defineblock[Question] \doifmode {classroom} { \keepblocks[Question] } \starttext Text A

[NTG-context] \beginBLOCKS and \endBLOCKS do not work in \dorecurse

2019-11-11 Thread Romain Diss
Hi, I cannot make \beginBLOCKS and \endBLOCKS work in a \dorecurse loop. Is it possible? Here is a minimum non working exemple (from https://wiki.contextgarden.net/Command/defineblock): %% \startdocument \defineblock[question] \hideblocks[question] % We don't want to print blocks where we

[NTG-context] LMTX issue with multple question blocks

2019-11-07 Thread Jan Willem Flamma
llback modern-designsize rm 12pt' is loaded open source > level 3, order 4, name 'knuth.tex' close source> level 3, order 4, name 'knuth.tex' I cannot reproduce the problem on a Windows system. Can somebody on an OS X system check and confirm the issue? Thanks, Jan Willem Fl

[NTG-context] Tagged blocks

2019-06-18 Thread Jan Willem Flamma
,way=bychapter] \defineenumeration[answer] [location=margin,text=Answer] \defineblock[question] \defineblock[answer] \hideblocks[question] \hideblocks[answer] \starttext \startchapter[title=Chapter for regular questions] \beginquestion \startquestion Normal question \stopquestion \endquestion

[NTG-context] Fwd: Question and Answer Iteration

2019-03-13 Thread Jeroen
}, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\AnswerTextCommand] \defineblock[answer] % END SETUP \starttext \chapter{Chap1} \section{End of Chapter Questions} \startquestion Question 1

[NTG-context] Question and Answer Iteration

2019-03-12 Thread Jeroen
wer] [text=Answer, headcommand=\AnswerTextCommand] \defineblock[answer] \startbuffer % \startquestion \input knuth \stopquestion % \beginanswer \startanswer \input knuth \stopanswer \endanswer % \stopbuffer \starttext \dorecurse{10

Re: [NTG-context] hysteresis with content in blocks (one strike and you can be out forever)

2019-02-06 Thread Wolfgang Schuster
illustrative example), on Linux amd64, 2019.01.28 beta: 1. Make the following file: == file: testhysteresis.tex === \defineblock[foo] \starttext \def\abc{20} \beginfoo Use \abc \endfoo \useblocks[foo] \stoptext == stop: testhysteresis.tex === 2. Compile

[NTG-context] hysteresis with content in blocks (one strike and you can be out forever)

2019-02-06 Thread Sanjoy Mahajan
: 1. Make the following file: == file: testhysteresis.tex === \defineblock[foo] \starttext \def\abc{20} \beginfoo Use \abc \endfoo \useblocks[foo] \stoptext == stop: testhysteresis.tex === 2. Compile it with "context --nonstopmode testhysteresi

Re: [NTG-context] constructing block content partly with lua

2019-02-05 Thread Hans Hagen
ut also with no luck. Also, either version of onerg works as expected if I delete the context.beginanswer() and the \endanswer lines. the problem is that you effectively use buffers so you have a different catcode regime ... i'm not sure what you want but thsi might give a clue \starttext \defineb

Re: [NTG-context] constructing block content partly with lua

2019-02-05 Thread Hans Hagen
to where I've gone wrong. I've also tried steppers without much luck (and, admittedly, without really understanding their use). === testluabeginblock.tex === \defineblock[answer] \hideblocks[answer] \def\onearg#1{{\bf #1}} \def\noarg{{\it fixed argument}} \starttext \sta

[NTG-context] constructing block content partly with lua

2019-02-05 Thread Sanjoy Mahajan
tried steppers without much luck (and, admittedly, without really understanding their use). === testluabeginblock.tex === \defineblock[answer] \hideblocks[answer] \def\onearg#1{{\bf #1}} \def\noarg{{\it fixed argument}} \starttext \startluacode context.beginanswer()

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-02-01 Thread Otared Kavian
, coupling=question] % Each question is followed immediately by its answer. % The answers are put in a block which will be used later \defineblock[hint] \hideblocks[hint] \defineblock[answer] \hideblocks[answer] % We define a command used after a % Question for which no Answer is provided % Since

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Mikael P. Sundqvist
, numbercommand=\problemtextmakro, number=yes, alternative=serried, hang=margin, indentnext=auto, indenting={yes,small}, prefix=yes, prefixsegments=chapter, way=bychapter, ] \defineblock[losn] \hideblocks[losn] \define[1]\losntextmakro {\doifreferencefoundelse{problem:\currentconstructionreference

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Weber, Matthias
, location=hanging] \defineblock[exercise] \defineblock[solution] \hideblocks[solution] \setupinteraction [state=start] \starttext \section{Main Text} \subsection[subsec:1]{problem section 1} \startexercise Addition\index{addition} problem: $1+1=?$ \stopexercise \beginsolution[one] \startsolution

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Wolfgang Schuster
Hi Sanjoy, when you have a equal number of questions ans answers you can create a enumeration for each and collect the answers with the block mechanism. At the end of the document you can flush the collected answers. \defineblock [answer] \defineenumeration [question] \defineenumeration

Re: [NTG-context] prevent page break when using blocks

2018-09-27 Thread Wolfgang Schuster
Jan Willem Flamma schrieb am 27.09.18 um 17:18: Dear list members, How can I prevent that a question block breaks across a page? Kind regards, Jan Willem Flamma MWE \defineblock[question] \defineblock[answer] \hideblocks[question] \hideblocks[answer] \defineenumeration [question

[NTG-context] prevent page break when using blocks

2018-09-27 Thread Jan Willem Flamma
Dear list members, How can I prevent that a question block breaks across a page? Kind regards, Jan Willem Flamma MWE \defineblock[question] \defineblock[answer] \hideblocks[question] \hideblocks[answer] \defineenumeration [question] [text={Question}, after={\blank[2*big

Re: [NTG-context] Modes in tables

2018-09-07 Thread Jan Willem Flamma
hen mode BL is not >> enabled. >> >> When mode BL is enabled (using the toggle), the third column should of >> course appear again. >> >> How can I achieve this? >> >> Regards, >> Jan Willem >> >> >> MWE: >> &

Re: [NTG-context] Modes in tables

2018-09-06 Thread Wolfgang Schuster
can I achieve this? Regards, Jan Willem MWE: \starttext %Toggles %\enablemode[BL] \defineblock[question] \defineblock[answer] \hideblocks[question] \hideblocks[answer] \defineenumeration [question] [text=Question, after={\blank[2*big]}, inbetween={\blank[nowhite

[NTG-context] Modes in tables

2018-09-06 Thread Jan Willem Flamma
] \defineblock[question] \defineblock[answer] \hideblocks[question] \hideblocks[answer] \defineenumeration [question] [text=Question, after={\blank[2*big]}, inbetween={\blank[nowhite]}, way=bychapter, prefixsegments=chapter, prefix=yes] \defineenumeration

Re: [NTG-context] Large space between mode blocks

2017-05-18 Thread Hans Hagen
Kind regards, Jan Willem Flamma \enablemode[test] \defineblock[question] \defineblock[answer] \starttext \doifmode{test}{ \input knuth \beginquestion \startquestion Question \stopquestion \endquestion \beginanswer

[NTG-context] Large space between mode blocks

2017-05-18 Thread Jan Willem Flamma
position of the closing curly bracket. >> I prefer to use \doifmode constructions because they can be nested. The >> question block must play a role here but I don’t know why. >> >> Am I overlooking something here? >> >> Kind regards, >> Jan Willem F

Re: [NTG-context] \doifmode error with question blocks

2017-05-18 Thread Hans Hagen
of the closing curly bracket. I prefer to use \doifmode constructions because they can be nested. The question block must play a role here but I don’t know why. Am I overlooking something here? Kind regards, Jan Willem Flamma \enablemode[test] \defineblock[question] \defineblock[answer

[NTG-context] \doifmode error with question blocks

2017-05-18 Thread Jan Willem Flamma
constructions because they can be nested. The question block must play a role here but I don’t know why. Am I overlooking something here? Kind regards, Jan Willem Flamma \enablemode[test] \defineblock[question] \defineblock[answer] \starttext \doifmode{test}{ \input knuth

Re: [NTG-context] Extract only certain part of document (via modes)?

2016-11-10 Thread Wolfgang Schuster
Hans Hagen <mailto:pra...@wxs.nl> 10. November 2016 um 17:27 search for 'blocks' ... \defineblock ... \hideblocks \keepblocks \useblocks \processblocks \selectblocks This doesn’t solve the problem because he want a document which contains *only* certain blocks and nothing else, a so

Re: [NTG-context] Extract only certain part of document (via modes)?

2016-11-10 Thread Hans Hagen
only all the exercises (or just everything "in one mode")? search for 'blocks' ... \defineblock ... \hideblocks \keepblocks \useblocks \processblocks \selectblocks Hans - Hans Hage

Re: [NTG-context] Clickable question/answer numbers (Otared Kavian)

2016-11-07 Thread Willi Egger
number=yes, > prefix=yes, > prefixsegments=chapter, > coupling=question] > > % Each question is followed immediately by its answer. > % The answers are put in a block which will be used later > \defineblock[answer] > \hideblocks[answer] > > % We def

Re: [NTG-context] Clickable question/answer numbers (Otared Kavian)

2016-11-06 Thread Otared Kavian
immediately by its answer. % The answers are put in a block which will be used later \defineblock[answer] \hideblocks[answer] % We define a command used after a % Question for which no Answer is provided % Since the block commands % \beginanswer ... \endanswer % cannot be used directly in a macro

Re: [NTG-context] Extract only certain part of document (via modes)?

2016-11-06 Thread Mikael P. Sundqvist
ock and ask Hans to add a \saveblocks > commands > which writes the content of all exercise blocks to a external file (like > \savebuffer lets > you save the content of a buffer in a external file). > > > \defineblock[exercise] > \keepblocks [exercise] > > \defineenu

Re: [NTG-context] Clickable question/answer numbers

2016-11-06 Thread Otared Kavian
, number=yes, prefix=yes, prefixsegments=chapter, coupling=question] % Each question is followed immediately by its answer. % The answers are put in a block which will be used later \defineblock[answer] \hideblocks[answer] % We define a command used after a % Question

Re: [NTG-context] Extract only certain part of document (via modes)?

2016-11-06 Thread Wolfgang Schuster
er in a external file). \defineblock[exercise] \keepblocks [exercise] \defineenumeration[exercise][text=Exercise] %\doifmode{exercises}{\saveblocks[exercise][exercises.tex]} \starttext \beginexercise \startexercise This is the first exercise. \stopexercise \endexercise

Re: [NTG-context] Clickable question/answer numbers

2016-11-06 Thread Otared Kavian
=\AnswerTextCommand, number=yes, prefix=yes, prefixsegments=chapter, coupling=question] \defineblock[answer] %% Why this command generates an erreor? \define\noanswer{% \beginanswer \incrementcounter[answer] \endanswer} \define

Re: [NTG-context] Clickable question/answer numbers

2016-11-05 Thread Wolfgang Schuster
nswerCounter]} {#1}} \defineenumeration [question] [text=Question, headcommand=\QuestionTextCommand] \defineenumeration [answer] [text=Answer, headcommand=\AnswerTextCommand] \defineblock[answer] \startbuffer % \startquestion \input knuth \stopquestion %

Re: [NTG-context] Clickable question/answer numbers

2016-11-04 Thread Mikael P. Sundqvist
this very nice tool (I usually only write to the list when I have problems, sorry)! Best regards, Mikael \definecolor[contrastcolor][darkred] \defineintermediatecolor[contrastbgcolor][0.6,contrastcolor,white] \setupinteraction[state=start,color=,contrastcolor=,style=] \defineblock[answer

Re: [NTG-context] Clickable question/answer numbers

2016-11-04 Thread Otared Kavian
ences-show] > > \setupinteraction[state=start,color=,contrastcolor=,style=] > > \defineblock[answer] > \hideblocks[answer] > > \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}} > > > \defineenumeration[exercise][ > text=Question, > title=yes, >

Re: [NTG-context] Clickable question/answer numbers

2016-11-03 Thread Mikael P. Sundqvist
\usemodule[references-show] \setupinteraction[state=start,color=,contrastcolor=,style=] \defineblock[answer] \hideblocks[answer] \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}} \defineenumeration[exercise][ text=Question, title=yes, titlestyle=, titlecolor=black, headstyle={\sc},

Re: [NTG-context] Clickable question/answer numbers

2016-11-03 Thread Mikael P. Sundqvist
r instance, but something >>> does not work…). >>> >>> Le me know if you find a satisfactory solution… >>> >>> Best regards: OK >>> %%% begin interactive-question-answer.tex >>> \setupinteraction[state=start,color=,contrastcolor=,style=] >>> >

Re: [NTG-context] Clickable question/answer numbers

2016-11-03 Thread Hans Hagen
factory solution… Best regards: OK %%% begin interactive-question-answer.tex \setupinteraction[state=start,color=,contrastcolor=,style=] \defineblock[answer] \hideblocks[answer] \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}} \define[1]\AnswerToQuestion{Question \goto{(see Solution)}[A

Re: [NTG-context] Clickable question/answer numbers

2016-11-02 Thread Mikael P. Sundqvist
ferences (I tried \getnumber[question] > and such to append to Q:\getnumber[question] for instance, but something does > not work…). > > Le me know if you find a satisfactory solution… > > Best regards: OK > %%% begin interactive-question-answer.tex > \setupinteraction[stat

Re: [NTG-context] Clickable question/answer numbers

2016-11-02 Thread Otared Kavian
\setupinteraction[state=start,color=,contrastcolor=,style=] \defineblock[answer] \hideblocks[answer] \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}} \define[1]\AnswerToQuestion{Question \goto{(see Solution)}[A:Q:#1]} \define[1]\StartQuestion{\startquestion[reference=Q:#1,title={\AnswerToQuestion

Re: [NTG-context] Clickable question/answer numbers

2016-11-02 Thread Mikael P. Sundqvist
"Question 1.1" >> clickable with that target. >> >> I hope I make myself clear. If it matters, in the solution one could >> assume that the optional tag of the \startquestion \stopquestion is >> given for all questions. >> >> Best re

Re: [NTG-context] Clickable question/answer numbers

2016-11-02 Thread Otared Kavian
lickable with that target. > > I hope I make myself clear. If it matters, in the solution one could > assume that the optional tag of the \startquestion \stopquestion is > given for all questions. > > Best regards, Mikael > > %% qa.tex > \setupinteraction[state=start,co

[NTG-context] Clickable question/answer numbers

2016-11-02 Thread Mikael P. Sundqvist
tart,color=,contrastcolor=,style=] \defineblock[answer] \hideblocks[answer] \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}} \defineenumeration[question][ text=Question, headcolor=darkred, width=fit, number=yes, prefix=yes, prefixsegments=section, ] \starttext \section{A section with

[NTG-context] Influence enumeration spacing

2016-10-25 Thread Jan Willem Flamma
between paragraphs? \setupwhitespace[big] \defineblock[question] \keepblocks[question] \defineenumeration [question] [inbetween={\blank[nowhite]}] \starttext \input ward \input ward \beginquestion \startquestion Text text text \startitemize

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

2016-09-06 Thread Mikael P. Sundqvist
ocks at the > wiki (http://wiki.contextgarden.net/Command/processblocks), but I'm > not sure that is my cure. I probably miss something easy... > > The problem is probably easiest shown by an example: > > %%% > \defineblock[A] > \hideblocks[A] > > \defineenumeratio

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

2016-09-06 Thread Wolfgang Schuster
t sure that is my cure. I probably miss something easy... The problem is probably easiest shown by an example: %%% \defineblock[A] \hideblocks[A] \defineenumeration[A][ text=A, prefix=yes, prefixsegments=chapter, way=bychapter, ] \starttext \chapter{First chapter} \beginA \startA My first

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

2016-09-01 Thread Mikael P. Sundqvist
easiest shown by an example: %%% \defineblock[A] \hideblocks[A] \defineenumeration[A][ text=A, prefix=yes, prefixsegments=chapter, way=bychapter, ] \starttext \chapter{First chapter} \beginA \startA My first answer in the first chapter. \stopA \endA \beginA \startA My second answer in the first

Re: [NTG-context] disappearing margin text

2016-06-23 Thread josephcanedo
Hi, have you tried putting the \inmargin Inside before= in defineenumeration ? Seems to work fine (assuming you want the marginal note on same line as question. Joseph \defineblock[question] \hideblocks[question] \defineenumeration [question] [text=Question, before=\inmargin

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
On Wed, 22 Jun 2016 11:52:04 +0200 Jan Willem Flamma <jwfregis...@icloud.com> wrote: > In the following MWE, the margin text appears at question 1 but not > at question 2. They both appear, but are overlaid (try with different texts). > MWE: > \defineblock[question] >

[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

[NTG-context] enumeration header spacing control

2016-06-18 Thread Jan Willem Flamma
time. Appreciate any suggestion on how to reduce the vertical space between the enumeration header and the text MWE \setupwhitespace[big] \defineblock [question] \defineenumeration [question] [alternative=top, after={\blank

Re: [NTG-context] macro expansion inside a block

2016-02-08 Thread Hans Hagen
On 2/5/2016 5:13 PM, Andrea De Michele wrote: Hi all, I want to expand a macro inside a block when the block is written and not when it is used. Here a simple example: \defineblock[myblock] \hideblocks[myblock] \starttext \define\mynumber{1} Some text: mynumber is :\mynumber \beginmyblock

Re: [NTG-context] macro expansion inside a block

2016-02-08 Thread Andrea De Michele
Hans Hagen <pra...@wxs.nl> writes: > On 2/5/2016 5:13 PM, Andrea De Michele wrote: >> Hi all, >> I want to expand a macro inside a block when the block is written and not >> when it is used. >> Here a simple example: >> >> \defineblock[mybl

[NTG-context] macro expansion inside a block

2016-02-05 Thread Andrea De Michele
Hi all, I want to expand a macro inside a block when the block is written and not when it is used. Here a simple example: \defineblock[myblock] \hideblocks[myblock] \starttext \define\mynumber{1} Some text: mynumber is :\mynumber \beginmyblock This is mynumber inside the first myblock, I

[NTG-context] How to increment a counter

2015-02-05 Thread Otared Kavian
easy…) and I need to increment the counter by saying \incrementcounter[Answers] But this does not work, for an unknown reason. (See below) Can anyone give an advice? Thanks in advance. Best regards: OK begin question-answers-block.tex \defineblock[Exoblock] \defineblock[Solblock

[NTG-context] Defining commands in \start ... \stop

2014-03-30 Thread Xan
Hi, Concerned with the answers to the [that topic](http://www.ntg.nl/pipermail/ntg-context/2014/077099.html), I was thinking if I could define a command Exercise with a optional argument (the Answer). \defineblock[question] \defineblock[answer] \defineenumeration[question][text={Question

Re: [NTG-context] Defining commands in \start ... \stop

2014-03-30 Thread Xan
This: \defineblock[question] \defineblock[answer] \defineenumeration[question][text={Question}] \defineenumeration[answer] [text={Answer}] \keepblocks[question] \hideblocks[answer] \def\mynewcommand{\dosingleempty\doMyNewCommand} \def\doMyNewCommand[#1]#2{% \iffirstargument

Re: [NTG-context] Defining commands in \start ... \stop

2014-03-30 Thread Wolfgang Schuster
Am 30.03.2014 um 19:28 schrieb Xan dxpubl...@telefonica.net: This: \defineblock[question] \defineblock[answer] \defineenumeration[question][text={Question}] \defineenumeration[answer] [text={Answer}] \keepblocks[question] \hideblocks[answer] \def\mynewcommand{\dosingleempty

Re: [NTG-context] solutions and problems

2014-02-23 Thread Xan
,headstyle=\ss,distance=0.25em,width=fit,before={\incrementcounter[resposta]}] % Answers \defineenumeration[resposta][headstyle=\ss,text={Solucions de l'exercici \getnumber[exercici]},width=fit,alternative=serried,before={\decrementcounter[resposta]},number=no] \defineblock[resposta

Re: [NTG-context] solutions and problems

2014-02-23 Thread Wolfgang Schuster
]},number=no] \defineblock[resposta] \hideblocks[resposta] % Exercises \startexercici Bla... \beginresposta \resposta (Solucions: \startitemize[a,text] \item D, \item I, \item D, \item No té relació, \item D, \item D, \item No té relació, \item No té relació, \item D.\stopitemize

Re: [NTG-context] solutions and problems

2014-02-23 Thread Xan
at this point and this is why you get always the same value. Is there any way of first evaluate \getnumber[exercici] and then store the content, and not inversely (as context does now)? \defineenumeration[exercici][text=Exercici] \defineenumeration[resposta][text=Solucions] \defineblock[resposta

Re: [NTG-context] solutions and problems

2014-02-22 Thread Xan
]}] % Answers \defineenumeration[resposta][headstyle=\ss,text={Solucions de l'exercici \getnumber[exercici]},width=fit,alternative=serried,before={\decrementcounter[resposta]},number=no] \defineblock[resposta] \hideblocks[resposta] % Exercises \startexercici Bla... \beginresposta \resposta (Solucions

Re: [NTG-context] solutions and problems

2014-02-22 Thread Wolfgang Schuster
,distance=0.25em,width=fit,before={\incrementcounter[resposta]}] % Answers \defineenumeration[resposta][headstyle=\ss,text={Solucions de l'exercici \getnumber[exercici]},width=fit,alternative=serried,before={\decrementcounter[resposta]},number=no] \defineblock[resposta] \hideblocks[resposta

Re: [NTG-context] solutions and problems

2014-02-21 Thread Xan
=\ss,distance=0.25em,width=fit,before={\incrementcounter[answer]}] \defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried,before={\decrementcounter[resposta]}] \defineblock[resposta] \hideblocks[resposta] @Thomas: thank you very much for the link. Eventually I

[NTG-context] solutions and problems

2014-02-20 Thread Xan
,distance=0.25em,width=fit] \defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried] \defineblock[resposta] % the answer \hideblocks[resposta] And in my text, I have: \startexercici \beginresposta \resposta Exercici 2 (Solucions: \startitemize[a,text] \item D

Re: [NTG-context] solutions and problems

2014-02-20 Thread Otared Kavian
Hi, Maybe this is what you looking for: begin question-hint-answer.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] \defineenumeration[hint][alternative=hanging,width=4cm,text

Re: [NTG-context] solutions and problems

2014-02-20 Thread Xan
Not exactly. If you don't have the same number of answers that the number of questions, so your counter is not properly set. See that: \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper

Re: [NTG-context] solutions and problems

2014-02-20 Thread Wolfgang Schuster
Am 20.02.2014 um 13:22 schrieb Xan dxpubl...@telefonica.net: Not exactly. If you don't have the same number of answers that the number of questions, so your counter is not properly set. See that: \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration

Re: [NTG-context] solutions and problems

2014-02-20 Thread Jaroslav Hajtmar
is not properly set. See that: \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] \defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for question},stopper={.}] \defineenumeration

Re: [NTG-context] reset blocks with dorecurse

2014-01-15 Thread DesdeChaves
\defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question] [alternative=hanging, width=2.5cm, text={Question}, headstyle={\bi}, stopper={.}] \defineenumeration[hint] [alternative=hanging, width=4cm

[NTG-context] reset blocks with dorecurse

2014-01-14 Thread DesdeChaves
\defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question] [alternative=hanging, width=2.5cm, text={Question}, headstyle={\bi}, stopper={.}] \defineenumeration[hint] [alternative=hanging, width=4cm, text

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

2014-01-12 Thread Jaroslav Hajtmar
Here is my modification of answer enumeration (not working): begin question-hint-answer-blocks.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question] [alternative=hanging, width=2.5cm, text={Question}, headstyle={\bi}, stopper

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

2014-01-12 Thread Otared Kavian
enumeration (not working): begin question-hint-answer-blocks.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question] [alternative=hanging, width=2.5cm, text={Question}, headstyle={\bi}, stopper={.}] \defineenumeration[hint

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

2014-01-12 Thread Jaroslav Hajtmar
, but I was unable to put answers into a compact form. Thanks Jaroslav Hajtmar Here is my modification of answer enumeration (not working): begin question-hint-answer-blocks.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question] [alternative

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

2014-01-11 Thread Wolfgang Schuster
is to save the content from the begin to the end block and hides it when you use \hideblocks[…]. To output the content of the environments you can use \useblocks[…]. \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,text={Question

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

2014-01-11 Thread Otared Kavian
question-hint-answer-blocks.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question] [alternative=hanging, width=2.5cm, text={Question}, headstyle={\bi}, stopper={.}] \defineenumeration[hint] [alternative

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

2014-01-09 Thread Otared Kavian
the following which was given to me by Hans a long time ago: unfortunately for some reason this does not work anymore with ConTeXt mkiv, but it is quite fine with mkii: %%% begin question-hint-answer.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][location

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

2014-01-09 Thread Aditya Mahajan
\defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][location=hanging,text={Question},stopper={.}] \defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}] \defineenumeration[answer][location=hanging,text={Answer to question},stopper

[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

[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] Place an annotation before it is defined

2013-01-07 Thread Marco Patzer
On 2013–01–07 Hans Hagen wrote: buffers (or blocks) Buffers apparently can't be used before the content is defined, but it works for blocks (I never used them). Test: \defineblock [bar] \starttext buf: \getbuffer[foo] BBB \startbuffer[foo] buf: AAA \stopbuffer \useblocks

Re: [NTG-context] Place an annotation before it is defined

2013-01-07 Thread Wolfgang Schuster
Am 07.01.2013 um 22:49 schrieb Marco Patzer home...@lavabit.com: On 2013–01–07 Hans Hagen wrote: buffers (or blocks) Buffers apparently can't be used before the content is defined, but it works for blocks (I never used them). Test: \defineblock [bar] \starttext buf: \getbuffer

Re: [NTG-context] Place an annotation before it is defined

2013-01-07 Thread Hans Hagen
On 1/7/2013 10:49 PM, Marco Patzer wrote: On 2013–01–07 Hans Hagen wrote: buffers (or blocks) Buffers apparently can't be used before the content is defined, but it works for blocks (I never used them). Test: \defineblock [bar] \starttext buf: \getbuffer[foo] BBB \startbuffer[foo

Re: [NTG-context] Place an annotation before it is defined

2013-01-07 Thread Jaroslav Hajtmar
Hello Wolfgang, Last example is not working! I have installed last version of standalone version... Jaroslav Hajtmar Here is this example ... \defineblock[question] \defineblock[answer] \hideblocks[answer] \defineenumeration[question] \defineenumeration[answer] \starttext \chapter

Re: [NTG-context] Place an annotation before it is defined

2013-01-07 Thread Marco Patzer
On 2013–01–07 Jaroslav Hajtmar wrote: Last example is not working! I have installed last version of \defineblock[question] \defineblock[answer] \hideblocks[answer] \defineenumeration[question] \defineenumeration[answer] \starttext \chapter{Questions} % Show only the question

[NTG-context] howto get good references in mkiv?

2012-01-05 Thread Rene van Hassel
Hello Members, some piece of code, with the problems. I hope somebody can use it to improve ConTeXt, Compilation with texexec is no problem, Kind Regards, Rene' % Begin code: \setupcolors[state=start] \setupinteraction[state=start,color=orange] \setupreferencing[state=start] \defineblock

[NTG-context] problem with coupling (mkiv)

2012-01-02 Thread Rene van Hassel
Hello members, a happy new year to everybody. And here the problem I have: \setupinteraction[start=state,color=orange] \setupcombinedlist[content][interaction=all] \defineblock[question] \defineblock[answer] \defineenumeration[questions][location=top,coupling=answers] \defineenumeration

[NTG-context] problem with cross references

2012-01-02 Thread Rene van Hassel
that somebody can give me some advice. With the hidden blocks there is no problem. But with the item(s) there is a problem, Kind Regards, Rene' van Hassel % Code: \setupcolors[state=start] \setupinteraction[state=start,color=orange] \setupreferencing[state=start] \defineblock[exercise] \defineblock

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

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

2010-11-18 Thread Glen Callaghan
. thanks Glen - \defineblock[Block] \defineenumeration[Enum][location=left,text=Test] \define[1]\Revs{ \beginBlock \startEnum #1 \stopEnum \endBlock } \starttext \section{Use} \useblocks[Block] \reset[Enum] \section{Define

  1   2   >