ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	seyal.zavira@gmail.com
Subject: [NTG-context] Re: simplify side by side Poems
Date: Thu, 23 May 2024 22:44:07 +0200	[thread overview]
Message-ID: <06f1229c-9888-b87e-a539-5c2a42481518@gmail.com> (raw)
In-Reply-To: <171648358238.1996.5373369933816158444@cgl.ntg.nl>

seyal.zavira@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	other threads:[~2024-05-23 20:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 12:13 [NTG-context] " seyal.zavira
2024-05-23 12:32 ` [NTG-context] " Wolfgang Schuster
2024-05-23 16:59   ` seyal.zavira
2024-05-23 20:44     ` Wolfgang Schuster [this message]
2024-05-25  6:40       ` seyal.zavira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06f1229c-9888-b87e-a539-5c2a42481518@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=seyal.zavira@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).