ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mp-geo Metapost package with ConTeXt
@ 2021-07-14 14:43 Gavin
  2021-07-15 15:48 ` Hans Hagen
  0 siblings, 1 reply; 26+ messages in thread
From: Gavin @ 2021-07-14 14:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

Thanks!
Gavin


Error Log: (This error log below is actually from running Metapost directly on just the .mp file with the metapost code above. This error log is slightly more clear in its formatting than the ConTeXt log, but contains the same information.)

! Text line contains an invalid character.
<scantokens> ^^@
                
<to be read again> 
                   ;
Lecture->...nblec:=scantokens.readfrom.NomFichier;
                                                  for.w=1upto.nblec:if.proje...

Mercator->...((EXPR4));Lecture("Cameriquesud.dat")
                                                  ;Lecture("Ccaraibes.dat");...
l.3 Mercator(3,48,30)
                     ;
? 
! An expression can't begin with `;'.
<inserted text> 
                0
<to be read again> 
                   ;
Lecture->...nblec:=scantokens.readfrom.NomFichier;
                                                  for.w=1upto.nblec:if.proje...

Mercator->...((EXPR4));Lecture("Cameriquesud.dat")
                                                  ;Lecture("Ccaraibes.dat");...
l.3 Mercator(3,48,30)
                     ;


Data file Cameriquesud.dat is pretty short:

16
arborescence&"bresil.dat",vert
arborescence&"uruguay.dat",jaune
arborescence&"paraguay.dat",jaune
arborescence&"bolivie1.dat",bleu
arborescence&"bolivie2.dat",bleu
arborescence&"argentine1.dat",rouge
arborescence&"argentine2.dat",rouge
arborescence&"chili1.dat",violet
arborescence&"chili2.dat",violet
arborescence&"guineef.dat",jaune
arborescence&"surinam.dat",rouge
arborescence&"guyane.dat",orange
arborescence&"venezuela.dat",bleu
arborescence&"colombie.dat",rouge
arborescence&"perou.dat",rose
arborescence&"equateur.dat",jaune

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-10-22 14:27 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 14:43 mp-geo Metapost package with ConTeXt Gavin
2021-07-15 15:48 ` Hans Hagen
2021-07-15 16:22   ` Aditya Mahajan
2021-07-15 17:58     ` Hans Hagen
2021-07-15 20:30       ` Bruce Horrocks
2021-07-16 19:55         ` Hans Hagen
2021-07-17  9:53           ` Bruce Horrocks
2021-07-17 10:20             ` Henning Hraban Ramm
2021-07-17 10:45               ` Hans Hagen
2021-07-17 11:05                 ` Henning Hraban Ramm
2021-10-22  9:31                 ` Henning Hraban Ramm via ntg-context
2021-10-22 13:35                   ` Hans Hagen via ntg-context
2021-10-22 14:16                   ` Henning Hraban Ramm via ntg-context
2021-10-22 14:27                     ` Hans Hagen via ntg-context
2021-07-17 10:53               ` Henning Hraban Ramm
2021-07-17 10:53               ` Hans Hagen
2021-07-17 12:42                 ` Arthur Rosendahl
2021-07-17 18:50                   ` Hans Hagen
2021-07-18 17:36                     ` Henning Hraban Ramm
2021-07-16 16:20       ` Gavin
     [not found]       ` <E1B2010C-A435-46AD-BD8E-F4D930827791@me.com>
2021-07-16 19:51         ` Hans Hagen
2021-07-16 20:08           ` Alan Braslau
2021-07-26 21:29             ` Gavin via ntg-context
2021-07-26 23:01               ` Aditya Mahajan via ntg-context
2021-07-27  6:12                 ` Gavin via ntg-context
2021-07-27  6:29                   ` Alan Braslau via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).