\crlf breaks alignment inheritance
Hello there! I've found a problem with the latest ConTeXt, but I guess it's been present for a while. See the following example: %%%% cut here %%%% \starttext \startalignment[middle,nothyphenated,nothanging,stretch] centered \startalignment[hyphenated] this is centered. No problem \stopalignment \startalignment[hyphenated] Why this is not centered?\crlf Becaouse of the \textbackslash crlf \stopalignment \startalignment[hyphenated, middle] this is centered. \crlf No problem \stopalignment centered \stopalignment regular \stoptext %%%% cut here %%%% Best wishes -- Marco
Wolfgang Schuster
So what's the correct way to force a line break without starting a new paragraph, like \\ in LaTeX? Maybe the paragraph is marked also by more spacing, and that particular linebreak is not meant to be a paragraph ending. Like, e.g., for poems. And I believed the \crlf was the correct way to do it. Please correct me if I'm wrong. In the example I provided, I can't break the line without starting a new paragraph and without messing it, unless I reset the "middle" in the nested alignment. So I believe there's something in the inheritance that breaks. Bests -- Marco
Am 26.05.2011 um 16:02 schrieb Marco Pessotto:
To suppress whitespace between paragraph you can use the packed environment. For poems i suggest to use the lines environment where the end of each line is also the end of a paragraph, you can also change the alignment of the content with the align key of the environment, e.g. \startlines[align=middle] … \stoplines or change the settings global (i.e. \setuplines[align=middle]). Wolfgang
Am 26.05.2011 um 16:02 schrieb Marco Pessotto:
The “middle” is necessary because \crlf use a flag insert \hfill at the end of the line where it was put when you have left aligned text. This flag is reset with \setupalign and also \startalignment and the command thinks you have left aligned text unless you add the “middle” keyword and \crlf does now know that it shouldn’t insert \hfill. With a new paragraph this doesn’t happen and you get always the correct output. Wolfgang
participants (2)
-
Marco Pessotto
-
Wolfgang Schuster