defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\defineenumeration
[question]
[text=Question,
after={\blank[2*big]},
inbetween={\blank[nowhite]},
way=bychapter,
prefixsegments=chapter,
prefix=yes]
\defineenumeration
[answer]
> Am 04.02.2021 um 17:50 schrieb Hans Hagen :
>
> \defineblock
> [ChangePR]
>
> \defineblock
> [ChangeRP]
> % \hideblocks[ChangePR]
> \keepblocks[ChangePR]
> % \keepblocks[ChangePR,ChangeRP]
Ah, blocks.
Thanks Hans, this works great.
I’ve updated the pa
[ChangeRP]
[before={\startsidebar[rulecolor=green]},
after={\blank[overlay]\stopsidebar}]
% \hideblocks[ChangePR]
\keepblocks[ChangePR]
% \keepblocks[ChangePR,ChangeRP]
\enablemode[wipe]
\doifelsemode {wipe} {
\definebuffer[ChangePP]
} {
\definestartstop
[ChangePP
: \hideblocks[NLblok]%\hideblocks[ENblok] For the titles I use another method: %\def\NL#1{#1}\def\NL#1{{}}%\def\EN#1{}\def\EN#1{#1} You have to comment and uncomment, depending on the language, but I think you can put them in the NLblok or ENbloks instead. \definecomplexenumeration[Casus]… definition
={\mainlanguage[nl]},after=]
\setupblock[ENblok][before={\mainlanguage[en]},after=]
Then, determine which blocks you want to use in your file:
\hideblocks[NLblok]
%\hideblocks[ENblok]
For the titles I use another method:
%\def\NL#1{#1}
\def\NL#1{{}}
%\def\EN#1{}
\def\EN#1{#1}
You have to
Hi,
I cannot make \beginBLOCKS and \endBLOCKS work in a \dorecurse loop. Is
it possible?
Here is a minimum non working exemple (from
https://wiki.contextgarden.net/Command/defineblock):
%%
\startdocument
\defineblock[question]
\hideblocks[question] % We don't want to print blocks whe
ce the problem on a Windows system.
Can somebody on an OS X system check and confirm the issue?
Thanks,
Jan Willem Flamma
\defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\defineenumeration[question]
\defineenumeration[answer]
\starttext
\input knuth
stion,way=bychapter]
\defineenumeration[answer] [location=margin,text=Answer]
\defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\starttext
\startchapter[title=Chapter for regular questions]
\beginquestion
\startquestion
Normal question
\stopquestion
\endque
you happen to where I've gone wrong. I've also tried steppers without
much luck (and, admittedly, without really understanding their use).
=== testluabeginblock.tex ===
\defineblock[answer]
\hideblocks[answer]
\def\onearg#1{{\bf #1}}
\def\noarg{{\it fixed argument
I've also tried steppers without
much luck (and, admittedly, without really understanding their use).
=== testluabeginblock.tex ===
\defineblock[answer]
\hideblocks[answer]
\def\onearg#1{{\bf #1}}
\def\noarg{{\it fixed argument}}
\starttext
\startluacode
cont
apter,
coupling=question]
% Each question is followed immediately by its answer.
% The answers are put in a block which will be used later
\defineblock[hint]
\hideblocks[hint]
\defineblock[answer]
\hideblocks[answer]
% We define a command used after a
% Question for which no Answer is provided
%
width=fit,
numbercommand=\problemtextmakro,
number=yes,
alternative=serried,
hang=margin,
indentnext=auto,
indenting={yes,small},
prefix=yes,
prefixsegments=chapter,
way=bychapter,
]
\defineblock[losn]
\hideblocks[losn]
\define[1]\losntextmakro
{\doifreferencefoundelse{problem:\currentconstructio
,
location=hanging]
\defineblock[exercise]
\defineblock[solution]
\hideblocks[solution]
\setupinteraction
[state=start]
\starttext
\section{Main Text}
\subsection[subsec:1]{problem section 1}
\startexercise
Addition\index{addition} problem: $1+1=?$
\stopexercise
\beginsolution[one]
\startsolution
Jan Willem Flamma schrieb am 27.09.18 um 17:18:
Dear list members,
How can I prevent that a question block breaks across a page?
Kind regards,
Jan Willem Flamma
MWE
\defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\defineenumeration
[question
Dear list members,
How can I prevent that a question block breaks across a page?
Kind regards,
Jan Willem Flamma
MWE
\defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\defineenumeration
[question]
[text={Question},
after={\blank[2*big
hen mode BL is not
>> enabled.
>>
>> When mode BL is enabled (using the toggle), the third column should of
>> course appear again.
>>
>> How can I achieve this?
>>
>> Regards,
>> Jan Willem
>>
>>
>> MWE:
>>
&
can I achieve this?
Regards,
Jan Willem
MWE:
\starttext
%Toggles
%\enablemode[BL]
\defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\defineenumeration
[question]
[text=Question,
after={\blank[2*big]},
inbetween={\blank[nowhite
]
\defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\defineenumeration
[question]
[text=Question,
after={\blank[2*big]},
inbetween={\blank[nowhite]},
way=bychapter,
prefixsegments=chapter,
prefix=yes]
\defineenumeration
Hans Hagen <mailto:pra...@wxs.nl>
10. November 2016 um 17:27
search for 'blocks' ...
\defineblock
...
\hideblocks
\keepblocks
\useblocks
\processblocks
\selectblocks
This doesn’t solve the problem because he want a document which
contains *only* certain blocks and nothing else
only all the exercises (or just everything "in one mode")?
search for 'blocks' ...
\defineblock
...
\hideblocks
\keepblocks
\useblocks
\processblocks
\selectblocks
Hans
-
prefix=yes,
> prefixsegments=chapter,
> coupling=question]
>
> % Each question is followed immediately by its answer.
> % The answers are put in a block which will be used later
> \defineblock[answer]
> \hideblocks[answer]
>
> % We define a command used
lowed immediately by its answer.
% The answers are put in a block which will be used later
\defineblock[answer]
\hideblocks[answer]
% We define a command used after a
% Question for which no Answer is provided
% Since the block commands
% \beginanswer ... \endanswer
% cannot be used directly in a
mmand,
number=yes,
prefix=yes,
prefixsegments=chapter,
coupling=question]
% Each question is followed immediately by its answer.
% The answers are put in a block which will be used later
\defineblock[answer]
\hideblocks[answer]
% We define a command used after a
% Que
nswer]
\hideblocks[answer]
\def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
\def\myheadcommand#1{\goto{Question #1}[A:\currentconstructionreference]}
\defineenumeration[question][
text=,
title=yes,
titlestyle=,
titlecolor=black,
headcommand={\myheadcommand},
headstyle={\sc},
head
; \setupinteraction[state=start,color=,contrastcolor=,style=]
>
> \defineblock[answer]
> \hideblocks[answer]
>
> \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
>
>
> \defineenumeration[exercise][
> text=Question,
> title=yes,
> titlestyle
\usemodule[references-show]
\setupinteraction[state=start,color=,contrastcolor=,style=]
\defineblock[answer]
\hideblocks[answer]
\def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
\defineenumeration[exercise][
text=Question,
title=yes,
titlestyle=,
titlecolor=black,
headstyle={\sc},
\startquestion and
>>> \StartQuestion, \beginanswer and \BeginAnswer, and more importantly one
>>> cannot generate automatically the references (I tried \getnumber[question]
>>> and such to append to Q:\getnumber[question] for instance, but something
>>> does not work…)
est regards: OK
%%% begin interactive-question-answer.tex
\setupinteraction[state=start,color=,contrastcolor=,style=]
\defineblock[answer]
\hideblocks[answer]
\def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
\define[1]\AnswerToQuestion{Question \goto{(see Solution)}[A:Q:#1]}
\define[1
r[question]
> and such to append to Q:\getnumber[question] for instance, but something does
> not work…).
>
> Le me know if you find a satisfactory solution…
>
> Best regards: OK
> %%% begin interactive-question-answer.tex
> \setupinteraction[state=start,color=,contrast
\setupinteraction[state=start,color=,contrastcolor=,style=]
\defineblock[answer]
\hideblocks[answer]
\def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
\define[1]\AnswerToQuestion{Question \goto{(see Solution)}[A:Q:#1]}
\define[1]\StartQuestion{\startquestion[reference=Q:#1,title={\AnswerToQuestion
ble with that target.
>>
>> I hope I make myself clear. If it matters, in the solution one could
>> assume that the optional tag of the \startquestion \stopquestion is
>> given for all questions.
>>
>> Best regards, Mikael
>>
>> %% qa.tex
>> \setupin
t.
>
> I hope I make myself clear. If it matters, in the solution one could
> assume that the optional tag of the \startquestion \stopquestion is
> given for all questions.
>
> Best regards, Mikael
>
> %% qa.tex
> \setupinteraction[state=start,color=,contrastcolor=,st
ate=start,color=,contrastcolor=,style=]
\defineblock[answer]
\hideblocks[answer]
\def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
\defineenumeration[question][
text=Question,
headcolor=darkred,
width=fit,
number=yes,
prefix=yes,
prefixsegments=section,
]
\starttext
\section{A section
p://wiki.contextgarden.net/Command/processblocks), but I'm
> not sure that is my cure. I probably miss something easy...
>
> The problem is probably easiest shown by an example:
>
> %%%
> \defineblock[A]
> \hideblocks[A]
>
> \defineenumeration[A][
> te
;m
not sure that is my cure. I probably miss something easy...
The problem is probably easiest shown by an example:
%%%
\defineblock[A]
\hideblocks[A]
\defineenumeration[A][
text=A,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
]
\starttext
\chapter{First chapter}
\beginA
\startA
My fir
s probably easiest shown by an example:
%%%
\defineblock[A]
\hideblocks[A]
\defineenumeration[A][
text=A,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
]
\starttext
\chapter{First chapter}
\beginA
\startA
My first answer in the first chapter.
\stopA
\endA
\beginA
\startA
My second answer in
Hi, have you tried putting the \inmargin Inside before= in defineenumeration ?
Seems to work fine (assuming you want the marginal note on same line as
question.
Joseph
\defineblock[question]
\hideblocks[question]
\defineenumeration
[question]
[text=Question, before=\inmargin
ards,
> Jan Willem
>
>
> MWE:
> \defineblock[question]
> \hideblocks[question]
>
> \defineenumeration
>[question]
>[text=Question]
>
> \setupblock[question][before=\startquestion,after=\stopquestion]
>
>
> \starttext
>
> \inmargin{margi
On Wed, 22 Jun 2016 11:52:04 +0200
Jan Willem Flamma wrote:
> In the following MWE, the margin text appears at question 1 but not
> at question 2.
They both appear, but are overlaid (try with different texts).
> MWE:
> \defineblock[question]
> \hideblocks[question]
>
&g
Dear list members
In the following MWE, the margin text appears at question 1 but not at question
2.
How is this possible?
Kind regards,
Jan Willem
MWE:
\defineblock[question]
\hideblocks[question]
\defineenumeration
[question]
[text=Question]
\setupblock[question][before
Hans Hagen writes:
> On 2/5/2016 5:13 PM, Andrea De Michele wrote:
>> Hi all,
>> I want to expand a macro inside a block when the block is written and not
>> when it is used.
>> Here a simple example:
>>
>> \defineblock[myblock]
>> \hideblocks[myblo
On 2/5/2016 5:13 PM, Andrea De Michele wrote:
Hi all,
I want to expand a macro inside a block when the block is written and not when
it is used.
Here a simple example:
\defineblock[myblock]
\hideblocks[myblock]
\starttext
\define\mynumber{1}
Some text: mynumber is :\mynumber
\beginmyblock
Hi all,
I want to expand a macro inside a block when the block is written and not when
it is used.
Here a simple example:
\defineblock[myblock]
\hideblocks[myblock]
\starttext
\define\mynumber{1}
Some text: mynumber is :\mynumber
\beginmyblock
This is mynumber inside the first myblock, I
=,
right=)]
\setupitemgroup[Questions][n]
\setupitemgroup[Answers][style=bold,
width=1.5em,
packed,
alternative=hanging,
stopper=,
right=)]
\setupitemgroup[Answers][n]
\hideblocks[Exoblock]
\hideblocks[Solblock]
\starttext
Am 30.03.2014 um 19:28 schrieb Xan :
> This:
>
> \defineblock[question]
> \defineblock[answer]
>
> \defineenumeration[question][text={Question}]
> \defineenumeration[answer] [text={Answer}]
>
> \keepblocks[question]
> \hideblocks[answer]
>
>
This:
\defineblock[question]
\defineblock[answer]
\defineenumeration[question][text={Question}]
\defineenumeration[answer] [text={Answer}]
\keepblocks[question]
\hideblocks[answer]
\def\mynewcommand{\dosingleempty\doMyNewCommand}
\def\doMyNewCommand[#1]#2{%
\iffirstargument
tion][text={Question}]
\defineenumeration[answer] [text={Answer}]
\keepblocks[question]
\hideblocks[answer]
Something like
\startexercise My execise ...
\stopexercise
If no more is provide, at the question does \incrementcounter[answer]
If
\startexercise{\startsolution The solution is \stops
text=Solucions]
>
> \defineblock[resposta]
> \hideblocks[resposta]
>
> \starttext
>
> \startexercici Question 1
> \beginresposta
> \resposta Answer 1 \par
> \endresposta
> \stopexercici
>
> \startexercici Question 2
> \beginresposta
> \incrementc
x27;exercici
>>> \getnumber[exercici]},width=fit,alternative=serried,before={\decrementcounter[resposta]},number=no]
>>>
>>> \defineblock[resposta]
>>> \hideblocks[resposta]
>>>
>>>
>>> % Exercises
>>>
>>> \startex
ve=serried,before={\decrementcounter[resposta]},number=no]
> >
> > \defineblock[resposta]
> > \hideblocks[resposta]
> >
> >
> > % Exercises
> >
> > \startexercici Bla...
> > \beginresposta
> > \resposta (Solucions: \startitemize[a,t
adstyle=\ss,distance=0.25em,width=fit,before={\incrementcounter[resposta]}]
>
> % Answers
> \defineenumeration[resposta][headstyle=\ss,text={Solucions de l'exercici
> \getnumber[exercici]},width=fit,alternative=serried,before={\decrementcounter[resposta]},number=no]
>
]}]
% Answers
\defineenumeration[resposta][headstyle=\ss,text={Solucions de l'exercici
\getnumber[exercici]},width=fit,alternative=serried,before={\decrementcounter[resposta]},number=no]
\defineblock[resposta]
\hideblocks[resposta]
% Exercises
\startexercici Bla...
\beginresposta
\resposta (Solu
,headstyle=\ss,distance=0.25em,width=fit,before={\incrementcounter[answer]}]
\defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried,before={\decrementcounter[resposta]}]
\defineblock[resposta]
\hideblocks[resposta]
@Thomas: thank you very much for the link. Ev
ative=hanging,width=4.5cm,text={Answer to
question},stopper={.}]
\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]
\starttext
\section{Questions}
\beginquestion
\startquestion
Compute $4\times 5$.
\stopquestion
\endquestion
\beginhint
\starthint
Use the fact that $2\times 5
eration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}]
> \defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for
> question},stopper={.}]
> \defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to
> question},stopper={.}]
>
opper={.}]
\defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for
question},stopper={.}]
\defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to
question},stopper={.}]
\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]
\starttext
\section{Ques
={Hint for
question},stopper={.}]
\defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to
question},stopper={.}]
\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]
\starttext
\section{Questions}
\beginquestion
\startquestion
Compute $4\times 5$.
\stopquestion
e=\ss,distance=0.25em,width=fit]
\defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried]
\defineblock[resposta] % the answer
\hideblocks[resposta]
And in my text, I have:
\startexercici
\beginresposta
\resposta Exercici 2 (Solucions: \startitemize[a,text] \i
question},
> headstyle={\bi},
> stopper={.}]
>
> \setupblock[question][before={\startquestion},after={\stopquestion}]
> \setupblock[hint][before={\starthint},after={\stophint}]
> \setupblock[answer][before={\startanswer},after={\stopanswer}]
> \keepblocks[question]
stion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]
\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]
\startsetups examn:make
\resetnumber[answer]
\resetnumber[question]
\resetnumber[hint]
\page
\setco
}]
\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]
\starttext
\section{Questions}
\beginquestion
Compute $4\times 5$.
\endquestion
\beginhint
Use the fact that $2\times 5 = 10$.
\endhint
\beginanswer
$20$.
\endanswer
\beginquestion
What is the value of $100 / 10
=,
>afterhead=,
> before={\startcolumns[n=4]},
>after=\stopcolumns,
>width=0.5em,
>text={},
>headstyle={},
>stopper={.}]
>
> \setupblock[question][before={\startquestion},after={\stopquestion}]
> \setupblock[hint][before={\starthint},aft
,
text={},
headstyle={},
stopper={.}]
\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]
\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer
={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]
\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]
\starttext
\section{Questions}
\beginquestion
Compute $4\times 5
environment.
What the block environment does is to save the content from the begin to the
end block and hides it when you use \hideblocks[…]. To output the content of
the environments you can use \useblocks[…].
\defineblock[question]
\defineblock[hint]
\defineblock[answer]
\defineenumeration[qu
estion][location=hanging,text={Question},stopper={.}]
\defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}]
\defineenumeration[answer][location=hanging,text={Answer to
question},stopper={.}]
\hideblocks[hint]
\hideblocks[answer]
\starttext
\section{Questions}
\beginquest
em,
alternative=serried,
width=fit,
]
\defineblock[question]
\defineblock[answer]
\keepblocks[question]
\hideblocks[answer]
\setupblock[question][before=\startquestion,after=\stopquestion]
\setupblock[answer][before=\startanswer,after=\stopanswer]
\def\noanswer{\incrementnumber[answer]}
On 2013–01–07 Jaroslav Hajtmar wrote:
> Last example is not working! I have installed last version of
> \defineblock[question]
> \defineblock[answer]
>
> \hideblocks[answer]
>
>
> \defineenumeration[question]
> \defineenumeration[answer]
>
> \starttext
>
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
r 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
\c
block[question]
\defineblock[answer]
\defineenumeration[question][location=top,coupling=answer]
\defineenumeration[answer][location=top,coupling=question]
\hideblocks[question]
\hideblocks[answer]
\defineblock[exercise]
\defineblock[solution]
\defineenumeration[exercise][location=top,text=Exe
efineblock[solution]
\defineenumeration[exercise][location=top,text=Exercise]
\defineenumeration[solution][location=top,text=Solution]
\hideblocks[exercise]
\hideblocks[solution]
\starttext
\chapter{First Attempt}
% Begin: First Attempt
% With texexec and context both go well.
\beginexercise
\sta
[answers][location=top,coupling=questions]
\hideblocks[question]
\hideblocks[answer]
\starttext
% Problems with the coupling of questions and answers
\beginquestion
\startquestions
Why ConTeXt doesn't work?
\stopquestions
\endquestion
\useblocks[question]
\page
\beginanswer
\startanswers
It always
={ -Begin- },
after={ -End- }]
\hideblocks[someblock,otherblock]
\starttext
\beginsomeblock
SOMEBLOCK
\endsomeblock
\beginotherblock
OTHERBLOCK
\endotherblock
\section{No before or after}
\useblocks[someblock,otherblock]
\useblocks[otherblock,someblock]
\section{Separately they work}
\useblocks
t=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} pro
On 15-1-2010 16:26, Matthias Weber wrote:
Dear all,
after (finally) installing the minimals,
the zip with the figures TeXs as expected with MKII and MKIV.
Now, in MKIV I notice another issue. I use the \hideblocks mechanism to
hide and reuse answers and get an error message (Undefined control
Dear all,
after (finally) installing the minimals,
the zip with the figures TeXs as expected with MKII and MKIV.
Now, in MKIV I notice another issue. I use the \hideblocks mechanism
to hide and reuse answers and get an error message (Undefined control
sequence) in MKIV while everything is
x27;m
> wondering, are there mkiv users out there who use the block features?
I tested the new block code with MkIV and everything is fine
except two unnecessary files in my working directory, they are
\jobname-texutil0.tmp and texutil.tub.
Here is a example:
\defineblock[question]
\
gt; Here is a minimal example :
>
> **
> \starttext
>
> \defineenumeration[exercice][location=inleft]
> \defineblock[titre,question,reponse]
> \hideblocks[,reponse]
>
> \begintitre
> \exercice {\bf Facile}
> \endtitre%
> %
> \beginquestion
> $\displaystyle \sin\l
stion,reponse]
\hideblocks[,reponse]
\begintitre
\exercice {\bf Facile}
\endtitre%
%
\beginquestion
$\displaystyle \sin\left(\pi \over 6\right)$
\endquestion
\beginreponse
$1 \over 2$
\endreponse
{\bf Réponses}
\reset[exercice]
\useblocks[titre,reponse]
\sto
How come this doesn't work ?
\defineblock[prev]
\defineblock[full]
\hideblocks[full]
%\hideblocks[prev]
\def\previewMsg{This part is hidden}
\def\showPreviewMsg{\beginprev \hairline \previewMsg \hairline \endprev}
\starttext
\input tufte
\showPreviewMsg % it doesn't show
%
erences]
\gotobox{text}[references]
\graycolor[text]
\grid[options]
# \gsaveXMLasdata
\hairline
\head[references]
\headnumber[section]
\headtext{text}
# \hfilll
\hideblocks[names][names]
\high{text}
# \HL
\hl[number]
# \hpos
# \hspace
# \ifconditional
# \ifdefined
# \iftrialtypesetting
# \ifundefin
stionnumber#1{Question~#1}
>>> \def\score[#1]%
>>> {\incrementcounter{totalscore}{#1}%
>>>\dotfill\emspace#1~points\endgraf}
>>> \def\resetscore{\resetcounter{totalscore}}
>>> \def\savescore
>>> {\expanded{\dowritetolist{Score}
>
> There
here
{\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}}
\hideblocks[answer,question]
\def\generateexam
{\title{Exam}
\useblocks[question]
\title{Scores}
\placelist[Score][criterium=all]
\title{Criteria}
\useblocks[answer]}
\starttext
\startquestion
In a body
nts\endgraf}
\def\resetscore{\resetcounter{totalscore}}
\def\savescore
{\expanded{\dowritetolist{Score}{\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}}
\hideblocks[answer,question]
\def\generateexam
{\title{Exam}
\useblocks[question]
\title{Scores}
\plac
{totalscore}}{Question}}}
\hideblocks[answer,question]
\def\generateexam
{\title{Exam}
\useblocks[question]
\title{Scores}
\placelist[Score][criterium=all]
\title{Criteria}
\useblocks[answer]}
\starttext
\startquestion
In a body with mass=2 kg is applied a force of 2N
savescore
{\expanded{\dowritetolist{Score}
{\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}}
\hideblocks[answer,question]
\def\generateexam
{\title{Exam}
\useblocks[question]
\title{Scores}
\placelist[Score][criterium=all]
\title{Criteria}
\useblocks[answer]}
\s
inizioinceput
> debut
>end: eindvan stop
> ende konec
> fine sfarsit
>
Question]
\defineenumeration[Question]
\defineblock[answer,question]
\setupblock
[answer][before={\startAnswer},after={\stopAnswer}]
\setupblock
[question][before={\startQuestion},after={\stopQuestion}]
\def\score[#1]{\dotfill\emspace#1~points\endgraf}
\hideblocks[answer,question]
\def\ge
;>
>>>> I write a document where I have to describe requirements. I want to give
>>>> these requirements a running number over all chapters and I also need to
>>>> prioritise them.
>>>>
>>>> My idea is to describe the requirements in
; these requirements a running number over all chapters and I also need to
> >> prioritise them.
> >>
> >> My idea is to describe the requirements in several chapter. At the end I
> >> want to list all the requirements together with their priority.
> &g
tried the following code but unfortunately it didn't work:
>>
>> \defineenumeration[Requirement][location=left,text=Req,width=broad,after={\blank[small]}]
>> \defineblock[Requirement,Priority]
>> \setupblock[Requirement][after=]
>> \hideblocks[Priority]
>>
&
after={\blank[small]}]
> \defineblock[Requirement,Priority]
> \setupblock[Requirement][after=]
> \hideblocks[Priority]
>
> \starttext
>
> \chapter{Description of requirements}
>
> \beginRequirement
> \Requirement A requirement \par
> \endRequirement
> \beginPrio
g code but unfortunately it didn't work:
\defineenumeration[Requirement][location=left,text=Req,width=broad,after={\blank[small]}]
\defineblock[Requirement,Priority]
\setupblock[Requirement][after=]
\hideblocks[Priority]
\starttext
\chapter{Description of requirements}
\beginRequirement
David Arnold wrote:
> All,
>
> Can anyone explain what this is supposed to do?
>
> \keepblocks
It is the opposite of \hideblocks, so you can use it
to unhide hidden blocks, I assume.
Taco
___
ntg-context mailing list
ntg-cont
text=,
headcolor=heavygreen,
conversion=characters]
\setupenumerations
[subanswer]
[right=)]
\defineblock
[question,shortanswer,longanswer,subquestion,shortsubanswer,longsubanswe
r]
\hideblocks[shortanswer,longanswe
]
[location=inleft,
headcolor=heavygreen,
stopper=.,
way=bysection,
sectionnumber=no]
\defineenumeration
[subanswer]
[location=hanging,
headcolor=heavygreen,
conversion=characters]
\setupenumerations
[subanswer]
[stopper=.]
\defineblock[question,shortanswer,longanswer]
\hideblocks
[location=inleft,
headcolor=heavygreen,
% stopper={.\egroup},
way=bysection,
sectionnumber=no]
\defineenumeration[subanswer][location=hanging,text={\color
[heavygreen]\bgroup},conversion=characters]
\setupenumerations[subanswer][stopper={.\egroup}]
\defineblock[question,shortanswer,lon
}]
\defineblock[question,shortanswer,longanswer]
\hideblocks[shortanswer,longanswer]
Then we do something like:
\beginquestion
\starquestion
Yada, yada, yada.
\startsubquestion
one part
\stopsubquestion
\startsubquestion
part a
\stopsubquestion
\startsubquestion
part b
\stopsubquestion
\stopquestion
block[question,answer]
\hideblocks[answer]
\chapter{First Chapter}
\dorecurse{1}{\input tufte\par}
\section{First Section}
\dorecurse{2}{\input tufte\par}
\subsection{Exercises}
\startcolumns[n=2]
\beginquestion
\startquestion[ex:1]
What is the square root of $\pi$?
\stopquestion
\endque
1 - 100 of 122 matches
Mail list logo