Dear context users: I'd like to handle a block of text with 2 or more lines where the block width should be equal to the longest line in the block. I'd like the lines be center aligned in the block. Something like this: line1 second longerline another line In latex I can do it using parbox like this: \parbox{\widthof{second longerline}}{\centering{}line1\\second longerline\\another line} How can achieve the same or similar in context? Thanks in advance, bcsikos
Csikos Bela mailto:bcsikos425@freemail.hu 28. September 2016 um 23:36 Dear context users:
I'd like to handle a block of text with 2 or more lines where the block width should be equal to the longest line in the block. I'd like the lines be center aligned in the block. Something like this:
line1 second longerline another line
In latex I can do it using parbox like this:
\parbox{\widthof{second longerline}}{\centering{}line1\\second longerline\\another line}
How can achieve the same or similar in context? \starttext
\startframed[align=middle] line\\ second longer line\\ another line \stopframed \stoptext Wolfgang
Wolfgang Schuster írta:
Dear context users:I'd like to handle a block of text with 2 or more lines where the block width should be equalto the longest line in the block. I'd like the lines be center aligned in the block.Something like this: line1second longerline another lineIn latex I can do it using parbox like this:\parbox{\widthof{second longerline}}{\centering{}line1\\second longerline\\another line}How can achieve the same or similar in context?
\starttext
\startframed[align=middle] line\\ second longer line\\ another line \stopframed
\stoptext
Thank you Wolfgang. It works. bcsikos
participants (2)
-
Csikos Bela
-
Wolfgang Schuster