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

2020-06-10 Thread Jan Willem Flamma
estions>>> >>> Some other text...>>> % One of the oldest mechanism available ... blocks: \enablemode[classroom] % comment this \defineblock[Question] \doifmode {classroom} { \keepblocks[Question]} \starttext  Text A  \begin

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

2020-06-09 Thread Fabrice L
>> \stopQuestions >>>> >>>> Some other text... >>>> % ———— > One of the oldest mechanism available ... blocks: > > \enablemode[classroom] % comment this > > \defineblock[Question] > > \doifmode {classro

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

2020-06-09 Thread Hans Hagen
\beginQuestion Question A…. \endQuestion Text B \beginQuestion Question B…. \endQuestion \page \doifnotmode {classroom} { \useblocks[Question]

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

2019-11-11 Thread Romain Diss
define them \dorecurse{2}{ \beginquestion[first] To be, or not to be? \endquestion \section{Let's see what blocks we've got.} \useblocks[question] \section{We've seen what blocks we've got. Let's take another look at that first question.} \useblocks[question][first

[NTG-context] LMTX issue with multple question blocks

2019-11-07 Thread Jan Willem Flamma
e \stopquestion \endquestion \beginanswer \startanswer A \stopanswer \endanswer %\beginquestion %\startquestion %Questions text %\startitemize[a] %\item Answer A %\item Answer B %\item Answer C %\stopitemize %\stopquestion %\endquestion %\beginanswer %\startanswer %A %\s

Re: [NTG-context] Tagged blocks

2019-06-19 Thread Wolfgang Schuster
with the tag [exam] should not be processed in the first chapter and only appear in the second chapter. According to the wiki and reference manual it should be possible using either \useblocks or \selectblocks but I can't get it to work. At this point you can hide tagged blocks. \beginquestion

[NTG-context] Tagged blocks

2019-06-18 Thread Jan Willem Flamma
chapter and only appear in the second chapter. According to the wiki and reference manual it should be possible using either \useblocks or \selectblocks but I can't get it to work. Who can help me out? Best regards, Jan Willem Flamma \defineenumeration[question][location=margin,text=Question

[NTG-context] Fwd: Question and Answer Iteration

2019-03-13 Thread Jeroen
\stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \Chapter{End of Chapter Answers} \section{Answers Chapter 1} \useblocks[answer] \section{Answers Chapter 2} \useblocks[answer] \stoptext I have it working with a single chapter

[NTG-context] Question and Answer Iteration

2019-03-12 Thread Jeroen
}{\getbuffer} \page \useblocks[answer] \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-con

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
lock[foo] \beginfoo test 1 \endfoo \startluacode buffers.assign("temp","test 2") structures.blocks.save("foo",nil,nil,"temp") \stopluacode \useblocks[foo] \stoptext there are mechanisms for templates for constru

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

2019-02-05 Thread Hans Hagen
estparameter That is, when the "answer" block is included via \useblocks, somehow the beginning of the answer, which should be "\onearg{Test parameter}", has its curly braces and spaces elided. What characteristic(s) of the Lua interface am I missing? Thank you if you happen

[NTG-context] constructing block content partly with lua

2019-02-05 Thread Sanjoy Mahajan
uot; block is included via \useblocks, somehow the beginning of the answer, which should be "\onearg{Test parameter}", has its curly braces and spaces elided. What characteristic(s) of the Lua interface am I missing? Thank you if you happen to where I've gone wrong. I've also

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

2019-02-01 Thread Otared Kavian
% of numbers associated to Answer \startchapter[ownnumber=1,title=Hints] \useblocks[hint] \stopchapter \startchapter[ownnumber=1,title=Answers and solutions] \useblocks[answer] \stopchapter \stoptext end interactive-question-hint-answer.tex > On 1 Feb 2019, at 04:10, Sanjoy Mahajan wr

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

2019-01-31 Thread Weber, Matthias
{Answers to \in{section}[subsec:1]} \useblocks[solution][one] \subsection{Answers to \in{section}[subsec:2]} \useblocks[solution][two] \stoptext > On Jan 31, 2019, at 5:02 PM, Wolfgang Schuster > wrote: > > Hi Sanjoy, > > when you have a equal number of questions ans answ

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

2019-01-31 Thread Wolfgang Schuster
[answer] \starttext \startquestion Question 1 \stopquestion \beginanswer \startanswer Answer 1 \stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \page \useblocks[answer] \stoptext Wolfgang Sanjoy Mahajan schrieb am

[NTG-context] prevent page break when using blocks

2018-09-27 Thread Jan Willem Flamma
Answer 3 \item Answer 4 \item Answer 5 \stopitemize \stopquestion \endquestion \beginanswer \startanswer B \stopanswer \endanswer \stopbuffer \dorecurse{30}{\getbuffer[question]} \startsection[title=Questions] \useblocks[question][criterium=chapter] \page \startsubsubsection[title=Answers

Re: [NTG-context] Modes in tables

2018-09-07 Thread Jan Willem Flamma
xsegments=chapter, >> prefix=yes] >>\beginquestion >> \startquestion >> Calculate the hydrostatic pressure of the following fluid. >> \starttabulate[|lw(6cm)|lw(3cm)|\doifmode{BL}{p|}] >> \NC Well depth \NC 10100 ft

Re: [NTG-context] Modes in tables

2018-09-06 Thread Wolfgang Schuster
=Questions] \useblocks[question] \startsubsubsection[title=Answers] \useblocks[answer] \stopsubsubsection \stopsection \stoptext ___ If your question is of interest to others as well, please add an entry

[NTG-context] Modes in tables

2018-09-06 Thread Jan Willem Flamma
}{\NC 1.08 kg/l} \NC \NR \stoptabulate \stopquestion \endquestion \beginanswer \startanswer 4726 psi\doifmode{BL}{ / 328 bar} \stopanswer \endanswer \startsection[title=Questions] \useblocks[question] \startsubsubsection[title=Answers] \useblocks[answer

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
> This is the fifth question, without its own reference. > > ({\it Hint:} look again at \in{Question}[q:Obvious]). > \stopquestion > > \beginanswer > \startanswer > This is the answer to the fifth question. Read again \in{Answer}[a:Test]. > \stopanswer &

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

2016-11-06 Thread Otared Kavian
question. Read again \in{Answer}[a:Test]. \stopanswer \endanswer \stopchapter % Here we say ownnumber=1, in order to match the prefix % of numbers associated to Answer \startchapter[ownnumber=1,title=Answers and solutions] \useblocks[answer] \stopchapter \stoptext end interactive

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

2016-11-06 Thread Otared Kavian
\startchapter[ownnumber=1,title=Answers and solutions] \useblocks[answer] \stopchapter \stoptext end interactive-question-answer.tex ___ If your question is of interest to others as well, please add an entry

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

2016-11-06 Thread Otared Kavian
\startchapter[ownnumber=1,title=Answers and solutions] \useblocks[answer] \stopchapter \stoptext end example > On 5 Nov 2016, at 19:14, Wolfgang Schuster <schuster.wolfg...@gmail.com> > wrote: > >> Otared Kavian <mailto:ota...@gmail.com> 5. November 2016 um 18:3

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

2016-11-05 Thread Wolfgang Schuster
\beginanswer \startanswer \input knuth \stopanswer \endanswer % \stopbuffer \starttext \dorecurse{10}{\getbuffer} \page \useblocks[answer] \stoptext end example Wolfgang ___ If y

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

2016-11-04 Thread Mikael P. Sundqvist
This is a question without reference. It cannot have any answer. \stopquestion \page[yes] \subject{Answers} \useblocks[answer] \stoptext On Fri, Nov 4, 2016 at 12:50 PM, Wolfgang Schuster <schuster.wolfg...@gmail.com> wrote: > Mikael P. Sundqvist > 3. November 2016 um 16:14 &

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

2016-11-04 Thread Otared Kavian
uestion[Q:test2] > This is a question without title. > \startformula > (a+b)^2=a^2+ab+ba+b^2. > \stopformula > \stopquestion > > \beginanswer > \myanswer[Q:test2] > This is an answer. > \endanswer > > > \startquestion > This is a question without reference

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

2016-11-03 Thread Mikael P. Sundqvist
any answer. \stopquestion \page[yes] \subject{Answers} \useblocks[answer] \stoptext On Thu, Nov 3, 2016 at 12:58 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote: > Dear Hans, > > This seems to be exactly what I need, but I cannot get it to work. > With the example below nothing co

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

2016-11-03 Thread Mikael P. Sundqvist
title=yes, >>> titleleft=, >>> titleright={.}, >>> width=fit, >>> number=yes, >>> prefix=yes, >>> prefixsegments=section, >>> ] >>> >>> \starttext >>>

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

2016-11-03 Thread Hans Hagen
+b^2 = a^2 + 2ab +b^2$ since $ba=ba$. \endanswer \stopquestion \page[yes] \startsection[title={Answers to all questions}] \useblocks[answer] \stopsection \stoptext %%% end interactive-question-answer.tex On 2 Nov 2016, at 16:16, Mikael P. Sundqvist <mic...@gmail.com> wrote: Dear Ota

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

2016-11-02 Thread Mikael P. Sundqvist
{test} > > Indeed $(a+b)^2 = (a+b)(a+b) = a^2 + ab + ba +b^2 = a^2 + 2ab +b^2$ since > $ba=ba$. > \endanswer > > \stopquestion > > \page[yes] > > \startsection[title={Answers to all questions}] > > \useblocks[answer] > > \stopsection > \stoptext > %%

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

2016-11-02 Thread Otared Kavian
] \startsection[title={Answers to all questions}] \useblocks[answer] \stopsection \stoptext %%% end interactive-question-answer.tex > On 2 Nov 2016, at 16:16, Mikael P. Sundqvist <mic...@gmail.com> wrote: > > Dear Otared (and list), > > thank you for your reply and support. > >

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

2016-11-02 Thread Mikael P. Sundqvist
estion, >> headcolor=darkred, >> width=fit, >> number=yes, >> prefix=yes, >> prefixsegments=section, >> ] >> >> \starttext >> >> \section{A section with questions} >>

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

2016-11-02 Thread Otared Kavian
ments=section, > ] > > \starttext > > \section{A section with questions} > > \startquestion[Q:test] > Solve this question! > \stopquestion > > We could, however, click \color[darkyellow]{\in{Answer}[A:Q:test]}. > > \beginanswer > \

[NTG-context] Clickable question/answer numbers

2016-11-02 Thread Mikael P. Sundqvist
questions} \startquestion[Q:test] Solve this question! \stopquestion We could, however, click \color[darkyellow]{\in{Answer}[A:Q:test]}. \beginanswer \myanswer[Q:test] What question? The answer is \quotation{do it yourself}! \endanswer \page[yes] \subject{Answers} \useblocks[answer] \stoptex

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

2016-09-06 Thread Mikael P. Sundqvist
r in the first chapter. > \stopA > \endA > > > \chapter{Second chapter} > > \beginA > \startA > My first answer in the second chapter. > \stopA > \endA > > \beginA > \startA > My second answer in the second chapter. > \stopA > \endA > > \chapter{A

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

2016-09-06 Thread Wolfgang Schuster
answer in the first chapter. \stopA \endA \beginA \startA My second answer in the first chapter. \stopA \endA \chapter{Second chapter} \beginA \startA My first answer in the second chapter. \stopA \endA \beginA \startA My second answer in the second chapter. \stopA \endA \chapter{Answers} \use

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

2016-09-01 Thread Mikael P. Sundqvist
chapter. \stopA \endA \chapter{Second chapter} \beginA \startA My first answer in the second chapter. \stopA \endA \beginA \startA My second answer in the second chapter. \stopA \endA \chapter{Answers} \useblocks[A] \stoptext %%% I get, in the Answer chapter A 3.1, A 3.2, A 3.3 and A 3.4. What

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
text > > \inmargin{margin} > \beginquestion > Text > \endquestion > > \inmargin{margin} > \beginquestion > Text > \endquestion > > \useblocks[question] > > \stoptext ___

[NTG-context] disappearing margin text

2016-06-22 Thread Jan Willem Flamma
=\startquestion,after=\stopquestion] \starttext \inmargin{margin} \beginquestion Text \endquestion \inmargin{margin} \beginquestion Text \endquestion \useblocks[question] \stoptext ___ If your question is of interest

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

2016-02-08 Thread Hans Hagen
This is mynumber inside the first myblock, I want 1 and I obtain: \mynumber \endmyblock \define\mynumber{2} Some text: mynumber now is :\mynumber \beginmyblock This is mynumber inside the second myblock, I want 2 and I obtain: \mynumber \endmyblock \useblocks[myblock] \stoptext This produce

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

2016-02-08 Thread Andrea De Michele
define\mynumber{2} >> Some text: mynumber now is :\mynumber >> \beginmyblock >>This is mynumber inside the second myblock, I want 2 and I obtain: >> \mynumber >> \endmyblock >> >> \useblocks[myblock] >> \stoptext >> >> This produce: >

[NTG-context] macro expansion inside a block

2016-02-05 Thread Andrea De Michele
want 1 and I obtain: \mynumber \endmyblock \define\mynumber{2} Some text: mynumber now is :\mynumber \beginmyblock This is mynumber inside the second myblock, I want 2 and I obtain: \mynumber \endmyblock \useblocks[myblock] \stoptext This produce: Some text: mynumber is :1 Some text: mynumber

[NTG-context] How to increment a counter

2015-02-05 Thread Otared Kavian
\incrementcounter[Answers] % This does not have any effect \startitem This is Answer 3 of exercise 2. \stopitem \stopAnswers \stopsolution \endSolblock \chapter{List of Exercises} \useblocks[Exoblock] \chapter{List of Solutions} \useblocks

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

2014-03-30 Thread Xan
6]{Question 6} \chapter{Answers} \useblocks[answer] \stoptext does not work ___ 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

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

2014-03-30 Thread Wolfgang Schuster
3. \stopanswer \endanswer \mynewcommand{Question 5} \mynewcommand[Resposta 6]{Question 6} \chapter{Answers} \useblocks[answer] \stoptext does not work The block commands use a buffer to store the content and buffers can’t be used in commands. Wolfgang

Re: [NTG-context] solutions and problems

2014-02-21 Thread Xan
. \stopquestion \endquestion \beginanswer \startanswer Answer 3. \stopanswer \endanswer \chapter{Answers} \useblocks[answer] \stoptext Wolfgang ___ If your question is of interest

Re: [NTG-context] solutions and problems

2014-02-20 Thread Otared Kavian
$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext end question-hint-answer.tex Best regards: OK On 20 févr. 2014, at 10:15, Xan dxpubl...@telefonica.net wrote: Hi, Just a question

Re: [NTG-context] solutions and problems

2014-02-20 Thread Xan
\endquestion \beginhint \starthint Remember that $10\times 10 = 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext If you comment one solution, then, you get Answer to question 1, instead

Re: [NTG-context] solutions and problems

2014-02-20 Thread Wolfgang Schuster
%\endanswer \beginquestion \startquestion What is the value of $100/10$? \stopquestion \endquestion \beginhint \starthint Remember that $10\times 10 = 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint

Re: [NTG-context] solutions and problems

2014-02-20 Thread Jaroslav Hajtmar
$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext If you comment one solution, then, you get Answer to question 1, instead of Answer of question 2, which is really. No always a question has an answer provided by me ;-) You can add a answer

Re: [NTG-context] reset blocks with dorecurse

2014-01-15 Thread DesdeChaves
$. \endhint \beginanswer $10$ \endanswer \section{Hints to all questions} \useblocks[hint] \section{Answers to all questions} \useblocks[answer] \setuppagenumber[number=1] \stopbuffer \setuprandomize[124] % set a seed \dorecurse{3} {\setups[examn:make]} \stoptext Thanks

[NTG-context] reset blocks with dorecurse

2014-01-14 Thread DesdeChaves
to all questions} \useblocks[hint] \section{Answers to all questions} \useblocks[answer] \setuppagenumber[number=1] \stopbuffer \setuprandomize[124] % set a seed \dorecurse{3} {\setups[examn:make]} \stoptext Thanks a lot Jorge

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

2014-01-12 Thread Jaroslav Hajtmar
\section{Hints to all questions} \useblocks[hint] \section{Answers to all questions} \useblocks[answer] \stoptext end question-hint-answer-blocks.tex Dne 11.1.2014 20:01, Otared Kavian napsal(a): begin question-hint-answer-blocks.tex \defineblock[question] \defineblock[hint

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

2014-01-12 Thread Otared Kavian
Remember that $10\times 10 = 100$. \endhint \beginanswer $10$ \endanswer \section{Hints to all questions} \useblocks[hint] \section{Answers to all questions} \useblocks[answer] \stoptext end question-hint-answer-blocks.tex Dne 11.1.2014 20:01, Otared Kavian napsal

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

2014-01-12 Thread Jaroslav Hajtmar
\beginhint Remember that $10\times 10 = 100$. \endhint \beginanswer $10$ \endanswer \section{Hints to all questions} \useblocks[hint] \section{Answers to all questions} \useblocks[answer] \stoptext end question-hint-answer-blocks.tex Dne 11.1.2014 20:01, Otared Kavian napsal

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
$. \endquestion \beginhint Use the fact that $2\times 5 = 10$. \endhint \beginanswer $20$. \endanswer \beginquestion What is the value of $100 / 10$? \endquestion \beginhint Remember that $10\times 10 = 100$. \endhint \beginanswer $10$ \endanswer \section{Hints to all questions} \useblocks[hint

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

2014-01-09 Thread Otared Kavian
\endquestion \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext %%% end question-hint-answer.tex Best regards: OK Dne 9.1.2014 15:19, Otared Kavian napsal(a): %%% begin example-exercise.tex %%% % defining \startexo, \stopexo

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

2013-01-31 Thread Ingo Hohmann
the Rainbow Neverland \endAddress \useblocks[Address] Some more text. \stoptext Kind regards, Ingo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context

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

2013-01-31 Thread Hans Hagen
the two more complex mechanisms .. the ones that intercept the input stream \setupblock[Address][ before=\startlines\tt, after=\stoplines, ] will work ok for most text cases \starttext \beginAddress Peter Pan Somewhere over the Rainbow Neverland \endAddress \useblocks[Address] Some more

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

2013-01-31 Thread Aditya Mahajan
\endAddress \useblocks[Address] Some more text. \stoptext And if you really need a typing environment, you can use buffers: \startbuffer[address] #whatver \stopbuffer \getbuffer[address] or \typebuffer[address] Aditya

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
[foo] BBB \startbuffer[foo] buf: AAA \stopbuffer \useblocks [bar] DDD \beginbar block: CCC \endbar \stoptext Is there a reason why the blocks favour begin/end instead of start/stop? Looks weird somehow. Blocks use begin/end to allow the same name

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

2013-01-07 Thread Hans Hagen
] buf: AAA \stopbuffer \useblocks [bar] DDD \beginbar block: CCC \endbar \stoptext Is there a reason why the blocks favour begin/end instead of start/stop? Looks weird somehow. (1) nicer symmetry checks (matching begin/end start/stop) (2) more visible in complex docs (3

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

2013-01-07 Thread Jaroslav Hajtmar
{Questions} % Show only the question blocks \beginquestion \startquestion First question. \stopquestion \endquestion \beginanswer \startasnwer Answer to the first question. \stopanswer \endanswer \chapter{Answers} % Show the question with the corresponding answer \useblocks[question,answer

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

2013-01-07 Thread Marco Patzer
blocks \beginquestion \startquestion First question. \stopquestion \endquestion \beginanswer \startasnwer \startanswer Answer to the first question. \stopanswer \endanswer \chapter{Answers} % Show the question with the corresponding answer \useblocks[question,answer] \stoptext

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

2012-01-05 Thread Rene van Hassel
. \crlf Compilation stopped at the places: First Question, Second Question, First Answer and Second Answer. Pushed Enter and compilation continued. \stopitemize \page \beginquestion \startquestion First Question \stopquestion \startquestion Second Question \stopquestion \endquestion \useblocks[question

[NTG-context] problem with coupling (mkiv)

2012-01-02 Thread Rene van Hassel
[answers][location=top,coupling=questions] \hideblocks[question] \hideblocks[answer] \starttext % Problems with the coupling of questions and answers \beginquestion \startquestions Why ConTeXt doesn't work? \stopquestions \endquestion \useblocks[question] \page \beginanswer \startanswers It always give

[NTG-context] problem with cross references

2012-01-02 Thread Rene van Hassel
solution!\crlf See \in{Exercise}[exer-2]. \stopsolution \endsolution \useblocks[exercise] \page \useblocks[solution] \page % End: First Attempt \chapter{Second Attempt} % Begin: Second Attempt Problem is, that the references of the items become not interactive under mkiv (context). Under mkii

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

[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] More questions about hiding/reusing blocks

2010-01-24 Thread Hans Hagen
\chapter{Solutions} \section{Solutions from chapter 1} get these here \section{Solutions from chapter 2} get those here you can group your solutions in categories: \beginsolution[one] and then use \useblocks[solution][one] A sample file is attached below that has the layout, but all

Re: [NTG-context] More questions about hiding/reusing blocks

2010-01-24 Thread Hans Hagen
] \startsolution[sol:2] Answer: 1. (\in{problem}[ex:2]) \stopsolution \endsolution \page \reset[solution] \section{Answers to the Problems} \subsection{Answers to \in{section}[subsec:1]} \useblocks[solution][one] \subsection{Answers to \in{section}[subsec:2]} \useblocks[solution][two] \stoptext

[NTG-context] Design for Translation

2009-03-11 Thread John Devereux
{IT}} manual.tex: \environment manual-env.tex \useblocks[\lang][installation-1] \useblocks[\lang][installation-2] EN.tex: \beginEN[installation-1] This is how to install the product type 1 \endEN \beginEN[installation-2] This is how to install the product type 2 \endEN DE.tex: \beginDE

Re: [NTG-context] new beta

2008-10-23 Thread Wolfgang Schuster
\endquestion \beginanswer Answer 1 \endanswer \beginquestion Question 2 \endquestion \beginanswer Answer 2 \endanswer \useblocks[answer] \stoptext Wolfgang ___ If your question is of interest to others as well

[NTG-context] hiding enumerations

2008-08-06 Thread Eric DÉTREZ
,reponse] \hideblocks[,reponse] \begintitre \exercice {\bf Facile} \endtitre% % \beginquestion $\displaystyle \sin\left(\pi \over 6\right)$ \endquestion \beginreponse $1 \over 2$ \endreponse {\bf Réponses} \reset[exercice] \useblocks[titre,reponse] \stoptext

Re: [NTG-context] hiding enumerations

2008-08-06 Thread Wolfgang Schuster
} \reset[exercice] \useblocks[titre,reponse] \stoptext Use \resetnumber[exercice] for the moment. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context

Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
] \typefile[name]{text} \underbar{text} \underbars{text text} # \unexpanded # \unprotect # \unprotected \useblocks[names][names] \usecommands{text} \usedirectory[names|reset] \useencoding[names] \useexternaldocument[name][file][text] \useexternalfigure[name][file][options] \useexternalfile[name][name][file

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread batela
{totalscore}}{Question}}} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks[question] \title{Scores} \placelist[Score][criterium=all] \title{Criteria} \useblocks[answer]} \starttext \startquestion In a body with mass=2 kg is applied a force of 2N

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread Patrick Gundlach
} \def\resetscore{\resetcounter{totalscore}} \def\savescore {\expanded{\dowritetolist{Score}{\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks[question] \title{Scores} \placelist[Score][criterium

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread Aditya Mahajan
here {\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks[question] \title{Scores} \placelist[Score][criterium=all] \title{Criteria} \useblocks[answer]} \starttext \startquestion In a body

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-03 Thread David Arnold
~points\endgraf} \def\resetscore{\resetcounter{totalscore}} \def\savescore {\expanded{\dowritetolist{Score} There should be no line break here {\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-02 Thread Aditya Mahajan
={\stopQuestion}] \def\score[#1]{\dotfill\emspace#1~points\endgraf} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks[question] \title{Scores} I do not know how to do this. You can use lists, or there may be easier ways \title{Criteria} \useblocks[answer

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-02 Thread batela
[question][before={\startQuestion},after={\stopQuestion}] \def\score[#1]{\dotfill\emspace#1~points\endgraf} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks[question] \title{Scores} I do not know how to do this. You can use lists, or there may

Re: [NTG-context] Prepare exams with ConTeXT

2007-06-02 Thread Aditya Mahajan
{Score} {\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks[question] \title{Scores} \placelist[Score][criterium=all] \title{Criteria} \useblocks[answer]} \starttext \startquestion

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
all requirements with their priorities in a table % I tried something like this but it didn't work \reset[Requirement] \setupblock[Requirement][before=\HL\VL,after=] \setupblock[Priority][before=\VL,after=\VL\MR \starttable[|l|c|] \useblocks[Requirement,Priority] \stoptable \stoptext Is it possible

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Wolfgang Schuster
,after=] \setupblock[Priority][before=\VL,after=\VL\MR \starttable[|l|c|] \useblocks[Requirement,Priority] \stoptable \stoptext Is it possible to use text blocks within tables or does an other way exists to do the same thing? It doesn’t have to be a table necessarily. I need some sort

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Bernhard Michael
,after=] \setupblock[Priority][before=\VL,after=\VL\MR \starttable[|l|c|] \useblocks[Requirement,Priority] \stoptable \stoptext Is it possible to use text blocks within tables or does an other way exists to do the same thing? It doesn’t have to be a table necessarily. I need some sort

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Wolfgang Schuster
. I tried the code at live.contextgarden.net. Tanks for your help! Michael Hi Michael, another way to place the summary at the end of your document. \starttabulate[|p(8cm)|p(1cm)|] \NC\useblocks[Requirement] \NC\useblocks[Priority] \NC\NR \stoptabulate I saw also the problem

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Bernhard Michael
at the end of your document. \starttabulate[|p(8cm)|p(1cm)|] \NC\useblocks[Requirement] \NC\useblocks[Priority] \NC\NR \stoptabulate I saw also the problem with the reset of the enumeration in my file but I don't know where the problem is. Wolfgang Wolfgang Schuster wrote: On Fri

Re: [NTG-context] textblocks in tables

2007-03-16 Thread Wolfgang Schuster
the \Requirement counter. \defineenumeration[Requirement] \defineblock[Requirement] \starttext \beginRequirement \Requirement A requirement \par \endRequirement \bgroup \setbox0\hbox {\Requirement text \par \resetRequirement} \egroup \useblocks[Requirement] \stoptext I think the problem has

Re: [NTG-context] List of Formulas

2006-05-09 Thread Hans Hagen
\endformula \startformula a = 2 \stopformula \beginformula \placeformula \startformula a = 3 \stopformula \endformula \page \resetnumber[formula] \useblocks[formula] \stoptext - Hans Hagen

  1   2   >