Open main menu

Changes

2,224 bytes added ,  09:50, 29 April 2021
first version of \startsidebar...\stopsidebar
<cd:commandgroup name="sidebar" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The environment <tt>\startsidebar ... \stopsidebar</tt> is used to mark with a vertical bar the text falling between the two commands. See {{cmd|setupsidebar}}.
</cd:shortdesc>
<cd:variants>
<cd:command category="rules" file="anch-bar.mkiv" interfacedate="2020-06-19T13:41" interfacefile="i-sidebar.xml" level="document" name="sidebar" type="environment" variantnumber="1">
<cd:arguments>
<cd:keywords optional="yes" ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:assignments list="yes" optional="yes" ordinal="2">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:inherit name="setupsidebar"></cd:inherit>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description><!-- the long description of the command goes here -->
</cd:description>
<cd:examples><cd:example title="Sidebars can be nested"><context source="yes" text="(see \setupsidebar for more examples)">
\definesidebar[first][distance=2mm,rulethickness=2pt]
\definesidebar[second][distance=2mm,rulethickness=1pt,rulecolor=red]
\starttext
\hsize=4cm
\startsidebar[first] You can nest two sidebars.
When they are in the same level, they are drawn side by side.
\startsidebar[second] When they are on different levels, they are drawn one of top of the other.\stopsidebar\stopsidebar

\blank

\setupsidebar[first][level=1]
\setupsidebar[second][level=2]
\startsidebar[first] You can nest two sidebars.
When they are in the same level, they are drawn side by side.
\startsidebar[second] When they are on different levels, they are drawn one of top of the other.\stopsidebar\stopsidebar
\stoptext
</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="definesidebar" originator="system"></cd:commandref>
<cd:commandref name="setupsidebar" originator="system"></cd:commandref>
<cd:source file="anch-bar.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Rules"></cd:wikipage></cd:seealso>
</cd:commandgroup>
26

edits