seyal.zav...@gmail.com schrieb am 23.05.2024 um 18:59:
Thanks so much

but what should a person do if he wants to define an equivalent of \eTD?
for example it can be useful for RTL language
such as:
\def\پسل{\eTD}
and as you said this code will not work.

You can create your own replacement for the \bTD ... \eTD pair define a command which is delimited by another command. To do this you have to first create a new command like always as \def\... which takes a single argument and at the end after the argument you another command is used as delimiter for the argument.

The argument of your new delimited command is then passed to the normal commands for the table cell.

%%%% begin example
\starttext

\protected\def\StartTableCell#1\StopTableCell
  {\bTD#1\eTD}

% New method to create delimited arguments with #L and #R in Luametatex
%
% \protected\def\StartTableCell#L\StartTableCell#R\StopTableCell#1%
%   {\bTD#1\eTD}

\bTABLE
  \bTR
    \StartTableCell row 1 column 1 \StopTableCell
    \StartTableCell row 1 column 2 \StopTableCell
  \eTR
  \bTR
    \StartTableCell row 2 column 1 \StopTableCell
    \StartTableCell row 2 column 2 \StopTableCell
  \eTR
\eTABLE

\stoptext
%%% end example

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to