Re: [NTG-context] More questions about hiding/reusing blocks
On 22-1-2010 16:19, Matthias Weber wrote: Dear all, I have two more questions about reusing blocks and interreferencing them. First of all, I have set up problems within different chapters, and would like to have a separate chapter at the end that gathers the solutions chapter by chapter like \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 I know is how to retrieve all blocks at once. Would I need to create another block at the end of each chapter, and retrieve these at the end? If so, how? Then, I'd like to have little inconspicuous hyperlinks from the exercise to its solution and back. So far, I can only do this manually, as indicated. I would prefer to have the text Exercise in the enumeration to become a hyperlink to the corresponding solution, and vice versa for the text Solution. Is there a way of doing this (or something similar)? 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) 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 - ___ 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-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] More questions about hiding/reusing blocks
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 - ___ 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-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] More questions about hiding/reusing blocks
Dear all, I have two more questions about reusing blocks and interreferencing them. First of all, I have set up problems within different chapters, and would like to have a separate chapter at the end that gathers the solutions chapter by chapter like \chapter{Solutions} \section{Solutions from chapter 1} get these here \section{Solutions from chapter 2} get those here A sample file is attached below that has the layout, but all I know is how to retrieve all blocks at once. Would I need to create another block at the end of each chapter, and retrieve these at the end? If so, how? Then, I'd like to have little inconspicuous hyperlinks from the exercise to its solution and back. So far, I can only do this manually, as indicated. I would prefer to have the text Exercise in the enumeration to become a hyperlink to the corresponding solution, and vice versa for the text Solution. Is there a way of doing this (or something similar)? Thanks a lot for all the help! Matthias test.tex Description: Binary data ___ 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-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___