[NTG-context] Custom function

Wolfgang Schuster schuster.wolfgang at googlemail.com
Sat Jun 4 09:41:45 CEST 2011


Am 03.06.2011 um 16:50 schrieb Stéphanie Vilayphiou:

> Hello,
> I'm rather new to ConTeXt and would like to simplify my document, in order to simplify processing of documents.
> 
> I have this:
> 
> \defineparagraphs[infos][n=1]
> \setupparagraphs[infos][1][
>    style={\switchtobodyfont[6pt]},
>    %command=????,
>    ]
> 
> \starttext
> 
> \startinfos
>    \smash{\lower22pt\hbox{
>        \margintext[left]{
>            Edition de Trilogie de l'enfer en novembre 2011 chez Sens  Tonka
>    }}}
> \stopinfos
> 
> \input tufte
> \stoptext
> 
> I would like to avoid putting "\inmargin" and "\smash{\lower22pt\hbox{..." by hand and add it directly to the setupparagraphs.
> Can I do such a thing?

\definedescription
  [infos]
  [location=margin,
   command=\groupedcommand{\switchtobodyfont[6pt]}{\endgraf}]

\starttext

\startinfos{Edition de Trilogie de l'enfer en novembre 2011 chez Sens  Tonka}
\input tufte
\stopinfos

\stoptext

Wolfgang




More information about the ntg-context mailing list