Changes

Jump to navigation Jump to search
23 bytes removed ,  15:26, 11 June 2012
m
Get rid of one head level
Indentations in ConTeXt are a bit different; and sometimes difficult to understand. In this article I hope to explain how ConTeXt does indentations. First, let's understand why ConTeXt does indentations differently; why does it not simply follow the time-tested approach of plain TeX and LaTeX? The way I understand it, the reason is that Hans Hagen, the author of ConTeXt, prefers ''spaced out'' markup — surrounding each environment by empty lines — which makes it easy to see where an environment starts and ends while reading the source file. However, this style means that the 'indentation after empty lines' paradigm of plain TeX and LaTeX cannot be used for indentations. So, ConTeXt provides an alternative. As with other things in ConTeXt, this alternative is consistent and easy to configure; but if you are used to other TeX formats it takes some time to get comfortable with it.
== The basics ===== Setting up indentation for the whole document ===
Indentation involves two things: when to indent, and how much to indent. In ConTeXt, these can be specified using <tt>{{cmd|setupindenting}}[...]</tt>. There are three types of keys for this command:
* <code>normal</code>: what does this do?
=== Setting up indentation after an environment ===
{{cmd|setupindenting}} does not take care of indenting after environments, such as ConTeXt's itemizes, enumerations, definitions, formulas and floats. It also does not take care of indenting after heads such as chapters, sections, and subsections.
</texcode>
=== Setting up indentation inside environments ===
There is one case that is not taken care of by {{cmd|setupindenting}} and the <code>indentnext</code> key: indentation of paragraphs inside multi-paragraph environments such as itemizes, descriptions, and enumerations. By default ConTeXt does not indent such paragraphs. The setup commands of these environments provides an <code>indenting=</code> key to configure the indentation behaviour of paragraphs inside these environments. This key takes the same arguments as the {{cmd|setupindenting}} command does. An example using {{cmd|setupitemgroup}}:

Navigation menu