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
___________________________________________________________________________________
  • [NTG-context] Luameta... ntg-contextmailingli.expedited080--- via ntg-context

Reply via email to