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
On 30-10-2012 18:48, Wolfgang Schuster wrote:
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}
iirr we had something like that in mkii
\unexpanded\def\enablereversealignment{\c_spec_align_state_method\plusone}
so who's helping users who put that in cont-usr.mkiv and have issues
\protect
%\enablereversealignment
\starttext
\startalignment[left] \input ward \stopalignment
\blank
\startalignment[right] \input ward \stopalignment
\stoptext
more generic is: \unprotect \newtoks \t_spac_every_swap_align \appendtoks \setvalue{\??aligncommand\v!right}{\c_spac_align_state_horizontal\plusthree}% \setvalue{\??aligncommand\v!left }{\c_spac_align_state_horizontal\plustwo}% \to \t_spac_every_swap_align \unexpanded\def\enablereversealignment{\the\t_spac_every_swap_align\t_spac_every_swap_align\emptytoks} \protect % \enablereversealignment \starttext \startalignment[left] \input ward \stopalignment \blank \startalignment[right] \input ward \stopalignment \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 30.10.2012 um 19:02 schrieb Hans Hagen
On 30-10-2012 18:48, Wolfgang Schuster wrote:
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}
iirr we had something like that in mkii
I saw the old and new keywords for \setupalign in mkii but never checked what’s their purpose. Because both keywords aren’t used in mkiv I had first the following two lines (before using \enablereversealignment) in my test file: \setvalue{\??aligncommand\v!old }{\c_spec_align_state_method\zerocount} \setvalue{\??aligncommand\v!new }{\c_spec_align_state_method\plusone}
\unexpanded\def\enablereversealignment{\c_spec_align_state_method\plusone}
so who's helping users who put that in cont-usr.mkiv and have issues
How many users do know about this and the other runtime loaded files and use them? Wolfgang
participants (3)
-
Hans Hagen
-
Wolfgang Schuster
-
Wolfgang Schuster