[dev-context] Reversed alignment for left and right

Wolfgang Schuster wolfgang.schuster at gmail.com
Tue Oct 30 18:48:18 CET 2012


Hi Hans,

while for backwards compatibility you won’t change \setupalign[leftt|right] the current implementation makes it possible to change the behavior with a simple change in the code.

\unprotect

\newconstant\c_spec_align_state_method

%\setvalue{\??aligncommand\v!right          }{\c_spac_align_state_horizontal\plustwo  }
%setvalue{\??aligncommand\v!left           }{\c_spac_align_state_horizontal\plusthree}
\setvalue{\??aligncommand\v!right          }{\c_spac_align_state_horizontal\ifcase\c_spec_align_state_method\plustwo\else\plusthree\fi}
\setvalue{\??aligncommand\v!left           }{\c_spac_align_state_horizontal\ifcase\c_spec_align_state_method\plusthree\else\plustwo\fi}

\unexpanded\def\enablereversealignment{\c_spec_align_state_method\plusone}

\protect

%\enablereversealignment

\starttext

\startalignment[left]
\input ward
\stopalignment

\blank

\startalignment[right]
\input ward
\stopalignment

\stoptext

Wolfgang


More information about the dev-context mailing list