Florian Grammel schrieb am 09.10.2024 um 13:48:
I have defined a simple environment for verse within prose-context. Obviously I never want the first or last lines of the verses to stand as widows or orphans. I could just add \nobreak to every first and last line of verse to achieve this. But I was wondering whether I could change anything of my \definestartstop to do this automatically. Simply adding \nobreak to before= and after= doesn't work.
1. You example is missing \stopdocument at he end. 2. You can use \dorecurse to place the placeholder text. 3. Use \noindentation to prevent paragraph indentation after an environment, \setupindenting is wrong here because it changes the indentation settings for the whole document. 4. Add "keeptogether=paragraph" to your lines settings. %%%% begin example \definenarrower [VerseIndent] [default={left,right}, before=\blank, after=\blank\noindentation] \definelines [origverse] [before=\startVerseIndent, after=\stopVerseIndent, keeptogether=paragraph] \startdocument \dorecurse{34}{prose\par} \startorigverse vvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvv vvvvvvvvvvvvvvvvvv vvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvv \stoporigverse \dorecurse{38}{prose\par} \startorigverse vvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvv vvvvvvvvvvvvvvvvvv vvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvv \stoporigverse prose \stopdocument %%%% end example Wolfgang