Changes

Jump to navigation Jump to search
545 bytes added ,  19:24, 4 September 2005
A bit more explanation, improvement of examples.
=== ConTeXt ===
ConTeXt provides a similar mechanism. Unlike the LaTeX version, ConTeXt's description mechanism does not enclose the items in an environment, but instead formats them independently according to formats given in <ttcmd>\setupdescription</ttcmd> with some special parameters(or <ttcmd>location=hangingdefinedescription</ttcmd>, . The <ttcmd>width=broaddefinedescription</ttcmd>latter command is used to define a named description class,which can later be called using its name. This example defines a <tt>margin=latexdesc</tt><i>indentation</i>)description, with parameters that roughly approximate the LaTeX defaults.
<texcode>
\definedescription[notationlatexdesc][
headstyle=bold,style=normal,align=left,location=hanging,
width=broad,margin=1cm]
\starttext
\notationlatexdesc{A very very very very long Short} This is a shorter item} bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blalabel, and some text that talks about it. bla bla bla blaThe text is wrapped into a paragraph, with successive lines indented.
\notationlatexdesc{iRather longer label}This is a longer item label. As you can see, the bla bla bla bla bla bla bla bla bla bla bla bla bla bla blatext is not started a specified distance in -- unlike with other lists -- but bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blais spaced a fixed distance from the end of the label.
\stoptext
</texcode>
The empty lines (or <ttcmd>\par</ttcmd>) after each description(here notation, <tt>\latexdesc</tt>) line are necessaryrequired.
The result looks like this:<tt>margin=<i>dimension</i></tt> key specifies the hanging indentation for lines after the first line. In addition, the separation between the label and the text can be specified using a <tt>distance=<i>dimension</i></tt> key.
<context>
\definedescription[notationlatexdesc][
headstyle=bold,style=normal,align=left,location=hanging,
width=broad,margin=1cm]
\starttext
\notationlatexdesc{A very very very very long Short} This is a shorter item} bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blalabel, and some text that talks about it. bla bla bla blaThe text is wrapped into a paragraph, with successive lines indented.
\notationlatexdesc{iRather longer label}This is a longer item label. As you can see, the bla bla bla bla bla bla bla bla bla bla bla bla bla bla blatext is not started a specified distance in -- unlike with other lists -- but bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blais spaced a fixed distance from the end of the label.
\stoptext
</context>
 
<b>Hint:</b> This solution uses the <tt>distance=</tt><i>dimension</i>
distance for separation of label and text.
 
== Description with minimal label width: ==

Navigation menu