![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 7/14/2021 4:43 PM, Gavin wrote:
Hello ConTeXters,
I’d like to use the mp-geo Metapost package with ConTeXt to draw simple globes viewed from various directions. The package is here:
https://melusine.eu.org/syracuse/poulecl/mp-geo/
It looks like the last update was 2008 and I don’t read French, so I though my chances of getting anything to work were pretty small. However, I was pleasantly surprised that this MWE found the mp-geo package, the necessary Metapost files in the ConTeXt installation, and the data files.
\starttext \startMPcode input mp-geo; figure(-10u,-10u,10u,10u); Mercator(3,48,30); fin; end \stopMPcode \stoptext
While all of the files were found, it did not produce a globe. Instead I got an error complaining about an invalid character in the data files. This error is repeated for about 20 files (a small fraction of the total). I put the first error and its data file below. All the others are identical with different .dat files.
Maybe it’s just an encoding mismatch or a hidden character I can easily delete or replace. On the other hand, maybe I shouldn't even be attempting this? 2008 is a long time ago in ConTeXt time. Feel free to tell me this project is crazy, but if you have an idea how I can make this work, I’d really appreciate it! It looks like a fun package. Looks interesting (I didn't know about it, also the surface stuff). Anyway, the message relates to scantokens not liking what gets read from a file, quite probably a missing file (I'll make it return a different message but still one needs to be aware of the fact that fiel reading in mp is kind of weird so it really expects a file).
That said, there are some issues that you need to sort out: no btex/etex and no TEX command but textext instead. You could ask the authors. There are indeed funny characters in the files but nothing your bilingual local context user group member Alan couldn't help you with (a good reason to visit him. My french is too rusty (even with some french music running in the background right now.) If you can get that code running it makes a nice article. Hans PS. 2008 is not that old, many context commands date from the 90's ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------