Changes

Jump to navigation Jump to search
1,386 bytes added ,  12:06, 10 June 2020
m
no edit summary
<< The basic commands are {{cmd|setupalign}} for the whole document, and {{cmd|startalignment}} for a given block. Additional [[Bugs and workarounds:Category:Command/Alignment|alignment commands list]].
It seems that ''; Warning: ConTeXt uses <tt>flushleft</tt> and <tt>flushright</tt> options. The <tt>right'' </tt> and <tt>left</tt> alignments are ''left'' are swapped backwards from the usual directions in all commands that accept an <tt>align=</tt> alignment option''', in the sense of "ragged left" and "ragged right". Unfortunately, when Hans was first writing this part of ConTeXt, he was thinking of "ragged right" and "ragged left" alignment, rather than "flush left" and "flush right". And now that it's been this way a while, it's impossible to change it, because changing it would break backward compatibility with all of the existing documents that use it.
That's not a bug, but a backward compatibility feature, says Hans.For instance:
Think of <context source="ragged yes" text="produces">\setuppapersize[A5]\startalignment[left]This is some aligned text, with \type{left} alignment.\stopalignment \framed[align=right,width=\textwidth]{Some framed text, with \type{align=right}.}</leftcontext>    <context source="yes" text=" instead of produces"right>\setuppapersize[A5]\startalignment[flushleft]This is some aligned text, with \type{flushleft} alignment.\stopalignment \framed[align=flushright,width=\textwidth]{Some framed text, with \type{align=flushright}.}</context>  Incidentally, note that {{cmd|leftaligned}} and {{cmd|rightaligned}} produce flush-left alignedand flush-right alignment, with <context source="yes" text="producing">\setuppapersize[A5]\leftaligned{This is some \type{leftaligned} text.}\rightaligned{This is some \type{rightaligned} text.}</context> [[Category:Basics]]

Navigation menu