Changes

Jump to navigation Jump to search
2,579 bytes added ,  12:11, 19 November 2019
no edit summary
|attributes=
}}
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>setupindenting</syntax>
== [[Help:Reference|Syntax]] ==
<tr valign="top" class="first">
<td class="cmd">[...,...,...]</td>
<td>'''no''' yes: ''turn indentation on/off'</td> </tr> <tr valign="top" class="first"> <strongtd class="cmd">none[...,...,...]</strongtd> <td>'''none''' small medium big ''dimension'': ''size of indents''</td> </tr> <tr valign="top" class="first"> <td class="cmd">[...,...,...]</td> <td>'''first''' next : ''turn indentation of first normal paragraph on/off''</td> </tr> <tr valign="top" class="first"> <td class="cmd">[...,...,...]</td> <td>odd even: ''indent odd /even dimension lines in {{cmd|obeylines}} scopes''</td> </tr> <tr valign="top" class="first"> <td class="cmd">[...,...,...]</td> <td>normal: ''what does this do?''</td>
</tr>
</table>
 
== Description ==
indenting starts only Specify indentation settings. By default, indentation is both turned off ''and'' set to zero, so it must be turned on with "yes", e.g.<precode> \setupindenting[yes, medium, firstsmall]</precodeIf you want indenting after section numbers use this.
To get indentation after section numbers, use<pretexcode>
\setupheads[indentnext=yes]
</pretexcodeIf you want to indent the paragraph after a <code>\placefigure</code>, you should not use the key <code>auto</code>, use another specifier instead (<code>top</code> or <code>bottom</code>, for instance). The <code>auto</code> keyword prevents the paragraph from indenting. However you can use <code>auto</code> and additionally mark the paragraph to be indented with the <code>\indentation</code> command.
== Example ==If you place a figure with {{cmd|placefigure}}<code>[auto]</code>, the <code>auto<!-- Please fill in an example if /code> keyword prevents the next paragraph from indenting. You can manually mark the paragraph to be indented with the {{cmd|indentation}} command, or you can --use another specifier instead of <code>auto</code> (<code>top</code> or <code>bottom</code>, for instance).
== See also ==
<!-- something like * [[Indentation]]* {{cmd|indentation}}* {{cmd|noindenting}}* {{cmd:goto|\goto]] -->indenting}}
== Help from ConTeXt-Mailinglist/Forum ==
[[Category:Command/Paragraphs|setupindenting]]
 
== Examples ==
<context source=yes>
\definepapersize[tall][height=40cm, width=10cm]
\setuppapersize[tall]
 
\setuphead[subsubsubject][before={\blank[none]}, after={\blank[none]}]
 
\def\test#1%
{
\setupindenting[yes, #1]
\subsubsubject{\type{#1}}
One, two\par
Buckle my shoe\par
\hairline
}
 
\startcolumns[n=2, rule=on]
\test{none}
\test{medium}
\test{big}
\column
\test{none}
\test{small}
\test{-1em}
\stopcolumns
</context>
 
=== <code>first</code> and <code>next</code> ===
<code>first</code> turns on indentation of the first paragraph; <code>next</code> turns it off. <code>first</code> is on by default.
 
<context source=yes>
\setuppapersize[A5]
 
% The quotation is from "Three Tickets to Adventure", by Gerald Durrell.
\def\testpar{
Neither Bob nor I had ever met quite such a gentle, stupid, and amiable
bird, and we christened it Cuthbert forthwith, as that was the only name
we could think of that perfectly fitted its sloppy character.
\par}
 
% `first` is on by default
\setupindenting[yes, small]
\testpar
\testpar
\hairline
 
% to disable indentation of the first paragraph, use `next`
\setupindenting[next]
\testpar
\testpar
\hairline
 
% to re-enable indentation of the first paragraph on again, use `first`
\setupindenting[first]
\testpar
\testpar
</context>
 
=== <code>odd</code> and <code>even</code> ===
<code>odd</code> and <code>even</code> affect raw newlines when {{cmd|obeylines}} is in effect. {{cmd|crlf}} is not considered a raw newline, and {{cmd|startlines}} is not affected because {{cmd|setuplines}} has its own <code>odd</code> and <code>even</code> keywords.
<context source=yes>
\setuppapersize[A6]
 
\startcolumns[n=2, rule=on]
\setupindenting[yes, small, even]
{\obeylines
one
two
three
four
}
\column
\setupindenting[odd]
{\obeylines
one
two
three
four
}
\stopcolumns
</context>

Navigation menu