Difference between revisions of "Command/ startnarrower"

From Wiki
Jump to navigation Jump to search
m (complete the description sentence)
(copy description and examples from instance page)
 
Line 11: 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 23: Line 23:
 
   </cd:command>
 
   </cd:command>
 
</cd:variants>
 
</cd:variants>
<cd:description><!-- the long description of the command goes here -->
+
<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.
 +
 
 +
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:examples><cd:example title=""><context source="yes">
 +
\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}}
 +
</context></cd:example></cd:examples>
 
<cd:notes></cd:notes>
 
<cd:notes></cd:notes>
 
<cd:seealso>
 
<cd:seealso>
Line 32: Line 64:
 
<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:seealso>
+
<cd:wikipage originator="system" page="Keywords:Layout"></cd:wikipage>
 +
<cd:commandref name="startnarrow"></cd:commandref></cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Latest 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: