Difference between revisions of "Command/definedescription"

From ConTeXt wiki
Jump to navigationJump to search
m
Line 26: Line 26:
 
== Example ==
 
== Example ==
  
 +
=== Sample 1 ===
 
<context source="yes" text="yields">
 
<context source="yes" text="yields">
 
\definedescription
 
\definedescription
Line 35: Line 36:
 
\concept{Hasselter juffer}  
 
\concept{Hasselter juffer}  
 
A sort of biscuit made of puff pastry and covered with sugar. It tastes very sweet. \par
 
A sort of biscuit made of puff pastry and covered with sugar. It tastes very sweet. \par
 +
</context>
 +
 +
=== Sample 2 ===
 +
 +
<context source="yes" mode=mkiv text="Gives (NOTE: Try yourself as the result here is not the same compared what you give on the local computer!):">
 +
\definedescription[T]
 +
  [headstyle=bold,
 +
  width=fit, % Width of the running text
 +
  indenting={yes,medium}, % (Internal) indenting of the running text
 +
  text={\hbox to1.5em{$\bullet$}}, % Put in the front of each label
 +
  hang=5, % Revert indenting after 5 lines
 +
  ]
 +
 +
\starttext
 +
  \startT{My Label}
 +
    \input knuth
 +
  \stopT
 +
\stoptext
 
</context>
 
</context>
  

Revision as of 07:17, 3 April 2015

\definedescription

Syntax

\definedescription[...][...,...=...,...]
[...] name
[...,...=...,...] see \setupdescriptions


Description

Define a new description with an associated style.

Example

Sample 1

\definedescription
   [concept]
   [location=serried,
    headstyle=bold,
    width=broad]

\concept{Hasselter juffer} 
A sort of biscuit made of puff pastry and covered with sugar. It tastes very sweet. \par

yields

Sample 2

\definedescription[T]
  [headstyle=bold,
   width=fit, % Width of the running text
   indenting={yes,medium}, % (Internal) indenting of the running text
   text={\hbox to1.5em{$\bullet$}}, % Put in the front of each label
   hang=5, % Revert indenting after 5 lines
  ]

\starttext
  \startT{My Label}
    \input knuth
  \stopT
\stoptext

Gives (NOTE: Try yourself as the result here is not the same compared what you give on the local computer!):

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: