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

2019-02-01 Thread Sanjoy Mahajan
On 2019-02-01 09:48, Hans Hagen wrote: > given that context originally was made for typesetting educational > materials including questions, answers, explanations ... how about > looking at the 'blocks' mechanism (there are some examples in the test > suite under blocks) They are very helpful; t

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

2019-02-01 Thread Hans Hagen
On 2/1/2019 4:10 AM, Sanjoy Mahajan wrote: Thank you, Matthias and Wolfgang, for the examples/solutions. If I understand them right, there must be one solution for each exercise (otherwise the solution numbering gets out of sync). Or do the coupling= options in Matthias's example remove that re

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

2019-02-01 Thread Otared Kavian
Hi Sanjoy, Two or three years ago Wolfgang helped me to solve an analogous question. Here is an example which works fine, and moreover one can navigate from a question to its hint (if there is one…) and then from the hint to its solution (if present…). Best regards: OK begin interactive-

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

2019-01-31 Thread Mikael P. Sundqvist
Hi, this is what I learned from the list to use. I'm sorry, but the names sound a bit Swedish, but I'm sure you can change that. This way it was also easy to add different types like hints, answers and solutions and get clickable letters accordingly. /Mikael %Test file \setupinteraction[state=st

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

2019-01-31 Thread Alan Braslau
On Thu, 31 Jan 2019 22:10:40 -0500 Sanjoy Mahajan wrote: > Thank you, Matthias and Wolfgang, for the examples/solutions. Why not use the list mechanism? Alan ___ If your question is of interest to others as well, pl

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

2019-01-31 Thread Sanjoy Mahajan
Thank you, Matthias and Wolfgang, for the examples/solutions. If I understand them right, there must be one solution for each exercise (otherwise the solution numbering gets out of sync). Or do the coupling= options in Matthias's example remove that restriction? In my experiments with the exampl

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

2019-01-31 Thread Weber, Matthias
A while back I asked a similar question, and Hans pointed out the following which I still use: \defineenumeration [exercise] [way=bysection, text=Exercise, coupling=solution, location=hanging] \defineenumeration [solution] [text=Solution, way=bysection, coupling=exercise, locatio

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 [ans

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

2019-01-31 Thread Sanjoy Mahajan
Dear List, I'm trying to have problem solutions automatically collected, each with its corresponding problem number, e.g. 2.3, and then typeset at the end of a document. Thus, I imagine something like \startproblem{A problem title} % Problem 1.1 A question \startsolution An ans