ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \defineparagraphs, \setupparagraphs newbie question
@ 2006-03-09  0:44 frantisek holop
  2006-03-09  8:46 ` Taco Hoekwater
  0 siblings, 1 reply; 4+ messages in thread
From: frantisek holop @ 2006-03-09  0:44 UTC (permalink / raw)


hi there,

i am trying to step a 2 column paragraph

\defineparagraphs
  [poem][n=2]
\setupparagraphs
  [poem][1][width=.4\textwidth]

\startpoem
poemtitle
\poem
\startlines
...
...
\stoplines
\stoppoem



the second column is always in \startlines .. \stoplines

it is not clear to me after reading the manual what are
before, after, inner, or that if these could be used 
for something like this.

-f
-- 
smile, its the second best thing you can do with your lips.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \defineparagraphs, \setupparagraphs newbie question
  2006-03-09  0:44 \defineparagraphs, \setupparagraphs newbie question frantisek holop
@ 2006-03-09  8:46 ` Taco Hoekwater
  2006-03-09 10:18   ` frantisek holop
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2006-03-09  8:46 UTC (permalink / raw)




frantisek holop wrote:
> it is not clear to me after reading the manual what are
> before, after, inner, or that if these could be used 
> for something like this.

To replace the \startlines ... \stoplines you mean? no.
To see what the options do, simply run something like this:

   \defineparagraphs
      [poem][n=2,before=b,after=a,inner=i]

Cheers, Taco

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \defineparagraphs, \setupparagraphs newbie question
  2006-03-09  8:46 ` Taco Hoekwater
@ 2006-03-09 10:18   ` frantisek holop
  2006-03-09 13:02     ` Taco Hoekwater
  0 siblings, 1 reply; 4+ messages in thread
From: frantisek holop @ 2006-03-09 10:18 UTC (permalink / raw)


hmm, on Thu, Mar 09, 2006 at 09:46:28AM +0100, Taco Hoekwater said that
> frantisek holop wrote:
> > it is not clear to me after reading the manual what are
> > before, after, inner, or that if these could be used 
> > for something like this.
> 
> To replace the \startlines ... \stoplines you mean? no.

yes, i should have been clearer :)

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 :)

so there is no way i could set up the 2nd paragraph like that?
maybe a macro or something?


> To see what the options do, simply run something like this:
> 
>    \defineparagraphs
>       [poem][n=2,before=b,after=a,inner=i]

that's a good idea, will play with it :)

-f
-- 
if i die, i forgive you, if i recover, we shall see.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \defineparagraphs, \setupparagraphs newbie question
  2006-03-09 10:18   ` frantisek holop
@ 2006-03-09 13:02     ` Taco Hoekwater
  0 siblings, 0 replies; 4+ messages in thread
From: Taco Hoekwater @ 2006-03-09 13:02 UTC (permalink / raw)




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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-09 13:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-09  0:44 \defineparagraphs, \setupparagraphs newbie question frantisek holop
2006-03-09  8:46 ` Taco Hoekwater
2006-03-09 10:18   ` frantisek holop
2006-03-09 13:02     ` Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).