]
\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]
[counter=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
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 where we
amma
\defineblock[question]
\defineblock[answer]
\hideblocks[question]
\hideblocks[answer]
\defineenumeration[question]
\defineenumeration[answer]
\starttext
\input knuth
\beginquestion
\startquestion
Question text
\startitemize[a]
\item Answer A
\item Answer B
\item Answer C
\stopitemiz
,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
\endquestion
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}}
\starttext
\sta
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
context.beginanswer()
,
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
% Since
,
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:\currentconstructionreference
,
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, a so
only all the exercises (or just everything "in one mode")?
search for 'blocks' ...
\defineblock
...
\hideblocks
\keepblocks
\useblocks
\processblocks
\selectblocks
Hans
-
Hans Hage
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 def
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 macro
,
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
% Question
]
\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},
headcolor
ences-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,
>
\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},
r 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=,contrastcolor=,style=]
>>>
>
factory solution…
Best 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
e=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:
\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
"Question 1.1"
>> clickable 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 re
lickable 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
> \setupinteraction[state=start,co
tart,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 with
ocks at the
> wiki (http://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]
>
> \defineenumeratio
t 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 first
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 the first
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
ible?
>
> Kind regards,
> Jan Willem
>
>
> MWE:
> \defineblock[question]
> \hideblocks[question]
>
> \defineenumeration
>[question]
>[text=Question]
>
> \setupblock[question][before=\startquestion,after=\stopquestion]
>
>
> \start
On Wed, 22 Jun 2016 11:52:04 +0200
Jan Willem Flamma <jwfregis...@icloud.com> 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]
>
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
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
Hans Hagen <pra...@wxs.nl> 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[mybl
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
}]
\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 \stopsolution} My exercise
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
Am 30.03.2014 um 19:28 schrieb Xan dxpubl...@telefonica.net:
This:
\defineblock[question]
\defineblock[answer]
\defineenumeration[question][text={Question}]
\defineenumeration[answer] [text={Answer}]
\keepblocks[question]
\hideblocks[answer]
\def\mynewcommand{\dosingleempty
]
\hideblocks[resposta]
% Exercises
\startexercici Bla...
\beginresposta
\resposta (Solucions: \startitemize[a,text] \item D, \item I, \item D,
\item No té relació, \item D, \item D, \item No té relació, \item No té
relació, \item D.\stopitemize) \par
\endresposta
\stopexercici
]},number=no]
\defineblock[resposta]
\hideblocks[resposta]
% Exercises
\startexercici Bla...
\beginresposta
\resposta (Solucions: \startitemize[a,text] \item D, \item I, \item D,
\item No té relació, \item D, \item D, \item No té relació, \item No té
relació, \item D.\stopitemize
]
\hideblocks[resposta]
\starttext
\startexercici Question 1
\beginresposta
\resposta Answer 1 \par
\endresposta
\stopexercici
\startexercici Question 2
\beginresposta
\incrementcounter[resposta]
\endresposta
\stopexercici
\startexercici Question 3
\beginresposta
\resposta Answer
]}]
% 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 (Solucions
,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]
\defineblock[resposta]
\hideblocks[resposta
=\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. Eventually I
,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] \item D
={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
={.}]
\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{Questions
]
\hideblocks[hint]
\hideblocks[answer]
\starttext
\section{Questions}
\beginquestion
\startquestion
Compute $4\times 5$.
\stopquestion
\endquestion
\beginhint
\starthint
Use the fact that $2\times 5 = 10$.
\stophint
\endhint
%\beginanswer
%\startanswer
% $20$.
%\stopanswer
[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
\endquestion
\beginhint
\starthint
Use the fact that $2
={\stopquestion}]
\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
}]
\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
\setcounter
,
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
={},
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]
\starttext
={\stopanswer}]
\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
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[question][alternative=hanging,text={Question
={\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
=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}
\beginquestion
\question
,
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]}
\starttext
\beginquestion
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
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
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
\chapter{Questions} % Show only the question
[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=Exercise
[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 give
[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
\startexercise
={ -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
,
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
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
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]
\defineblock[answer]
\hideblocks[answer]
\starttext
\beginquestion
Question 1
,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]
\stoptext
\defineenumeration[exercice][location=inleft]
\defineblock[titre,question,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
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
%\beginprev
[references]
\headnumber[section]
\headtext{text}
# \hfilll
\hideblocks[names][names]
\high{text}
# \HL
\hl[number]
# \hpos
# \hspace
# \ifconditional
# \ifdefined
# \iftrialtypesetting
# \ifundefined
\in{text}{text}[reference]
# \includeFLOWchart
# \includemenu
# \increment
\indentation
\indenting
{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
}
\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}
\placelist[Score][criterium
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
~points\endgraf}
\def\resetscore{\resetcounter{totalscore}}
\def\savescore
{\expanded{\dowritetolist{Score}
There should be no line break here
{\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}}
\hideblocks[answer,question]
\def\generateexam
{\title{Exam}
\useblocks
={\stopQuestion}]
\def\score[#1]{\dotfill\emspace#1~points\endgraf}
\hideblocks[answer,question]
\def\generateexam
{\title{Exam}
\useblocks[question]
\title{Scores}
I do not know how to do this. You can use lists, or there may be easier
ways
\title{Criteria}
\useblocks[answer
[question][before={\startQuestion},after={\stopQuestion}]
\def\score[#1]{\dotfill\emspace#1~points\endgraf}
\hideblocks[answer,question]
\def\generateexam
{\title{Exam}
\useblocks[question]
\title{Scores}
I do not know how to do this. You can use lists, or there may
{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]}
\starttext
\startquestion
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
\Requirement
to list all the requirements together with their priority.
I 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
want to list all the requirements together with their priority.
I 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
,text=Req,width=broad,after={\blank[small]}]
\defineblock[Requirement,Priority]
\setupblock[Requirement][after=]
\hideblocks[Priority]
\starttext
\chapter{Description of requirements}
\beginRequirement
\Requirement A requirement \par
\endRequirement
\beginPriority
the requirements together with their priority.
I 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
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-context@ntg.nl
http://www.ntg.nl
=heavygreen,
conversion=characters]
\setupenumerations
[subanswer]
[right=)]
\defineblock
[question,shortanswer,longanswer,subquestion,shortsubanswer,longsubanswe
r]
\hideblocks[shortanswer,longanswer,shortsubanswer,longsubanswer
]
[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
}]
\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
[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
\endquestion
,longanswer]
\hideblocks[shortanswer,longanswer]
I put a \placeanswers at the end of each section, but the numbering
is contiguous across sections. For example, section 1 might end with
exercise #15, then section 2 begins with exercise #16. How can I
reset the numbers to start with #1 in section 2
1 - 100 of 117 matches
Mail list logo