Difference between revisions of "Command/ startnarrower"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \start<i>narrower</i> ... \stop<i>narrower</i>")
 
(copy description and examples from instance page)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<?xml version='1.0'?>
 
<!-- this file was generated on 2020-08-20T09:05 -->
 
 
<cd:commandgroup generated="yes" name="narrower" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
 
<cd:commandgroup generated="yes" name="narrower" 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>narrower</i> ... \stop<i>narrower</i></tt> are used for text with a smaller width than the main text. It can be indented on one or both sides.
The instances of  <tt>\start<i>narrower</i> ... \stop<i>narrower</i></tt> are used for ...
 
 
</cd:shortdesc>
 
</cd:shortdesc>
 
<cd:sequence>
 
<cd:sequence>
Line 14: Line 11:
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
 
     <cd:keywordsdoc></cd:keywordsdoc>
 
     <cd:keywordsdoc></cd:keywordsdoc>
     <cd:constant method="none" prefix="cd:sign" type="left"></cd:constant>
+
     <cd:constant method="none" prefix="cd:sign" type="left">increase left-hand margin</cd:constant>
     <cd:constant method="none" prefix="cd:sign" type="middle"></cd:constant>
+
     <cd:constant method="none" prefix="cd:sign" type="middle">increase margin on both sides</cd:constant>
     <cd:constant method="none" prefix="cd:sign" type="right"></cd:constant>
+
     <cd:constant method="none" prefix="cd:sign" type="right">increase right-hand margin</cd:constant>
     <cd:constant method="factor" prefix="cd:number" type="left"></cd:constant>
+
     <cd:constant method="factor" prefix="cd:number" type="left">increase left-hand margin by a multiple of the default value (decrease with negative number)</cd:constant>
     <cd:constant method="factor" prefix="cd:number" type="middle"></cd:constant>
+
     <cd:constant method="factor" prefix="cd:number" type="middle">increase both margins by a multiple of the default value (decrease with negative number)</cd:constant>
     <cd:constant method="factor" prefix="cd:number" type="right"></cd:constant>
+
     <cd:constant method="factor" prefix="cd:number" type="right">increase right-hand margin by a multiple of the default value (decrease with negative number)</cd:constant>
 
     <cd:constant type="reset"></cd:constant>
 
     <cd:constant type="reset"></cd:constant>
 
     <cd:constant type="reverse"></cd:constant>
 
     <cd:constant type="reverse"></cd:constant>
Line 26: Line 23:
 
   </cd:command>
 
   </cd:command>
 
</cd:variants>
 
</cd:variants>
<cd:description>
+
<cd:description>Make the margins wider on the left, the right, or (default) both sides. The default value is 5 mm; use {{cmd|setupnarrower}} to change it, or use the parameters of {{cmd|startnarrow}}. Using <code>\startnarrower[left=2cm]</code> does not work.
<!-- the long description of the command goes here -->
+
 
 +
By preceding the argument with a negative sign (eg. <code>\startnarrower[<tt>-2*left</tt>]</code>) the text area can be made wider rather than narrower.
 
</cd:description>
 
</cd:description>
<cd:examples>
+
<cd:examples><cd:example title=""><context source="yes">
<!--  command example(s)
+
\setuppapersize[A5]
<cd:example title="">
+
 
</cd:example>
+
The Gibbelins eat, as is well known, nothing less good than man. Their evil
-->
+
tower is joined to Terra Cognita, to the lands we know, by a bridge.
</cd:examples>
+
 
<cd:notes>
+
\setupnarrower[left=1cm,right=3cm]
<!--  this is for special remarks that do not fit elsewhere, like discovered bugs in specific context versions
+
 
<cd:note author="..." date="...">
+
\startnarrower
</cd:note>
+
    (default, middle=0.5cm) Their hoard is beyond reason; avarice has no use
-->
+
    for it; they have a separate cellar for emeralds and a separate cellar for
</cd:notes>
+
    sapphires; they have filled a hole with gold and dig it up when they need it.  
 +
\stopnarrower
 +
 
 +
 
 +
\startnarrower[left,right]
 +
    (1cm left, 3cm right) And the only use that is known for their ridiculous
 +
    wealth is to attract to their larder a continual supply of food.
 +
\stopnarrower
 +
 
 +
\setupnarrower[middle=1cm]
 +
\startnarrower
 +
    (1cm middle) In times of famine they have even been known
 +
    to scatter rubies  abroad, a little trail of them to some city of Man, and
 +
    sure enough their larders would soon be full again.
 +
\stopnarrower
 +
 
 +
\blank[line]
 +
 
 +
\rightaligned{—Lord Dunsany, \quote{The Hoard of the Gibbelins}, \emph{The Book of Wonder}}
 +
</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="definenarrower" originator="system"></cd:commandref>
 
<cd:commandref name="definenarrower" originator="system"></cd:commandref>
 
<cd:commandref name="setupnarrower" originator="system"></cd:commandref>
 
<cd:commandref name="setupnarrower" originator="system"></cd:commandref>
<cd:source file="spac-hor.mkiv" originator="system"></cd:source>  
+
<cd:source file="spac-hor.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Whitespace"></cd:wikipage>  
+
<cd:wikipage originator="system" page="Category:Whitespace"></cd:wikipage>
<cd:wikipage originator="system" page="Keywords:Layout"></cd:wikipage>  
+
<cd:wikipage originator="system" page="Keywords:Layout"></cd:wikipage>
</cd:seealso>
+
<cd:commandref name="startnarrow"></cd:commandref></cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Revision as of 14:22, 8 January 2022


\startnarrower ... \stopnarrower

Summary

The instances of \startnarrower ... \stopnarrower are used for text with a smaller width than the main text. It can be indented on one or both sides.

Settings example

\startNARROWER[...,...] ... \stopNARROWER
[...,...][+-]left [+-]middle [+-]right number*left number*middle number*right reset reverse

OptionExplanation
[+-]left increase left-hand margin
[+-]middle increase margin on both sides
[+-]right increase right-hand margin
number*left increase left-hand margin by a multiple of the default value (decrease with negative number)
number*middle increase both margins by a multiple of the default value (decrease with negative number)
number*right increase right-hand margin by a multiple of the default value (decrease with negative number)

Description

Make the margins wider on the left, the right, or (default) both sides. The default value is 5 mm; use \setupnarrower to change it, or use the parameters of \startnarrow. Using \startnarrower[left=2cm] does not work.

By preceding the argument with a negative sign (eg. \startnarrower[-2*left]) the text area can be made wider rather than narrower.

Examples

Example 1

\setuppapersize[A5]

The Gibbelins eat, as is well known, nothing less good than man. Their evil
tower is joined to Terra Cognita, to the lands we know, by a bridge.

\setupnarrower[left=1cm,right=3cm]

\startnarrower
    (default, middle=0.5cm) Their hoard is beyond reason; avarice has no use
    for it; they have a separate cellar for emeralds and a separate cellar for
    sapphires; they have filled a hole with gold and dig it up when they need it.
\stopnarrower


\startnarrower[left,right]
    (1cm left, 3cm right) And the only use that is known for their ridiculous
    wealth is to attract to their larder a continual supply of food.
\stopnarrower

\setupnarrower[middle=1cm]
\startnarrower
    (1cm middle) In times of famine they have even been known
    to scatter rubies   abroad, a little trail of them to some city of Man, and
    sure enough their larders would soon be full again.
\stopnarrower

\blank[line]

\rightaligned{—Lord Dunsany, \quote{The Hoard of the Gibbelins}, \emph{The Book of Wonder}}

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: