ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* More numbering trouble with blocks
@ 2010-01-24 20:37 Matthias Weber
  2010-01-25  0:30 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Weber @ 2010-01-24 20:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Dear all,

when pairing exercises with recalled solution blocks it seems that  
both are numbered consecutively
but independently.
When I don't give a solution to an exercise, the subsequent solution  
numbers are incorrect.
What is the proper way to deal with this? Manipulate the counter in  
the exercises without answers somehow?
Basic example attached.

Thanks,

Matthias


[-- Attachment #2: numbers.tex --]
[-- Type: application/octet-stream, Size: 749 bytes --]

\setupbodyfont		[10pt]

\defineenumeration
[exercise]
[before=\blank,
after=\blank,
way=bysection,
text=Exercise,
start=1,
location=hanging,
letter=rm]

\defineenumeration
[solution]
[text=Solution,
way=bysection,
location=hanging,
letter=rm]

\defineblock[exercise]
\defineblock[solution]
\hideblocks[solution]

\starttext

\section{Addition}


\startexercise
$1+1=?$
\stopexercise

\beginsolution[one]
\startsolution
$1+1=2$
\stopsolution
\endsolution

\startexercise
$1+2=?$
\stopexercise
\beginsolution[one]
\endsolution

\startexercise
$2+2=?$
\stopexercise

\beginsolution[one]
\startsolution
$2+2=4$
\stopsolution
\endsolution

\section{Solutions to Selected Exercises from Chapter One}

\reset[solution]
\useblocks[solution][one]

\stoptext

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



[-- Attachment #4: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: More numbering trouble with blocks
  2010-01-24 20:37 More numbering trouble with blocks Matthias Weber
@ 2010-01-25  0:30 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2010-01-25  0:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Matthias Weber

On 24-1-2010 21:37, Matthias Weber wrote:
> Dear all,
>
> when pairing exercises with recalled solution blocks it seems that both
> are numbered consecutively
> but independently.
> When I don't give a solution to an exercise, the subsequent solution
> numbers are incorrect.
> What is the proper way to deal with this? Manipulate the counter in the
> exercises without answers somehow?
> Basic example attached.

i have to think of a proper command (ame) to jump a cross link reference 
(a few liner in code so no big deal). Are there other issues you can 
think of?

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-25  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-24 20:37 More numbering trouble with blocks Matthias Weber
2010-01-25  0:30 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).