[metapost] New numbersystems for the graph package?

Densing Martin (PSI) martin.densing at psi.ch
Sat Feb 16 13:49:22 CET 2019


Dear metapost experts,

Many thanks to the metapost-coders for the introduction of the new numbersystems!

How can we ensure that the new numbersystems work with the existing, very helpful macros that are available with the usual TeX-disitributions? Most relevant would be the graph macros of John Hobby. Hence: Would it be possible to make the graph macros (and all the auxiliary macros, e.g. format etc.) work with all numbersystems?

Example: 

"mpost -numbersystem=decimal test.mp" gives an error on the following file "test.mp", whereas just "mpost test.mp" runs smoothly. Version: MetaPost 2.000 (TeX Live 2017/W32TeX) on MS Windows.

File: test.mp
% 0  1.4
% 1  3.2
% 2  -4.5
% 3  8.0
% 4  9.0
% 5  4.0

% Data-file for graph can be included at beginning of source-file,
% because %<space>0 1.4 etc. is read by gdata marco until empty line

input graph

prologues := 3;
outputtemplate := "%j-%c.mps";

beginfig(1)  
  draw begingraph(10cm,10cm);
    path p;
    gdata("test.mp", $, augment.p(i, scantokens $2););
    gdraw p;
  endgraph;
endfig;

end
-----------------end file

Metapost's log (if numbersystem=decimal):
-----------------------------------------------------------

! Logarithm of -7000.000523787821841175847573036896 has been replaced by 0.
Gipick_->...i=1upto.mlog(xpart.Gmhh_-xpart.Gmll_)/
....

This is just one of several issues, for example the auxiliary "format" macro has also problems with the new numbersystems.

Thank you very much for your help.

Best,
Martin

__________________________________________
Paul Scherrer Institut 
Martin Densing
Schweiz

E-Mail: martin.densing at psi.ch




More information about the metapost mailing list