startlines with long lines that break and indent
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
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
juh via ntg-context schrieb am 26.12.2021 um 17:36:
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.
Short version: \setuplines [ before={\blank\startnarrow[default=left,left=1cm]}, after={\stopnarrow\blank}, indenting={yes,-1cm}] \showframe[text][text] \starttext before \startlines text \dorecurse{10}{ text} text \dorecurse{40}{ text} text \dorecurse{10}{ text} \stoplines after \stoptext Long version: \definemeasure[Indentation][1cm] \definenarrower [LinesIndentation] [ before=\blank, after=\blank, default=left, left=\measure{Indentation}] \definelines [Poem] [ before=\startLinesIndentation, after=\stopLinesIndentation, indenting={yes,-\measure{Indentation}}] \showframe[text][text] \starttext before \startPoem text \dorecurse{10}{ text} text \dorecurse{40}{ text} text \dorecurse{10}{ text} \stopPoem after \stoptext Wolfgang
participants (3)
-
juh
-
Rik Kabel
-
Wolfgang Schuster