[dev-context] Environments for alignment commands

Hans Hagen pragma at wxs.nl
Tue Oct 30 11:35:37 CET 2012


On 29-10-2012 20:24, Wolfgang Schuster wrote:
> Hi Hans,
>
> can we add the following definitions to space-ali.mkiv
>
> \unexpanded\def\startleftaligned {\doalignline\relax \hss  \bgroup}
> \unexpanded\def\startmidaligned  {\doalignline\hss   \hss  \bgroup}
> \unexpanded\def\startrightaligned{\doalignline\hss   \relax\bgroup}
> \unexpanded\def\startmaxaligned  {\doalignline\relax \relax\bgroup}
>
> \unexpanded\def\stopleftaligned {\unskip\egroup}
> \unexpanded\def\stopmidaligned  {\unskip\egroup}
> \unexpanded\def\stoprightaligned{\unskip\egroup}
> \unexpanded\def\stopmaxaligned  {\unskip\egroup}
>
> The \unskip (would be \removeunwantedspaces better?) because otherwise the space at the end of the text appears in the output:

indeed as it does multiple spaces and some hmode checking

> \startmidaligned
>    Centered?
> \stopmidaligned

\unexpanded\def\startleftaligned {\doalignline\relax \hss 
\bgroup\ignorespaces}
\unexpanded\def\startmidaligned  {\doalignline\hss   \hss 
\bgroup\ignorespaces}
\unexpanded\def\startrightaligned{\doalignline\hss 
\relax\bgroup\ignorespaces}
\unexpanded\def\startmaxaligned  {\doalignline\relax 
\relax\bgroup\ignorespaces}

\unexpanded\def\stopleftaligned {\removeunwantedspaces\egroup}
\unexpanded\def\stopmidaligned  {\removeunwantedspaces\egroup}
\unexpanded\def\stoprightaligned{\removeunwantedspaces\egroup}
\unexpanded\def\stopmaxaligned  {\removeunwantedspaces\egroup}

making a beta now

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------


More information about the dev-context mailing list