From: Jean-Philippe Rey <jean-philippe.rey@centralesupelec.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: LMTX, mathcases and noalign
Date: Fri, 13 Nov 2020 16:21:40 +0100 [thread overview]
Message-ID: <B56D0711-15A7-4CBF-BE7E-B2C89CFC6969@centralesupelec.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]
Dear list,
I am trying to switch from MKIV to LMTX. I've just found a discrepancy with the following code which puts space between two lines in a math alignment. This minimum breaking example uses \startcases, but the same problem arises with other alignment macros.
\starttext
\startformula
\startcases
\NC 1 \NC if not null \NR
\noalign{\vskip2ex}
\NC 0 \NC if null \NR
\stopcases
\stopformula
\stoptext
This snippet works fine with MKIV but breaks in LMTX (see attached log file). Is this a bug in LMTX or is there another way to insert space between two lines?
I've already tried different other solutions, but none seems really appropriate:
- \intertext produces a vertical space of at least 3 lines and I haven't been able to make it smaller;
- adding an empty line (\NC \NR) produces a smaller space but I am unable to reduce its height below a minimum value (roughly a line);
- adding a \vrule to the above or below line works fine but it needs some calculation depending on the content of the line.
Thank you for your help,
--
Jean-Philippe Rey
jean-philippe.rey@centralesupelec.fr
91192 Gif-sur-Yvette Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
[-- Attachment #2: noalign-mfe.log --]
[-- Type: application/octet-stream, Size: 1797 bytes --]
open source > level 1, order 1, name 'cont-yes.mkiv'
system >
system > ConTeXt ver: 2020.11.08 12:42 LMTX fmt: 2020.11.13 int: english/english
system >
system > 'cont-new.mkiv' loaded
open source > level 2, order 2, name '/Users/jprey/Applications/ConTeXt/2020-11-09/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system > beware: some patches loaded from cont-new.mkiv
close source > level 2, order 2, name '/Users/jprey/Applications/ConTeXt/2020-11-09/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system > files > jobname 'noalign-mfe', input './noalign-mfe', result 'noalign-mfe'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
open source > level 2, order 3, name './noalign-mfe.tex'
fonts > preloading latin modern fonts (second stage)
fonts > 'fallback modern-designsize rm 12pt' is loaded
tex error > tex error on line 5 in file ./noalign-mfe.tex: Misplaced \crcr
<macro> \math_cases_NR [#1][#2]->\strc_formulas_place_number_nested {#1}{#2}\crcr
<macro> \dodirectdoubleempty ...\expandafter \syst_helpers_direct_double_empty_one_yes \else \expandafter \syst_helpers_direct_double_empty_one_nop \fi #1
#2
<template> \stopimath
\endtemplate
<line 4.5> \noalign
{\vskip2ex}
1 \starttext
2 \startformula
3 \startcases
4 \NC 1 \NC if not null \NR
5 >> \noalign{\vskip2ex}
6 \NC 0 \NC if null \NR
7 \stopcases
8 \stopformula
9 \stoptext
10
I can't figure out why you would want to use a tab mark or \cr or \span just
now. If something like a right brace up above has ended a previous alignment
prematurely, you're probably due for more error messages.
[-- Attachment #3: noalign-mfe-error.log --]
[-- Type: application/octet-stream, Size: 790 bytes --]
return {
["errortype"]=0,
["filename"]="./noalign-mfe.tex",
["lastcontext"]="\n<macro> \\math_cases_NR [#1][#2]->\\strc_formulas_place_number_nested {#1}{#2}\\crcr \n \n<macro> \\dodirectdoubleempty ...\\expandafter \\syst_helpers_direct_double_empty_one_yes \\else \\expandafter \\syst_helpers_direct_double_empty_one_nop \\fi #1\n #2\n<template> \\stopimath \n \\endtemplate \n\n<line 4.5> \\noalign\n {\\vskip2ex}",
["lastluaerror"]="?",
["lasttexerror"]="Misplaced \\crcr",
["lasttexhelp"]="I can't figure out why you would want to use a tab mark or \\cr or \\span just\nnow. If something like a right brace up above has ended a previous alignment\nprematurely, you're probably due for more error messages.",
["linenumber"]=5,
["offset"]=10,
["skiplinenumber"]=5,
}
[-- Attachment #4: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2020-11-13 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 15:21 Jean-Philippe Rey [this message]
2020-11-13 16:06 ` Hans Hagen
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=B56D0711-15A7-4CBF-BE7E-B2C89CFC6969@centralesupelec.fr \
--to=jean-philippe.rey@centralesupelec.fr \
--cc=ntg-context@ntg.nl \
/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).