[NTG-context] \defineparagraphs, \setupparagraphs newbie question
Taco Hoekwater
taco at elvenkind.com
Thu Mar 9 14:02:30 CET 2006
frantisek holop wrote:
>
> as the style is always the same and i am lazy, i want to save myself
> the typing of \startlines and \stoplines for the second column :)
Understandable ;-)
Some extra magic is needed (newlines are rather special). The
following bit of code seems to work on a simple case,
but i give no guarantees:
%
\defineparagraphs
[Poem][n=2]
\setupparagraphs
[Poem][1][width=.4\textwidth]
\def\startpoem#1\poem
{\def\poemtitle{#1}\begingroup\obeylines\domypoem}
\def\domypoem#1\stoppoem
{\endgroup\startPoem\poemtitle\Poem\startlines #1\stoplines\stopPoem}
\starttext
\startpoem
poemtitle
\poem
...
...
\stoppoem
\stoptext
% EOF
Cheers, Taco
More information about the ntg-context
mailing list