ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Poem with long verses
@ 2014-06-21 11:49 Werner Hintze
  2014-06-21 12:29 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Werner Hintze @ 2014-06-21 11:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I can’t figure out how to typeset poems with very long verses. I know 
that I can use the lines environment for verses, but if a verse is long, 
it must be broken and the second line must be indented. It seems that 
the lines environment doesn’t wllow this.

Anayway I would prefer a solution which avoids the lines environment. 
This means I would like to define two commands: \startVerse and 
\stopVerse. But I find no solution.

How can this be realized in Kontext? In LaTeX with memoir it’s really 
easy.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Poem with long verses
  2014-06-21 11:49 Poem with long verses Werner Hintze
@ 2014-06-21 12:29 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2014-06-21 12:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.06.2014 um 13:49 schrieb Werner Hintze <w.hintze@posteo.eu>:

> I can’t figure out how to typeset poems with very long verses. I know that I can use the lines environment for verses, but if a verse is long, it must be broken and the second line must be indented. It seems that the lines environment doesn’t wllow this.
> 
> Anayway I would prefer a solution which avoids the lines environment. This means I would like to define two commands: \startVerse and \stopVerse. But I find no solution.

You can create your own lines environment with the \definelines command. The indentation of the second line can be achieved in two different ways, the first is to indent the whole block on the left side with the \startnarrow command and use a negative paragraph indentation for the first line.


\usemodule[visual]

\definelines
  [verse]
  [before={\startnarrow[left=1em,default=left]},
   after=\stopnarrow,
   indenting={yes,-1em}]

\starttext

\startverse
\fakewords{10}{20}
\fakewords{10}{20}
\fakewords{10}{20}
\stopverse

\stoptext


The second method uses a low level method (context doesn’t provide its own interface for this) to set the \hangafter and \hangindent registers which indents the second line of each entry.

\usemodule[visual]

\define\VerseAlignment
  {\hangafter  = 1  \relax
   \hangindent = 1em\relax}

\definelines[verse][command=\VerseAlignment]

\starttext

\startverse
\fakewords{10}{20}
\fakewords{10}{20}
\fakewords{10}{20}
\stopverse

\stoptext

> How can this be realized in Kontext? In LaTeX with memoir it’s really easy.

It’s ConTeXt with a C.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2014-06-21 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-21 11:49 Poem with long verses Werner Hintze
2014-06-21 12:29 ` Wolfgang Schuster

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