Difference between revisions of "Command/ startframedtext"
< Command
Adeimantos (talk | contribs) m |
|||
(2 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 wrapping frames, margins and/or backgrounds around longer blocks of text. | ||
</cd:shortdesc> | </cd:shortdesc> | ||
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"> |
− | <cd:example title=""> | + | \starttext |
− | <context source="yes"> | ||
\startframedtext[width=.8\makeupwidth] | \startframedtext[width=.8\makeupwidth] | ||
It was essential for Hasselt to have a bridge across the river Zwarte | It was essential for Hasselt to have a bridge across the river Zwarte | ||
Line 46: | Line 41: | ||
This one is shifted to the right. | This one is shifted to the right. | ||
\stopframedtext | \stopframedtext | ||
+ | \stoptext | ||
</context> | </context> | ||
− | </cd:example> | + | </cd:example></cd:examples> |
− | </cd:examples> | + | <cd:notes></cd:notes> |
− | <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