Indentation
605600
210802276
2008-05-07T13:44:09Z
62.99.197.106
/* English */
== English ==
{{Wiktionary|indentation}}
An '''indentation''' can mean two things:
*To make notches in something or form deep recesses in a coastline for instance.
*To place text farther to the right to separate it from surrounding text.
The first meaning is also applied in [[hardness]] measurement as in [[indentation hardness]].
For an example of the second meaning, this is an indentation of one [[Non-breaking space|non-breaking space]]:
Indented block
and this is an indentation of two non-breaking spaces:
Indented block 2
In the written form of many [[language]]s, an indentation is often used at the beginning of a line to signal the start of a new paragraph.
'''Outdentation''' is a neologism used in computer circles to describe placing text back to the left again.
Some languages (e.g. [[Hebrew]], [[Arabic]]) are written right-to-left, and if indentation is used, in the above "left" and "right" should of course be swapped when referring to such languages.
==Indentation in typesetting==
There are two main types of first-line indent: normal and hanging. A "normal" indent indents the first line, as shown here, an indent of one centimetre:
<div style="text-indent: 2em">{{lorem ipsum}}</div>
The other kind, a hanging indent, indents the rest of the text while leaving the first line in place; as shown here with a hanging indent of one centimetre:
<div style="padding-left: 2em; text-indent: -2em">{{lorem ipsum}}</div>
==Indentation in programming==
:''Main article: [[Indent style]]''
In computer [[programming language]]s, indentation is used to format program [[source code]] in order to improve its readability. Indentation is generally only of use to programmers; [[compiler]]s and [[Interpreter (computing)|interpreters]] rarely care how much [[whitespace]] is present in between programming statements. However, certain programming languages rely on the use of indentation in order to demarcate programming structure, often using a variation of the [[Off-side rule]]. The [[Haskell (programming language)|Haskell]], [[Occam programming language|Occam]], and [[Python (programming language)|Python programming languages]] rely on indentation in this way.
Debates over where to indent, whether to use spaces or [[tab]]s, and how many spaces to use are often hotly debated among programmers, leading some to classify indentation as a [[religious war]]. Different [[indent style|indentation styles]] are commonly used. In 2006 a third method of indentation was proposed, called [[elastic tabstop]]s.
[[Category:Typography]]
[[Category:Source code]]
[[de:Einzug_%28Typografie%29]]
[[es:Sangría (tipografía)]]
[[fr:Indentation]]
[[it:Indentazione]]
[[he:הזחה]]
[[ja:字下げ]]
[[pt:Indentação]]