Difference between revisions of "Command/setupblock"

From Wiki
Jump to navigation Jump to search
(Add example)
Line 5: Line 5:
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 +
<syntax>setupblock</syntax>
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
   <tr>
 
   <tr>

Revision as of 10:28, 6 October 2019

\setupblock

Syntax

\setupblock[...,...][...=...,...]
[...,...]name
beforecommand
aftercommand
leftcommand
rightcommand
alternativeparagraph text
innercommand
setupsname
alignsee \setupalign
stylestyle command
colorcolor


\setupblock[...,...,...][...,...=...,...]
[...,...,...] name
before command to place before each block, e.g. \startnarrower
after command to place after each block, e.g. \stopnarrower
inner command to perform in each block
style normal bold slanted boldslanted type cap small... command
file file in which to look for the blocks when displaying them.

Description

Setup how blocks are displayed.

Example

\defineblock[question]
\keepblocks[question] % We want to display blocks where we define them.
\setupbackground[background=color, color=red]

\subject{List of questions}

\beginquestion
    How much wood would a woodchuck chuck if a woodchuck could chuck wood?
\endquestion

\subject{The questions again}

\setupblock[question][
    %% if we had a file my_questions.tex containing \beginquestions, we would use:
    % file=my_questions,  % (works only under mkii?)
    before=\startbackground,
    after=\stopbackground,
    inner=\margintitle{again}
]

\useblocks[question]

This gives:

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: