Hello Wolfgang,
Last example is not working! I have installed last version of standalone
version...
Jaroslav Hajtmar
Here is this example ...
\defineblock[question]
\defineblock[answer]
\hideblocks[answer]
\defineenumeration[question]
\defineenumeration[answer]
\starttext
\chapter{Questions} % Show only the question blocks
\beginquestion
\startquestion
First question.
\stopquestion
\endquestion
\beginanswer
\startasnwer
Answer to the first question.
\stopanswer
\endanswer
\chapter{Answers} % Show the question with the corresponding answer
\useblocks[question,answer]
\stoptext
Dne 7.1.2013 22:57, Wolfgang Schuster napsal(a):
Am 07.01.2013 um 22:49 schrieb Marco Patzer <home...@lavabit.com>:
On 2013–01–07 Hans Hagen wrote:
buffers (or blocks)
Buffers apparently can't be used before the content is defined, but
it works for blocks (I never used them). Test:
\defineblock [bar]
\starttext
buf: \getbuffer[foo]
BBBBBBBBBBB
\startbuffer[foo]
buf: AAAAAAAAAAA
\stopbuffer
\useblocks [bar]
DDDDDDDDDDD
\beginbar
block: CCCCCCCCCCC
\endbar
\stoptext
Is there a reason why the blocks favour begin/end instead of
start/stop? Looks weird somehow.
Blocks use begin/end to allow the same name for the environment as other
commands, e.g. for exams:
\defineblock[question]
\defineblock[answer]
\hideblocks[answer]
\defineenumeration[question]
\defineenumeration[answer]
\starttext
\chapter{Questions} % Show only the question blocks
\beginquestion
\startquestion
First question.
\stopquestion
\endquestion
\beginanswer
\startasnwer
Answer to the first question.
\stopanswer
\endanswer
\chapter{Answers} % Show the question with the corresponding answer
\useblocks[question,answer]
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________