Difference between revisions of "Command/ startframedtext"
< Command
Jump to navigation
Jump to search
(Created page with "Documentation for \start<i>framedtext</i> ... \stop<i>framedtext</i>") |
Adeimantos (talk | contribs) m |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
<cd:commandgroup generated="yes" name="framedtext" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807"> | <cd:commandgroup generated="yes" name="framedtext" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807"> | ||
− | <cd:shortdesc> | + | <cd:shortdesc><!-- a short command summary goes here --> |
− | <!-- a short command summary goes here --> | + | The instances of <tt>\start<i>framedtext</i> ... \stop<i>framedtext</i></tt> are used for wrapping frames, margins and/or backgrounds around longer blocks of text. |
− | The instances of <tt>\start<i>framedtext</i> ... \stop<i>framedtext</i></tt> are used for | ||
</cd:shortdesc> | </cd:shortdesc> | ||
<cd:sequence> | <cd:sequence> | ||
Line 10: | Line 7: | ||
</cd:sequence> | </cd:sequence> | ||
<cd:instances> | <cd:instances> | ||
− | <cd:constant value="framedtext"></cd:constant> | + | <cd:constant value="framedtext">Like {{cmd|framed}}, but bigger.</cd:constant> |
</cd:instances> | </cd:instances> | ||
<cd:variants> | <cd:variants> | ||
Line 16: | Line 13: | ||
<cd:arguments> | <cd:arguments> | ||
<cd:keywords optional="yes" ordinal="1"> | <cd:keywords optional="yes" ordinal="1"> | ||
− | <cd:keywordsdoc></cd:keywordsdoc> | + | <cd:keywordsdoc>set a horizontal placement, like in {{cmd|setupalign}}</cd:keywordsdoc> |
− | <cd:constant type="left"></cd:constant> | + | <cd:constant type="left">left-aligned box</cd:constant> |
− | <cd:constant type="right"></cd:constant> | + | <cd:constant type="right">right-aligned box</cd:constant> |
− | <cd:constant type="middle"></cd:constant> | + | <cd:constant type="middle">horizontally centered box</cd:constant> |
− | <cd:constant type="none"></cd:constant> | + | <cd:constant type="none">whatever the surrounding default is</cd:constant> |
</cd:keywords> | </cd:keywords> | ||
<cd:assignments list="yes" optional="yes" ordinal="2"> | <cd:assignments list="yes" optional="yes" ordinal="2"> | ||
Line 29: | Line 26: | ||
</cd:command> | </cd:command> | ||
</cd:variants> | </cd:variants> | ||
− | <cd:description> | + | <cd:description>While this is a very powerful way to add decorations to a bit of text, note that framedtexts do not break across pages. See {{cmd|starttextbackground}} for a similar environment that will break across pages. |
− | |||
</cd:description> | </cd:description> | ||
− | <cd:examples> | + | <cd:examples><cd:example title=""><context source="yes"> |
− | + | \starttext | |
− | <cd:example title=""> | + | \startframedtext[width=.8\makeupwidth] |
− | < | + | It was essential for Hasselt to have a bridge across the river Zwarte |
− | + | Water. The bishop of Utrecht gave Hasselt his consent in 1486. | |
− | + | \blank | |
− | + | Other cities in the neighbourhood of Hasselt were afraid of the toll | |
− | + | money to be paid when crossing this bridge so they prevented the | |
− | + | construction. | |
− | </cd: | + | \stopframedtext |
− | + | \startframedtext[right][width=.8\makeupwidth] | |
− | </cd:notes> | + | This one is shifted to the right. |
+ | \stopframedtext | ||
+ | \stoptext | ||
+ | </context> | ||
+ | </cd:example></cd:examples> | ||
+ | <cd:notes></cd:notes> | ||
<cd:seealso> | <cd:seealso> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<cd:commandref name="_framedtext" originator="system"></cd:commandref> | <cd:commandref name="_framedtext" originator="system"></cd:commandref> | ||
<cd:commandref name="defineframedtext" originator="system"></cd:commandref> | <cd:commandref name="defineframedtext" originator="system"></cd:commandref> | ||
<cd:commandref name="setupframedtext" originator="system"></cd:commandref> | <cd:commandref name="setupframedtext" originator="system"></cd:commandref> | ||
− | <cd:source file="pack-rul.mkiv" originator="system"></cd:source> | + | <cd:source file="pack-rul.mkiv" originator="system"></cd:source> |
− | <cd:wikipage originator="system" page="Category:Rules"></cd:wikipage> | + | <cd:wikipage originator="system" page="Category:Rules"></cd:wikipage> |
− | <cd:wikipage originator="system" page="Keywords:Background"></cd:wikipage> | + | <cd:wikipage originator="system" page="Keywords:Background"></cd:wikipage></cd:seealso> |
− | </cd:seealso> | ||
</cd:commandgroup> | </cd:commandgroup> |
Latest revision as of 14:03, 17 March 2024
Contents
\startframedtext ... \stopframedtext
Summary
The instances of \startframedtext ... \stopframedtext are used for wrapping frames, margins and/or backgrounds around longer blocks of text.
Instances
\startframedtext ... \stopframedtext | Like \framed, but bigger. |
Settings instance
\startFRAMEDTEXT[...][...=...,...] ... \stopFRAMEDTEXT | |
[...] | left right middle none |
...=...,... | inherits from \setupframedtext |
Option | Explanation |
---|---|
set a horizontal placement, like in \setupalign | |
left | left-aligned box |
right | right-aligned box |
middle | horizontally centered box |
none | whatever the surrounding default is |
Description
While this is a very powerful way to add decorations to a bit of text, note that framedtexts do not break across pages. See \starttextbackground for a similar environment that will break across pages.
Examples
Example 1
\starttext \startframedtext[width=.8\makeupwidth] It was essential for Hasselt to have a bridge across the river Zwarte Water. The bishop of Utrecht gave Hasselt his consent in 1486. \blank Other cities in the neighbourhood of Hasselt were afraid of the toll money to be paid when crossing this bridge so they prevented the construction. \stopframedtext \startframedtext[right][width=.8\makeupwidth] This one is shifted to the right. \stopframedtext \stoptext