From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55791 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: More questions about hiding/reusing blocks Date: Mon, 25 Jan 2010 01:15:26 +0100 Message-ID: <4B5CE29E.70002@wxs.nl> References: <14AAC5F8-22CF-43BC-ABAE-6D91B734A8D5@uva.nl> <01B55BA4-FE4A-4AA6-83F6-695CB56A4190@gmail.com> <2B222B03-0FDD-41C0-BF46-265F683B7C8B@uva.nl> <4B4E09FA.4000307@wxs.nl> <901906F1-CFC7-4A9A-8909-8CEAC0E7006C@uva.nl> <1656F9A9-52F7-4FC5-AE57-3309F752A93F@uva.nl> <4B4E2F70.5020103@wxs.nl> <07860E21-DC5A-4678-A821-FC807420627C@indiana.edu> <6CF9657D-3F72-4BCA-A4F5-E83938344C51@indiana.edu> <4B4F9C8B.3050307@wxs.nl> <4B456726-CCF3-4889-A237-1C7B6E3E5AE3@indiana.edu> <53590C9A-D906-41E9-9481-A24D5C745C40@indiana.edu> <4B54233F.90307@wxs.nl> <1F076ACF-B2D2-4EB9-B371-293265296E38@indiana.edu> <4B5C7BE0.5030605@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1264378595 2425 80.91.229.12 (25 Jan 2010 00:16:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Jan 2010 00:16:35 +0000 (UTC) To: Matthias Weber , mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 25 01:16:28 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NZCd1-0006vO-Uw for gctc-ntg-context-518@m.gmane.org; Mon, 25 Jan 2010 01:16:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 756DAC9C80; Mon, 25 Jan 2010 01:16:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0ZDiJ20XibvO; Mon, 25 Jan 2010 01:16:28 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7849AC9C38; Mon, 25 Jan 2010 01:16:25 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C10F0C9C40 for ; Mon, 25 Jan 2010 01:16:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 34kRF6M16SFH for ; Mon, 25 Jan 2010 01:16:03 +0100 (CET) Original-Received: from mail.solcon.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id C4721C9C2B for ; Mon, 25 Jan 2010 01:15:56 +0100 (CET) X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.101; Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by controller-9 (SurgeMail 4.2d2) with ESMTP id 2811-1713362 for multiple; Mon, 25 Jan 2010 01:15:02 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1 Thunderbird/3.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55791 Archived-At: 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 ___________________________________________________________________________________