Difference between revisions of "Command/ startframedtext"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \start<i>framedtext</i> ... \stop<i>framedtext</i>")
 
m
 
(3 intermediate revisions by 2 users not shown)
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 ...
 
 
</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.
<!-- the long description of the command goes here -->
 
 
</cd:description>
 
</cd:description>
<cd:examples>
+
<cd:examples><cd:example title=""><context source="yes">
<!--  command example(s)
+
\starttext
<cd:example title="">
+
\startframedtext[width=.8\makeupwidth]
</cd:example>
+
  It was essential for Hasselt to have a bridge across the river Zwarte
-->
+
  Water. The bishop of Utrecht gave Hasselt his consent in 1486.
</cd:examples>
+
  \blank
<cd:notes>
+
  Other cities in the neighbourhood of Hasselt were afraid of the toll
<!--  this is for special remarks that do not fit elsewhere, like discovered bugs in specific context versions
+
  money to be paid when crossing this bridge so they prevented the
<cd:note author="..." date="...">
+
  construction.
</cd:note>
+
\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>
<!-- 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>

Latest 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

\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

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: