On 2021-12-26 11:36, juh via ntg-context wrote:
Hi all,

I am looking for a way to make startstoplines likes this:


This is a long line
     that breaks,
the second line,
the third line.

So if a line in the poem is too long it shall break and indent.

TIA
juh

You can play with something based on the following, which I made it following suggestions from others. There may well be other ways, but this works for me.

   \define\Poemindent{3em}
   \define\Poeminset{14em}
   \definedelimitedtext[Poe]
   \setupwhitespace[medium]
   \showframe

   \startbuffer[Poem]
      This is a long line that breaks,
      the second line,
      the third line.

      The second stanza starts.
   \stopbuffer

   \setupdelimitedtext[Poe][
      rightmargin=\Poeminset,
      leftmargin={\dimexpr\Poemindent+\Poeminset\relax},
          before={\setuplines[
                       before=,
                    inbetween={\blank[small]},
                        after=,
                   ]
                  \startlines
                  \setupindenting[-\Poemindent,yes]
                  \startparagraph},
           after=\stopparagraph
                 \stoplines,
     ]

   \starttext

   \startparagraph

     Here comes a poem – watch the lines break!

   \stopparagraph

        \startPoe
          \inlinebuffer[Poem]
        \stopPoe

   \startparagraph

     Now, it is gone. Good-bye.

   \stopparagraph

   \stoptext

--
Rik
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to