o this, even if I realized now that there is a similar example in the wiki.
For the list, in case in the future this would be useful for another user,
below is the complete minimal example using this approach.
% - Minimal working example :
\setuppapersize[S5][S5]
\enablemode[Professor]
\de
, I tried to think differently.
One solution would be to define a block for each course. Something like this (a
working minimal example, redone in order this would be more easier to
understand (I hope!) what I’m trying to do):
% —
\setuppapersize[S5][S5]
\enablemode[Professor]
TeX capacity exceeded, sorry [input stack size=5]
%
The problem can be summarized in this minimal non working example :
% — MWE —
\setuppapersize[S5][S5]
\enablemode[Professor]
\defineblock[Complement]
\setupblock[Complement][
before={\page[yes]\setuppagenum
}
%{\stopsidebar}
%{\stopbuffer}},
% ]
\starttext
Before
\startChangePR
\input knuth
\stopChangePR
After
\stoptext
\defineblock
[ChangePR]
\defineblock
[ChangeRP]
\setupblock
[ChangePR]
[before={\startsidebar[rulecolor=red]},
after={\blank[overlay]\stopsidebar}]
\setupblock
trainings in both English and Dutch in the same file. Instead of modes, I use blocks. Like this: \defineblock[ENblok]\defineblock[NLblok] \setupblock[NLblok][before={\mainlanguage[nl]},after=]\setupblock[ENblok][before={\mainlanguage[en]},after=] Then, determine which blocks you want to use in your file
up an
xml file. You can then have the overview via scripts.
Yet for short texts it can be a solution. I have case material for my trainings
in both English and Dutch in the same file. Instead of modes, I use blocks.
Like this:
\defineblock[ENblok]
\defineblock[NLblok]
\setupblock[NLblok][before
} {
>\keepblocks[Question]
> }
>
> \starttext
>
>Text A
>
>\beginQuestion
>Question A….
>\endQuestion
>
>Text B
>
>\beginQuestion
>Question B….
>\endQuestion
>
>\page
>
>\doifnotmod
ssible? What have I missed?
>
> Blocks only store their content without expanding counters etc. and when
> you flush them you have the same result as putting them into the appendices
> by hand.
>
> Related: Is there a better way to set answers to questions? (Perhaps
> not havin
content without expanding counters etc. and when
you flush them you have the same result as putting them into the appendices
by hand.
Related: Is there a better way to set answers to questions? (Perhaps
not having to write both the \begin... \start... \stop... \end... for
every question?
\setu
{margin}] %%
\setupblock[question][before=\startquestion,after=\stopquestion]
\setupinmargin[stack=continue]
\starttext
\beginquestion
Text
\endquestion
\beginquestion
Text
\endquestion
\useblocks[question]
\stoptext
Sent from Windows Mail
From: Jan Willem Flamma
Sent
ards,
> Jan Willem
>
>
> MWE:
> \defineblock[question]
> \hideblocks[question]
>
> \defineenumeration
>[question]
>[text=Question]
>
> \setupblock[question][before=\startquestion,after=\stopquestion]
>
>
> \starttext
>
> \inmargin{margi
t; \defineenumeration
> [question]
> [text=Question]
>
> \setupblock[question][before=\startquestion,after=\stopquestion]
\setupinmargin
[stack=yes] %% yes or continue
Marco
___
If your 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
umeration[hint]
> [alternative=hanging,
> width=4cm,
> text={Hint for question},
> headstyle={\bi},
> stopper={.}]
>
> \defineenumeration[answer]
> [alternative=hanging,width=4.5cm,
> text={Answer to
text={Hint for question},
headstyle={\bi},
stopper={.}]
\defineenumeration[answer]
[alternative=hanging,width=4.5cm,
text={Answer to question},
headstyle={\bi},
stopper={.}]
\setupblock[question][before={\startquestion},after={\stopque
={\startcolumns[n=4]},
after=\stopcolumns,
width=0.5em,
text={},
headstyle={},
stopper={.}]
\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer
=,
>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
Hi Wolfgang,
Many thanks for your attention and insight.
With your code everything works as expected. In case others would be
interested, I give here a slight modification of what you sent, which works
very well with mkiv: I only added
\setupblock[question][before={\startquestion
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]}
Thank you for your answers,
in my case, start-/stoplines is actually much better.
Kind regards,
Ingo
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context
, 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
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
an simplify your code a little bit.
\defineblock[Block]
\defineenumeration[Enum][location=left,text=Test]
\setupblock[Block][before=\startEnum,after=\stopEnum]
\starttext
\beginBlock
Some text A
\endBlock
\stoptext
Wolfgang
__
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
se more than one name in
> \setupenumerations (\setupdescriptions), e.g.
> \setupenumerations[problem,remark][stopper=)]
> so name of commands are correct (in some sense one is a limit of several :).
You could also use more names in \setuphead, \setupblock etc. but these
command names are sin
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
\setcollector
# \setevalue
# \setevariables
# \setflag
# \setfontstrut
# \setgvalue
# \setgvariables
# \setlayer
# \setlayerframed
# \setlocalhsize
# \setstrut
\settextvariable[name]{text}
\setupalign[options]
\setuparranging[options]
# \setupattachments
\setupbackground[options]
\setupbackgrounds[
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
inizioinceput
> debut
>end: eindvan stop
> ende konec
> fine sfarsit
>
inceput
debut
end: eindvan stop
ende konec
fine sfarsit
fin
\stopelements
\defineenumeration[Answer][text=
d Priority) in a list, each block in a cell.
>
> I don't understand why I can't place arbitrary commands in the 'begin' and
> 'after' fields of '\setupblock'. Does the '\useblocks' command not produce
> plain TeX-Code in iterative f
containing all textblocks.
It would be really nice to have a solution where I can typeset the to
textblocks (Requirements and Priority) in a list, each block in a cell.
I don't understand why I can't place arbitrary commands in the 'begin' and
'after' fields of &
;>
>>>> 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]
>>
&
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
lock[Engelsblok]
\setupblock[Nederlandsblok][before=,after=]
\setupblock[Engelsblok][before=,after=]
\hideblocks[Nederlandsblok]
%\hideblocks[Engelsblok]
\starttext
there
\beginNederlandsblok
Ik vraag me af of ze ook appels verkopen 1
\endNederlandsblok
\beginEngelsblok
I really wonder if they do
Rob Ermers wrote:
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:
See \def\dodefineblock in core-buf.tex.
Does
\setupblock[Nederlandsblok][before=,after
]
\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
ks (before/after keys)
\setupblock[question][before=\startquestion,after=\stopquestion]
should work (i'm crossing my fingers now)
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstra
At 17:42 26/09/2003 +0200, you wrote:
Hi Hans,
thanks first,
blocks are defined.
If I use your example in the following way:
1. texexec test.tex
--> test
test
no homework!
2. texexec student.tex
and than
texexec test.tex
--> test
homework
test
Is this the right way to use exter
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
Hi,
the example
\setupblock[homework][file=student]
that Hans describes in his docu does not work for me!
Help needed!
Thanks in advance
Bernd
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context
pis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
> accumsan nisl.
> \endhiho
\stoptext
> %%%
>
>
> test.tex %%%%
> \starttext
> \defineblock
>[hiho]
>
> \
%%%
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
-
54 matches
Mail list logo