! error: (nodes): attempt to double-free math_char node 100300, ignored
I have no idea how to transpose the following latex example to context. Also in my opinion the input is wrong, it should be written as \mathtestbase{fb}^{-1} (and this works fine). So I'm only posting this for the case that it indicates some hidden problem in the fontloader. The error I get from the document below is ! error: (nodes): attempt to double-free math_char node 100300, ignored ! ==> Fatal error occurred, no output PDF file produced! The fonts used are [latinmodern-math.otf]:mode=base;script=math;language=DFLT; and STIXTwoText:mode=base;script=latn;language=DFLT; Imho the relevant points to trigger the error are - a math alphabet which uses mode=base - a ligature in this font (fb here) - a following math symbol directly behind the ligature (\int would give an error too). \documentclass{article} \usepackage{unicode-math} \setmathfontface\mathtestbase{STIX Two Text}[Renderer=Basic] \begin{document} $\mathtestbase{fb^{-1}}$ \end{document} -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 4/28/2018 3:11 PM, Ulrike Fischer wrote:
I have no idea how to transpose the following latex example to context. Also in my opinion the input is wrong, it should be written as \mathtestbase{fb}^{-1} (and this works fine).
so what is \mathtestbase doing? (i don't see a fb lig in that font (unless i have the wrong font of course))
So I'm only posting this for the case that it indicates some hidden problem in the fontloader.
The error I get from the document below is
! error: (nodes): attempt to double-free math_char node 100300, ignored ! ==> Fatal error occurred, no output PDF file produced!
The fonts used are
[latinmodern-math.otf]:mode=base;script=math;language=DFLT; and STIXTwoText:mode=base;script=latn;language=DFLT;
Imho the relevant points to trigger the error are - a math alphabet which uses mode=base - a ligature in this font (fb here) - a following math symbol directly behind the ligature (\int would give an error too).
\documentclass{article} \usepackage{unicode-math} \setmathfontface\mathtestbase{STIX Two Text}[Renderer=Basic] \begin{document} $\mathtestbase{fb^{-1}}$ \end{document}
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am Sat, 28 Apr 2018 17:42:17 +0200 schrieb Hans Hagen:
On 4/28/2018 3:11 PM, Ulrike Fischer wrote:
I have no idea how to transpose the following latex example to context. Also in my opinion the input is wrong, it should be written as \mathtestbase{fb}^{-1} (and this works fine).
so what is \mathtestbase doing?
It is a math alphabet. The original error was from a hidden \mathrm.
(i don't see a fb lig in that font (unless i have the wrong font of course))
Ups. I get the error but only with a version which resided in my windows fonts folder. When I force lualatex to use the version in the texmf it disappear. For the faulty font I see in the lua-file: [983055]={ ["boundingbox"]={ 18, -10, 830, 713 }, ["index"]=662, ["name"]="f_b", ["unicode"]={ 102, 98 }, ["width"]=865, }, The font used on my system is c:/Wi ndows/Fonts/STIX2Text-Regular.otf The original bug report (https://github.com/khaledhosny/libertinus/issues/166) mentions also Amiri and Libertinus Serif. With \setmathfontface\mathtestbase{Libertinus Serif}[Renderer=Basic] i get the same error and it too has a f_b ligature: [983076]={ ["boundingbox"]={ 22, -12, 741, 700 }, ["class"]="ligature", ["index"]=2438, ["name"]="f_b", ["unicode"]={ 102, 98 }, ["width"]=778, }, -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 4/28/2018 5:57 PM, Ulrike Fischer wrote:
Libertinus Serif
ok, after some debugging luigi and i found a possible issue with the lig builder part Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am Sat, 28 Apr 2018 21:41:31 +0200 schrieb Hans Hagen:
On 4/28/2018 5:57 PM, Ulrike Fischer wrote:
Libertinus Serif
ok, after some debugging luigi and i found a possible issue with the lig builder part
Ah. Good. Is this an engine or a fontloader issue? While discussion the issue with the unicode-math maintainer the question came up if mathalphabets like \mathrm etc should better use mode=node or mode=base. Do you have recommendation? -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 4/29/2018 2:02 PM, Ulrike Fischer wrote:
Am Sat, 28 Apr 2018 21:41:31 +0200 schrieb Hans Hagen:
On 4/28/2018 5:57 PM, Ulrike Fischer wrote:
Libertinus Serif
ok, after some debugging luigi and i found a possible issue with the lig builder part
Ah. Good. Is this an engine or a fontloader issue?
engine ... a rather old bit of traditional font lig related code
While discussion the issue with the unicode-math maintainer the question came up if mathalphabets like \mathrm etc should better use mode=node or mode=base. Do you have recommendation? not really as i have no clue how he implements math alphabets (context doesn't support such ligatures at all in pure math mode); when wrapped in e.g. an hbox the normal font handlers kicks in so there one can use any mode (i suppose)
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am Mon, 30 Apr 2018 15:49:11 +0200 schrieb Hans Hagen:
While discussion the issue with the unicode-math maintainer the question came up if mathalphabets like \mathrm etc should better use mode=node or mode=base. Do you have recommendation?
not really as i have no clue how he implements math alphabets
Imho like in traditional tex as new math family with \newfam etc.
From the output there is a clear difference, only with base mode one gets ligatures and kerning.
$\mathtestnode{VA fin}$ (node mode: without ligature and kerning) $\mathtestbase{VA fin}$ (base mode: with ligature and kerning) But I'm not sure which output is the typographically sounder one. -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 4/30/2018 4:59 PM, Ulrike Fischer wrote:
Am Mon, 30 Apr 2018 15:49:11 +0200 schrieb Hans Hagen:
While discussion the issue with the unicode-math maintainer the question came up if mathalphabets like \mathrm etc should better use mode=node or mode=base. Do you have recommendation?
not really as i have no clue how he implements math alphabets
Imho like in traditional tex as new math family with \newfam etc.
in that case only base mode will work as there is no callback doing text there (makes no sense)
From the output there is a clear difference, only with base mode one gets ligatures and kerning.
$\mathtestnode{VA fin}$ (node mode: without ligature and kerning)
$\mathtestbase{VA fin}$ (base mode: with ligature and kerning)
But I'm not sure which output is the typographically sounder one. if one needs text in math then using a boxed approach calling some real text fonts makes more sense
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am Mon, 30 Apr 2018 17:45:28 +0200 schrieb Hans Hagen:
if one needs text in math then using a boxed approach calling some real text fonts makes more sense
Yes, I agree. -- Ulrike Fischer http://www.troubleshooting-tex.de/
participants (2)
-
Hans Hagen
-
Ulrike Fischer