Changes

Jump to navigation Jump to search
452 bytes removed ,  16:28, 10 September 2012
m
moved right and left to Right and left: move to Uppercase
< [[Bugs and workarounds]] | [[FAQ]] >
The <tt>right</tt> and <tt>left</tt> alignments are backwards from the usual directions in all commands that accept an <tt>align=</tt> alignment option. For instance,
<texcodecontext source="yes" text="produces">\setuppapersize[A5]
\startalignment[left]
This is some aligned text, with \type{align=left}alignment.
\stopalignment
\startalignmentframed[right]This is some aligned text, with \type{align=right}.\stopalignment</texcode> produces <context>\startalignment[left]This is some aligned text, with \type{alignwidth=left}.\stopalignment \startalignment[righttextwidth]This is some aligned {Some framed text, with \type{align=right}.\stopalignment}
</context>
If you'd rather not try to remember that it's backwards, ConTeXt now supports <tt>flushleft</tt> and <tt>flushright</tt> options, which do exactly the same thing, but in the "correct" direction. Thus:
<texcode>\startalignment[flushleft]This is some aligned context source="yes" text, with \type{align=flushleft}."produces">\stopalignment \startalignmentsetuppapersize[flushrightA5]This is some aligned text, with \type{align=flushright}.\stopalignment</texcode> produces <context>
\startalignment[flushleft]
This is some aligned text, with \type{align=flushleft}alignment.
\stopalignment
\startalignmentframed[align=flushright,width=\textwidth]This is some aligned {Some framed text, with \type{align=flushright}.\stopalignment}
</context>
Incidentally, note that <cmd>leftaligned</cmd> and <cmd>rightaligned</cmd> also produce flush-left and flush-right alignment, with <texcode>\leftaligned{This is some \type{leftaligned} text.}\rightaligned{This is some \type{rightaligned} text.}</texcode> producing
<contextsource="yes" text="producing">\setuppapersize[A5]
\leftaligned{This is some \type{leftaligned} text.}
\rightaligned{This is some \type{rightaligned} text.}
</context>

Navigation menu