lualatex / luamplib

generic TeX package - including MetaPost code in LuaTeX documents
http://ctan.org/pkg/luamplib
16 stars 11 forks source link

Numbersystem values: "decimal" and "binary" not recognized #49

Closed franckpastor closed 9 years ago

franckpastor commented 9 years ago

Hello,

There are two new values (besides "scaled" and "double") to the numbersystem option of the mpost program (the one to be found in TeX Live 2014): "binary" and "decimal" (see its manual, p. 77). However it seems that they are not supported by luamplib yet: the following program gives a segmentation fault with decimal, and seems to revert to the double value when given the option binary:

\documentclass[12pt]{scrartcl}
\usepackage{unicode-math}
\usepackage{luamplib}
  \mplibsetformat{metafun}
  \mplibnumbersystem{decimal}% resp. binary, scaled, double…
\begin{document}
\begin{mplibcode}
    beginfig(0);
        label(decimal(1e20),origin);
    endfig;
\end{mplibcode}
 \end{document}

Would it be possible for the \mplibnumbersystem command to accept these new options?

Thanks in advance,

Franck Pastor

phi-gamma commented 9 years ago

The segfault is a Luatex bug. I’ve opened a tracker item:

http://tracker.luatex.org/view.php?id=921
phi-gamma commented 9 years ago

The segfault was fixed upstream.

dohyunkim commented 9 years ago

Thanks a lot @phi-gamma. Using newly compiled luatex engine, the result of MWE above is

1E+20

with decimal number system, and

100000000000000000000

with binary number system. So it seems to work OK now. Closing the issue.

franckpastor commented 9 years ago

Thank you both!