Re: Rechnen in LaTeX

Ulrike Fischer <[email protected]>
Newsgroups gmane.comp.tex.german
Message-ID <[email protected]>
Am Wed, 18 Dec 2024 15:35:50 +0100 schrieb Reinhard Kotucha:

>  > soweit ich weiß, verhalten die sich aber in LaTeX anders als in ConTeXt.
> 
> \dimexpr und \numexpr sind Primitive und sollten sich überall gleich
> verhalten.

Tun sie aber leider nicht. In pdflatex und luatex beendet ein
Semikolon einen \numexpr-Ausdruck

\the\numexpr 2+3;x  druckt 5;x

In context (luametatex) wird das Semikolon als modulo operator
interpretiert und \the\numexpr 2+3;x gibt einen Fehler und z.B.
\numexpr 1+2;3+4 berechnet 7  (1 +2%3 + 4 = 7)

Siehe auch https://github.com/latex3/latex3/issues/1518 (wobei es
jetzt möglicherweise eine Option in luametatex gibt um das
abzuschalten).

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

-- 
FAQ: http://texfragen.de/
Durchsuchbares Archiv: https://www.listserv.dfn.de/sympa/arc/tex-d-l 
Unsubscribe/Verwaltung: https://www.listserv.dfn.de/sympa/info/tex-d-l
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.