Difference between revisions of "Command/ startframedtext"

From Wiki
Jump to navigation Jump to search
m (add commands 'starttext' and 'stoptext' to the script of the first example)
Line 1: Line 1:
<?xml version='1.0'?>
 
<!-- this file was generated on 2020-08-20T09:05 -->
 
 
<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.
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="">
+
\startext
<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>
 
<!--  this is for special remarks that do not fit elsewhere, like discovered bugs in specific context versions
 
<cd:note author="..." date="...">
 
</cd:note>
 
-->
 
</cd:notes>
 
 
<cd:seealso>
 
<cd:seealso>
<!-- one or more of these:
 
<cd:commandref name="xx"></cd:commandref>
 
<cd:wikipage  page="xx"></cd:wikipage>
 
<cd:url        url="https://xx"></cd:url>
 
<cd:manual    pdf="xx"></cd:manual>
 
<cd:source    file="xx"></cd:source>
 
-->
 
 
<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>

Revision as of 14:03, 17 March 2024


\startframedtext ... \stopframedtext

Summary

The instances of \startframedtext ... \stopframedtext are used for wrapping frames, margins and/or backgrounds around longer blocks of text.

Instances

\startframedtext ... \stopframedtextLike \framed, but bigger.

Settings instance

\startFRAMEDTEXT[...][...=...,...] ... \stopFRAMEDTEXT
[...]left right middle none
...=...,...inherits from \setupframedtext

OptionExplanation
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

\startext
\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

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: