[NTG-context] \description - indenting lines, "alternative=top"

Wolfgang Schuster schuster.wolfgang at googlemail.com
Tue Apr 10 11:49:56 CEST 2012


Am 10.04.2012 um 09:13 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello Wolfgang,
> 
> thanks for the solution.
> 
> Two more questions:
> 
> - How to specify indenting to be equal to the normal paragraph indenting?
> 
> Here's my trial:
> 
> ----
> \setupindenting[yes,first,medium]
> 
> \define[1]\TestHeadCommand{\offset[x=-\parindent]{#1}} % This doesn't work
> 
> \starttext
>  \definedescription
>    [test]
>    [alternative=top,
>     margin=\parindent,
>     headcommand=\TestHeadCommand,
>    ]
> 
>  \input knuth
> 
>  \starttest{Knuth}
>    \input knuth
>  \stoptest
> 
>  \input knuth
> \stoptext
> ----


When you want a certain value in various places I would use \definemeasure to set it and \measure to access it.

\definemeasure[parindent][1em]

\define[1]\TestHeadCommand
  {\offset[x=-\measure{parindent}]{#1}}

\definedescription
  [test]
  [alternative=top,
   margin=\measure{parindent},
   headcommand=\TestHeadCommand]

\setupindenting[yes,\measure{parindent}]

\starttext

\input knuth

\starttest{Knuth}
\input knuth
\stoptest

\input knuth

\stoptext

Wolfgang


More information about the ntg-context mailing list