From: "ntg-contextmailingli.expedited080--- via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: ntg-contextmailingli.expedited080@passmail.net
Subject: [NTG-context] Luametatex: nesting alignments in display math formulas
Date: Sun, 10 Nov 2024 01:36:05 +0000 [thread overview]
Message-ID: <173120257249.7.16300920326366444527.490070076@passmail.net> (raw)
I'm test driving luametatex. My needs usually extend to expressing formulas in TLA+ using nested display math formulas. Although I have suitable templates for doing this in Mark IV, I can't reproduce these satisfactorily in luametatex. For example, here's a formula from Leslie Lamport's 2006 "Lower Bounds for Asynchronous Consensus":
~~~~~~~~~~~ transitive_reduction.tex ~~~~~~~~~~~~~
\define\lbr {\lbrace \mkern 0.9mu}
\define\rbr {{}\mkern 0.9mu \rbrace}
\define\∀ {∀\mkern1mu}
\define\∃ {∃\mkern2mu}
\startdocument
\startplaceformula
\startformula [split=yes, align=flushleft, margin=standard, interlinespace=1ex]
\bgroup \setupinterlinespace [line=1ex]
\startalign [n=1, align={left,left}]
\NC \text{\it TransitiveClosure}(R) ≜
\NR
\NC \quad
\bgroup \setupinterlinespace [line=1ex]
\startalign [n=2, align={left,left,left}, location=top]
\NC \text{\sc let} \quad
\NC \bgroup \setupinterlinespace [line=1ex]
\startalign [n=1, align={left,left}, location=top]
\NC \text{\it Dom} ≜ \lbr r[1]: r ∈ R \rbr
\NR
\NC \text{\it Rng} ≜ \lbr r[2]: r ∈ R \rbr
\NR
\NC \text{\it TC}[i ∈ ℕ] ≜
\NR
\NC \quad
\bgroup \setupinterlinespace [line=1ex]
\startalign [n=1, align={left,left}, location=top]
\NC \text{\sc if}\ i = 0\
\bgroup \setupinterlinespace [line=1ex]
\startalign [n=2, align={left,left,left}, location=top]
\NC \text{\sc then}\
\NC R
\NR
\NC \text{\sc else}\
\NC
\bgroup \setupinterlinespace [line=1ex]
\startalign [n=1, align={left,left}, location=top]
\NC \lbr
〈d, e 〉∈ \text{\it Dom} × \text{\it Rng}:
\NR
\NC \quad \∃ c ∈ \text{\it Dom} ∩ \text{\it Rng}:
\bgroup \setupinterlinespace [line=1ex]
\startalign [n=1, align={left,left}, location=top]
\NC ∧ 〈d, c〉∈ \text{\it TC}[i-1]
\NR
\NC ∧ 〈c, e〉∈ R \,\rbr
\NR
\stopalign \egroup
\NR
\stopalign \egroup
\NR
\stopalign \egroup
\NR
\stopalign \egroup
\NR
\stopalign \egroup
\NR
\NC \text{\sc in}\
\NC \text{\sc union}\ \lbr \text{\it TC}[i] : i ∈ ℕ \rbr
\NR
\stopalign \egroup
\NR
\stopalign \egroup \stopformula \stopplaceformula
\stopdocument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The command
$ context --luatex transitive_reduction.tex
produces the desired result, but
$ context transitive_reduction.tex
rejects the alignments and centers the lines instead. Can anyone suggest how I might adapt such nesting of alignments to luametatex?
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2024-11-10 1:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-10 1:36 ntg-contextmailingli.expedited080--- via ntg-context [this message]
2024-11-10 8:20 ` [NTG-context] " Mikael Sundqvist
2024-11-10 15:24 ` ntg-contextmailingli.expedited080--- via ntg-context
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=173120257249.7.16300920326366444527.490070076@passmail.net \
--to=ntg-context@ntg.nl \
--cc=ntg-contextmailingli.expedited080@passmail.net \
/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).