1%D \module 2%D [ file=core-ali, 3%D version=2023.06.15, 4%D title=\CONTEXT\ Table Macros, 5%D subtitle=Text Simple Alignment, 6%D author=Hans Hagen, 7%D date=\currentdate, 8%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] 9%C 10%C This module is part of the \CONTEXT\ macro||package and is 11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 12%C details. 13 14\writestatus{loading}{ConTeXt Table Macros / Alignment} 15 16%D This module is for Bruce Horrocks (and a follow up on a chat session). Watch out, 17%D when a shift results in a newline we get oscillation! 18 19\unprotect 20 21\newinteger \c_align_point_index 22\newdimension\d_align_point_delta 23 24\registerctxluafile{tabl-ali}{autosuffix} 25 26\permanent\protected\def\ap[#1]% 27 {\ifchknum#1\or 28 \dontleavehmode 29 \global\advanceby\c_align_point_index\plusone 30 \d_align_point_delta\clf_align_point_delta{#1}\c_align_point_index 31 \xypos{ap::\number#1:\the\c_align_point_index}% 32 \hkern\d_align_point_delta 33 \fi} 34 35\protect \endinput 36 37% \starttext 38% \dostepwiserecurse{10}{10000}{10}{ 39% \ap[1]{\bf\darkred 1} test test \ap[2]{\bf\darkblue 2} test #1.#1 \ap[3]{\bf \darkgreen 3} test \par 40% test #1.#1 \ap[1]{\bf\darkred 1} test #1.#1 test \ap[2]{\bf\darkblue 2} test \ap[3]{\bf \darkgreen 3} test #1.#1 \par 41% } 42% \stoptext 43 44 |