m-graph and the definition of \@@expanded
Hi ConTeXters... I was wondering if the metapost/fun module "m-graph" was still working for everyone. I worked with it a lot last October/November, but haven't had the need to revisit it recently. For those interested, does: texexec --pdf --mode=demo m-graph.tex ....work correctly? (m-graph is from tex/context/base/m-graph.tex, and the data files it expects are in doc/metapost/base/*.d) Am I the only one having problems, or were the syst-* macros changed after 31 October 2002 so as to conflict with something deep inside graph.mp? I get the same problem with both the latest ConTeXt as well as one from ~5 December. It *might* something else I'm trying to debug, but I get the following when trying to \usemodule[graph]: ! Illegal parameter number in definition of \@@expanded. <to be read again> ( <argument> ...fi ; input graph ; vardef Gsetr_@##( suffix $)(expr l, h) = Gcl... \expanded ...\long \xdef \@@expanded {\noexpand #1 }\@@expanded \theMPinclusions ...A {\the \MPinitializations ;}} \writeMPgraphic {} \startwritingMPgraphic ...untime}\theMPinclusions \else \openMPgraphicfile {... \startMPgraphic ...hic {#1}\startwritingMPgraphic \writeMPgraphic {#1}\stopw... ... l.9 \stopMPpage Sorry to bother the list with something so specialist, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Adam Lindsay +44(0)1524 594 537 atl@comp.lancs.ac.uk http://www.comp.lancs.ac.uk/computing/users/atl/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
At 05:19 PM 2/9/2003 +0000, Adam Lindsay wrote:
Hi ConTeXters...
I was wondering if the metapost/fun module "m-graph" was still working for everyone. I worked with it a lot last October/November, but haven't had the need to revisit it recently.
For those interested, does: texexec --pdf --mode=demo m-graph.tex ....work correctly? (m-graph is from tex/context/base/m-graph.tex, and the data files it expects are in doc/metapost/base/*.d)
better run this on a path where the d files are (copied), otherwise you depend on the file searching in kpse, which may not find the d files because the file type is unnknown
Am I the only one having problems, or were the syst-* macros changed after 31 October 2002 so as to conflict with something deep inside graph.mp? I get the same problem with both the latest ConTeXt as well as one from ~5 December.
It *might* something else I'm trying to debug, but I get the following when trying to \usemodule[graph]:
this is a tricky thing go into m-graph.tex and change the # into \# into the inclusions section (in tex #'s are always kind of problematic, esp in expansions and macros) normally this should work ok. This piece of code will be removed in due time, john hobby made this patch and it will be available in future plain mp files. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Thanks again, Hans. I believe Hans Hagen said this around Sun, 9 Feb 2003:
this is a tricky thing
go into m-graph.tex and change the # into \# into the inclusions section
(in tex #'s are always kind of problematic, esp in expansions and macros)
Now the key definition is: \appendtoks % @# is X_ or Y_; $ is Gxcvlin_ or Gycvlin_; l and h are numeric or string % It would not be OK to set (@#low,@#high) to a pair expression because $ might % try to rescale @#low when evaluating the right-hand side for @#high. vardef Gsetr_@\#(suffix $)(expr l, h) = Gclbnds_@\# ; if @\#ctyp>0 : @\#low = if abs @\#ctyp<>log: $ fi Mlog_Str l ; @\#high = if abs @\#ctyp<>log: $ fi Mlog_Str h ; else : -@\#high = if abs @\#ctyp<>log: $ fi Mlog_Str l ; -@\#low = if abs @\#ctyp<>log: $ fi Mlog_Str h ; fi enddef ; \to \MPinitializations Which works on at least one machine. The other one where I'm rebuilding my tex installation (long story) with the new tetex binaries is still coming up with blank MPpages, but I'm 95% sure that's a different issue.
normally this should work ok. This piece of code will be removed in due time, john hobby made this patch and it will be available in future plain mp files.
Right. Thanks for clarifying it and reminding me where the code stands. adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Adam Lindsay +44(0)1524 594 537 atl@comp.lancs.ac.uk http://www.comp.lancs.ac.uk/computing/users/atl/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
participants (2)
-
Adam Lindsay
-
Hans Hagen