question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]
\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]
\defineenumeration[hint]
[alternative
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
something like the following which was given to me by Hans a long
time ago: unfortunately for some reason this does not work anymore with
ConTeXt mkiv, but it is quite fine with mkii:
(Untested): Change location=hanging to alternative=hanging.
%%% begin question-hint-answer.tex
\defineblock
thing like the following which was given to me by Hans a long time
ago: unfortunately for some reason this does not work anymore with ConTeXt
mkiv, but it is quite fine with mkii:
%%% begin question-hint-answer.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]
\defineenumeration[qu
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]}
, and
some problems are showing up now.
So here it goes ...
What I want to accomplish:
The user writes the address, and he should not have to use \crlf or have
to use several distinct commands.
Why does the following not work?
\defineblock[Address]
\setupblock[Address][
before=\starttyping
.
So here it goes ...
What I want to accomplish:
The user writes the address, and he should not have to use \crlf or have
to use several distinct commands.
Why does the following not work?
\defineblock[Address]
\setupblock[Address][
before=\starttyping,
after=\stoptyping
]
you pick the
accomplish:
The user writes the address, and he should not have to use \crlf or have
to use several distinct commands.
Why does the following not work?
\defineblock[Address]
\setupblock[Address][
before=\starttyping,
after=\stoptyping
]
\starttext
\beginAddress
Peter Pan
Somewhere over the
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
On 1/7/2013 10:49 PM, Marco Patzer wrote:
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]
BBB
\startbuffe
Am 07.01.2013 um 22:49 schrieb Marco Patzer :
> 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]
>
&g
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]
BBB
\startbuffer[foo]
buf: AAA
\stopbuffer
\u
Hello Members,
some piece of code, with the problems.
I hope somebody can use it to improve ConTeXt,
Compilation with texexec is no problem,
Kind Regards,
Rene'
% Begin code:
\setupcolors[state=start]
\setupinteraction[state=start,color=orange]
\setupreferencing[state=start]
\define
that somebody can give
me some advice.
With the hidden blocks there is no problem.
But with the item(s) there is a problem,
Kind Regards,
Rene' van Hassel
% Code:
\setupcolors[state=start]
\setupinteraction[state=start,color=orange]
\setupreferencing[state=start]
\defineblock[exercise]
\d
Hello members,
a happy new year to everybody.
And here the problem I have:
\setupinteraction[start=state,color=orange]
\setupcombinedlist[content][interaction=all]
\defineblock[question]
\defineblock[answer]
\defineenumeration[questions][location=top,coupling=answers]
\defineenumeration
kii.
Glen
---
\defineblock[Block]
\defineenumeration[Enum][location=left,text=Test]
\setupblock[Block][before=\startEnum,after=\stopEnum]
\keepblocks[Block]
\starttext
\section{Use}
\useblocks[Block]
\reset[Enum]
\section{Define}
\beginBlock
jhdsa hdsfhj lh dsfjh jkhasdf
sdakjhfsal sdka
\startEnum
> Some text A
> \stopEnum
> \endBlock
>
> But it doesn't seem to work if I try to define a command (macro?) to keep my
> source file a bit tidier.
You can’t use blocks within other commands but when you use only enumerations
in your block you c
n trying this on TeX Live 2010.
thanks
Glen
-
\defineblock[Block]
\defineenumeration[Enum][location=left,text=Test]
\define[1]\Revs{
\beginBlock
\startEnum
#1
\stopEnum
\endBlock
}
\starttext
\section{Use}
\useblocks[Block]
Dear all,
When selecting multiple blocks: \useblocks[someblock,otherblock],
the blocks are selected but the before and after statements are not
processed.
Is the expected behaviour?
Tia, Bernard
Example:
\defineblock[someblock]
\defineblock[otherblock]
\setupblock[someblock]
[before
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
sequence) in MKIV while everything is fine
in MKII. I am attaching a sample file.
there are two issues:
\defineblock[exercise,solution]
i want to get away from the multiple definitions (for the moment i
enabled it again in the upcoming beta) but the following should work in
your case
y separate
the text from any tex commands (except for a single type of begin/end
sequence). Conceptually :-
manual-env.tex:
\defineblock[EN,de,it]
\setupblock[EN][file=EN]
\setupblock[DE][file=DE]
\setupblock[IT][file=IT]
\doifmode[EN]{\def\lang{EN}}
\doifmode[DE]{\def\lang{DE}}
\doifmode[IT]{\d
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]
\
pter, but the solutions should appear in the end of
> the book.
>
> Did anybody has a similar implementation?
\defineblock etc can do this (actually this is why the block mechanism
is there)
Hans
-
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
Hello again
I wish to use the structure of block to hide somme of them.
Unfortunately reseting them doesn't seem to work.
Here is a minimal example :
**
\starttext
\defineenumeration[exercice][location=inleft]
\defineblock[titre,que
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
%
ragraphs, so that the different audiences see, who can
> read what?
\defineblock cum suis ...
quite old stuff btw (reminds me to provide a mkiv variant)
-
Hans Hagen | PRAGMA ADE
syntax]
\decouplemarking[name]
# \decrement
\define[number]\command{text}
\defineblank[name][settings]
\defineblock[name]
\definebodyfont[font size][type][files]
\definebodyfontenvironment[font size][dimensions]
\definebuffer[name]
# \definecollector
\definecolor[name]{colour values}
\definecolorgrou
fine sfarsit
>>> fin
>>> \stopelements
>>> \defineenumeration[Answer][text=Question]
>>> \defineenumeration[Question]
>>> \defineblock[answer,question]
>>> \setupblock
>>> [answer][before
fine sfarsit
fin
\stopelements
\defineenumeration[Answer][text=Question]
\defineenumeration[Question]
\defineblock[answer,question]
\setupblock
[answer][before={\startAnswer\resetscore},after={\savescore\stopAnswer}]
\setupblock
on[Question]
\defineblock[answer,question]
\setupblock[answer][before={\startAnswer\resetscore},after={\savescore\stopAnswer}]
\setupblock[question][before={\startQuestion},after={\stopQuestion}]
\makecounter{totalscore}
\definelist[Score]
[ pagenumber=no,
sfarsit
fin
\stopelements
\defineenumeration[Answer][text=Question]
\defineenumeration[Question]
\defineblock[answer,question]
\setupblock
[answer][before={\startAnswer\resetscore},after={\savescore\stopAnswer}
]
\setupblock
[question][before
ende konec
fine sfarsit
fin
\stopelements
\defineenumeration[Answer][text=Question]
\defineenumeration[Question]
\defineblock[answer,question]
\setupblock
[answer][before={\startA
inizio inceput
> debut
>end: eindvan stop
> ende konec
> fine sfarsit
>
inceput
debut
end: eindvan stop
ende konec
fine sfarsit
fin
\stopelements
\defineenumeration[Answer][text=
Wolfgang Werners-Lucchini wrote:
> Hi Bernd!
>
>
>>> what I am doing wrong with the following snipped?
>>>
>>> The \par in the \item does not work.
>>> ---
>>> \defineenumeration[question
Hi Bernd!
> > what I am doing wrong with the following snipped?
> >
> > The \par in the \item does not work.
> > ---
> > \defineenumeration[question][location=top,text=Aufgabe]
> > \defineblock[question]
>
Wolfgang Werners-Lucchini schrieb:
> Hallo,
>
> what I am doing wrong with the following snipped?
>
> The \par in the \item does not work.
> ---
> \defineenumeration[question][location=top,text=Aufgabe]
> \defineblock[
2007/4/4, Wolfgang Werners-Lucchini <[EMAIL PROTECTED]>:
Hallo,
what I am doing wrong with the following snipped?
The \par in the \item does not work.
---
\defineenumeration[question][location=top,text=Aufgabe]
\defineblock[qu
Hallo,
what I am doing wrong with the following snipped?
The \par in the \item does not work.
---
\defineenumeration[question][location=top,text=Aufgabe]
\defineblock[question]
\starttext
\chapter{Aufgaben}
\beginquestion
\question
\or
\global\chardef\myblockcount\zeropoint
\vbox\bgroup
\hsize1cm
##3\dontleavehmode\vfill
\egroup
\egroup
\fi}
\readfile{\jobname.tub}\donothing\donothing
\egroup}
\protect
\defineenumeration[Requirement]
\defineblock[Requ
r quick answer.
>
> Michael
Hi Michael,
I found a very ugly solution to reset the \Requirement counter.
\defineenumeration[Requirement]
\defineblock[Requirement]
\starttext
\beginRequirement
\Requirement A requirement \par
\endRequirement
\bgroup
\setbox0\hbox
{\Requirement text \pa
;>
>>>> 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
ve
>> 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.
>>
>> I
t; My idea is to describe the requirements in several chapter. At the end I 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,
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
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
nted,
> number=no,
> inbetween=\blank,
> before={\startboxcode\startframedtext[width=\boxwidth,
> background=color,backgroundcolor=icicle,frame=no]},
> after={\stopframedtext\stopboxcode}]
>
> \defineblock[insummary]
> \def\placesectionsummary{\unnumberedsubsection{
ation=serried,
width=broad,
text=\tipprefix,
style=slanted,
number=no,
inbetween=\blank,
before={\startboxcode\startframedtext[width=\boxwidth,
background=color,backgroundcolor=icicle,frame=no]},
after={\stopframedtext\stopboxcode}]
\defineblock[insummary]
\def\placesectionsummary{\unnumberedsubse
}]
\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
nico wrote:
> Hello,
>
> Is it possible to display a list of the numbered formulas (done with
> \placeformula)? I tried \placelist[formula] without success.
>
you want to see the formulas too?
\defineblock[formula]
\starttext
\beginformula
\placeformula
\startformula
a =
ation=inleft,
text={\color[blue]\bgroup},
stopper={.\egroup},
way=bysection,
sectionnumber=no]
\defineenumeration[answer]
\setupenumerations
[answer]
[location=inleft,
text={\color[blue]\bgroup},
stopper={.\egroup},
way=bysection,
sectionnumber=no]
\define
={\color[blue]\bgroup},
stopper={.\egroup},
way=bysection,
sectionnumber=no]
\defineblock[question,answer]
\hideblocks[answer]
\chapter{First Chapter}
\dorecurse{1}{\input tufte\par}
\section{First Section}
\dorecurse{2}{\input tufte\par}
\section{Exercises}
\startcolumns[n=2
avygreen]\bgroup},conversion=characters]
> \setupenumerations[subanswer][stopper={.\egroup}]
>
> \defineblock[question,shortanswer,longanswer]
> \hideblocks[shortanswer,longanswer]
>
> I put a \placeanswers at the end of each section, but the numbering
> is contiguous across sections. For e
group},
stopper={.\egroup}]
\defineenumeration[answer]
\setupenumerations
[answer]
[location=inleft,
text={\color[blue]\bgroup},
stopper={.\egroup}]
\defineblock[question,answer]
\hideblocks[answer]
\chapter{First Chapter}
\dorecurse{1}{\input tufte\par}
\section{First Se
[heavygreen]
\bgroup}]
\setupenumerations[answer][stopper={.\egroup}]
\defineenumeration[subanswer][location=hanging,text={\color
[heavygreen]\bgroup},conversion=characters]
\setupenumerations[subanswer][stopper={.\egroup}]
\defineblock[question,shortanswer,longanswer]
\hideblocks[shortanswer
]
\bgroup}]
\setupenumerations[answer][stopper={.\egroup}]
\defineenumeration[subanswer][location=hanging,text={\color
[heavygreen]\bgroup},conversion=characters]
\setupenumerations[subanswer][stopper={.\egroup}]
\defineblock[question,shortanswer,longanswer]
\hideblocks[shortanswer,longanswer]
I
\selectblocks
{\dotripleempty\doselectblocks}
\protect
\starttext
\defineenumeration[question][location=serried,text=Question]
\defineenumeration[answer][location=serried,text=Answer]
\defineblock[question,answer]
\hideblocks[answer]
\chapter{First Chapter}
\input tufte
\beginquestion
ant a criterium
%output=pdf
\defineenumeration[question][location=serried,text=Question]
\defineenumeration[answer][location=serried,text=Answer]
\defineblock[question,answer]
\hideblocks[answer]
\starttext
\chapter{First Chapter}
\input tufte
\beginquestion
\startquestion
What is the square
stion]
\defineenumeration[answer][location=serried,text=Answer]
\defineblock[question,answer]
\hideblocks[answer]
\starttext
\chapter{First Chapter}
\input tufte
\beginquestion
\startquestion
What is the square root of 4?
\stopquestion
\endquestion
\beginanswer
\startanswer
2
\stopanswer
\enda
All,
I can't get \reset to work as in the manual. Is it deprecated?
Replaced with something?
%output=pdf
\defineenumeration[question][location=serried,text=Question]
\defineenumeration[answer][location=serried,text=Answer]
\defineblock[question,answer]
\hideblocks[answer]
\star
this
future event.
something to play with
\starttext
\defineblock[question]
\defineblock[answer]
\hideblocks[answer]
\defineenumeration[question]
\defineenumeration[answer][coupling=question]
\chapter{One}
\input tufte
\beginquestion
\startquestion
Whatever needs to be exercised.
\stopque
Hi David,
the answer must be found in \defineenumeration[question][..] and
\defineenumeration[answer][...] further you can use the defineblock[...]
mechanism. Please refer to the cont-enp.pdf pages 262 ff.
Kind regards
Willi
David Arnold wrote:
All,
I'd like to design an exe
Hello David,
I think this solution is from one of the ConTeXt pdfs. Or from the
mailinglist. Or
--
\defineblock[question]
\defineblock[answer]
\defineenumeration[question][location=top,text=Frage]
\defineenumeration[answer][location=top,text
Hi everybody,
The solution below works. Thanks a lot!
Using Mojca's solution plus a newline after the command apparently does
the trick.
After that, I didn't try the other solution, which resembles Olivier's.
Kind regards,
Robert
\defineblock[Nederlandsblok]
\defineb
er, if you want to have more complex stuff in it, you probably have
to use a more complex definition (send an exaple that fails).
Mojca
\defineblock[Nederlandsblok, Engelsblok]
\starttext
\startitemize
\item\beginNederlandsblok Ik vraag me af of ze ook appels
Hi,
If I make sure there is enough space, i.e. more than one space, between
the \begin... and the text, it works! However in the pdf the item drops
a line down, like this:
*
Ik vraag me af ...
Does anyone have a workaround?
Kind regards,
Robert
\defineblock[Nederlandsblok
]
\setuppapersize [A4][A4]
\defineblock[Nederlandsblok, Engelsblok]
\hideblocks[Nederlandsblok]
\starttext
\startitemize
\beginNederlandsblok
\item Ik vraag me af of ze ook appels verkopen %NED
\endNederlandsblok
\beginEngelsblok
\item I really wonder if they do sell apples %ENG
\endEngelsblok
]
\defineblock[question, answer]
\hideblocks[answer]
\setupblock[question][before=\startquestion,after=\stopquestion]
\setupblock[answer][before=\startanswer,after=\stopanswer]
\starttext
\chapter{Questions}
\beginquestion
Question one
\endquestion
\beginanswer
Answer one
\endanswer
\beginquestion
Michal Kvasnicka wrote:
Good evening.
How can I include \begin ... \end into a macro?
I have defined:
\defineblock[question]
\defineblock[answer]
\defineenumeration[question][location=serried, coupling=answer]
\defineenumeration[answer][location=serried, coupling=answer]
\hideblocks
Good evening.
How can I include \begin ... \end into a macro?
I have defined:
\defineblock[question]
\defineblock[answer]
\defineenumeration[question][location=serried, coupling=answer]
\defineenumeration[answer][location=serried, coupling=answer]
\hideblocks[answer]
I'd li
Bernd Militzer <[EMAIL PROTECTED]> writes:
> it ist not possible to use the text-blocks form student.tex in test.tex
if you are using the \defineblock... \hideblocks... mechanism: the do
not look for paths from \usepath.
Patrick
--
You are your ow
Bernd
> \defineblock[homework]
>
> == test.tex ===
>
> \defineblock[homework]
> \setupblock[homework][file=student]
>
> \starttext
>
> test
>
> \useblocks[homework]
>
> test
>
> \stoptext
>
> == student.t
At 12:01 26/09/2003 +0200, you wrote:
Hi,
the example
\setupblock[homework][file=student]
that Hans describes in his docu does not work for me!
Help needed!
did you define the block?
\defineblock[homework]
== test.tex ===
\defineblock[homework]
\setupblock[homework
Am Don, 2003-09-25 um 12.14 schrieb Patrick Gundlach:
> Hi ConTeXt users,
>
> I have a question concerning blocks:
hello.tex
\starttext
\defineblock[hiho]
>
> \beginhiho
> Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
%%%
test.tex
\starttext
\defineblock
[hiho]
\setupblock
[hiho]
[file=hello]
Test
\useblocks[hiho]
\stoptext
%%
gives no sensible output (only "Test"). What am I doing wrong?
Patrick
-
Hi Pattrick,
From: "Patrick Gundlach" <[EMAIL PROTECTED]>
> Hello Willi,
>
> > In the environment file there is a block defined as
\defineblock[Impressum]
> > and the block is immediately hidden with \hideblocks[Impressum]
>
> It looks as if you ca
Hello Willi,
> In the environment file there is a block defined as \defineblock[Impressum]
> and the block is immediately hidden with \hideblocks[Impressum]
It looks as if you can only define blocks within
\starttext...\stoptext. Do you load your environment inside or
outside \sta
Hi gang!
I do not know why this does not work therefore the following:
I have a document with several chapters.
At the beginning an environment file is loaded.
In the environment file there is a block defined as \defineblock[Impressum]
and the block is immediately hidden with \hideblocks
101 - 184 of 184 matches
Mail list logo