On 24-1-2010 18:15, Matthias Weber wrote:
On Jan 24, 2010, at 11:57 AM, Hans Hagen wrote:
actually in mkii there is (using symbols pointing to the companion that can be clicked) but in mkiv i didn't yet add the code for that but i will do that (we used that long ago in interactive educational documents)
That would be extremely cool - I am working on two long textbooks for my students right now, and when working with them in class, navigating through something with more than 200 pages can be painful.
Is there any source/documentation I can look at?
in mkii it's provided by the coupling directive but as we only used it ourselves for some projects it was never document (i think) in mkiv it will be named couplings: \defineenumeration [exercise] [way=bysection, text=Exercise, coupling=solution, location=hanging] \defineenumeration [solution] [text=Solution, way=bysection, coupling=exercise, location=hanging] \defineblock[exercise] \defineblock[solution] \hideblocks[solution] \setupinteraction [state=start] \starttext \section{Main Text} \subsection[subsec:1]{problem section 1} \startexercise[ex:1] Addition\index{addition} problem: $1+1=?$ (\in{solution}[sol:1]) \stopexercise \beginsolution[one] \startsolution[sol:1] Answer: 2. (\in{problem}[ex:1]) \stopsolution \endsolution \subsection[subsec:2]{problem section 2} \startexercise[ex:2] Multiplication problem: $1\times1=?$ (\in{solution}[sol:2]) \stopexercise \beginsolution[two] \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 keep in mind that this only works well (at least currently) for synchronized enumerations; also, the rendering uses symbols; more variants can be provided later (no time for that now) and the mechanism has to be more pluggable i will update a beta that provides this 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 -----------------------------------------------------------------