* emp.sty and metapost @ 2006-06-28 4:00 David Arnold 2006-06-28 4:23 ` Aditya Mahajan 0 siblings, 1 reply; 14+ messages in thread From: David Arnold @ 2006-06-28 4:00 UTC (permalink / raw) All, Not strictly a context question, but it has to do with Metapost, so maybe someone can help. I have a file of macros called qdftools.mp: numeric s; s=0.2; color gridlines; gridlines:=(s,s,s); def openbluedot(expr pos)= fill fullcircle scaled 4pt withcolor white; draw fullcircle scaed 4pt withcolor blue; enddef; def openreddot(expr pos)= fill fullcircle scaled 4pt withcolor white; draw fullcircle scaed 4pt withcolor red; enddef; def filledreddot(expr pos)= fill fullcircle scaled 4pt withcolor red; draw fullcircle scaed 4pt withcolor red; enddef; def filledbluedot(expr pos)= fill fullcircle scaled 4pt withcolor blue; draw fullcircle scaed 4pt withcolor blue; enddef; def vtick(expr pos)= draw ((0,-3)--(0,3)) shifted pos; enddef; def htick(expr pos)= draw ((-3,0)--(3,0)) shifted pos; enddef; def gridfivefive = for k=-5u step 1u until 5u: draw (-5u,k)--(5u,k) withcolor gridlines; draw (k,-5u)--(k,5u) withcolor gridlines; endfor; enddef; def xyaxesfivefive= drawdblarrow (-5u,0)--(5u,0); label.rt(btex $x$ etex, (5u,0)); label.bot(btex $5$ etex, (5u,0)); drawdblarrow (0,-5u)--(0,5u); label.top(btex $y$ etex, (0,5u)); label.lft(btex $5$ etex, (0,5u)); enddef; endinput; In the same directory as qdftools.mp, I have a file useemp.tex. Note that I am using the emp package. \documentclass{article} \usepackage{amsmath} \usepackage{emp,ifpdf} \ifpdf \DeclareGraphicsRule{*}{mps}{*}{} \fi \setlength{\unitlength}{1cm} \begin{document} Now is the time for all good men to come to the aid of their country. \empprelude{input qdftools} \begin{empfile} \begin{empdef}[david](4,4) numeric u; 10u=3in; gridfivefive; xyaxesfivefive; \end{empdef} \end{empfile} \immediate\write18{mpost \jobname} \empuse{david} Now is the time for all good men to come to the aid of their country. \end{document} Now, here is what I fail to understand. If I compile useemp.tex with: pdflatex --shell-escape useemp Then all is well. I get a nice pdf file. However, if I change one line in the file useemp.tex, namely \immediate\write18{mpost \jobname} to: \immediate\write18{mpost -tex=latex \jobname} Then if I remove the file qdftools.mpx and compile useemp.tex with: pdflatex --shell-escape useemp Then I get: loading : Context Support Macros / PDF (2004.03.26) )This is MetaPost, Version 0.901 (Web2C 7.5.5) (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't exist. /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command failed: latex mpxerr.tex; see mpxerr.log >> qdftools.mp >> qdftools.mpx ! Unable to make mpx file. l.41 label.rt(btex $x$ etex, (5u,0)); Transcript written on useemp.log. Can anyone tell how to work around this problem? I know Context has much better support for labels, but I need to write this in Latex for our online testing system. http://scinux.redwoods.edu/cgi-bin/ online_s06/testing.cgi/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 4:00 emp.sty and metapost David Arnold @ 2006-06-28 4:23 ` Aditya Mahajan 2006-06-28 6:06 ` David Arnold 0 siblings, 1 reply; 14+ messages in thread From: Aditya Mahajan @ 2006-06-28 4:23 UTC (permalink / raw) On Tue, 27 Jun 2006, David Arnold wrote: > All, > > Not strictly a context question, but it has to do with Metapost, so > maybe someone can help. > > I have a file of macros called qdftools.mp: > > numeric s; s=0.2; > color gridlines; gridlines:=(s,s,s); > > def openbluedot(expr pos)= > fill fullcircle scaled 4pt withcolor white; > draw fullcircle scaed 4pt withcolor blue; > enddef; > > def openreddot(expr pos)= > fill fullcircle scaled 4pt withcolor white; > draw fullcircle scaed 4pt withcolor red; > enddef; > > def filledreddot(expr pos)= > fill fullcircle scaled 4pt withcolor red; > draw fullcircle scaed 4pt withcolor red; > enddef; > > def filledbluedot(expr pos)= > fill fullcircle scaled 4pt withcolor blue; > draw fullcircle scaed 4pt withcolor blue; > enddef; > > def vtick(expr pos)= > draw ((0,-3)--(0,3)) shifted pos; > enddef; > > def htick(expr pos)= > draw ((-3,0)--(3,0)) shifted pos; > enddef; > > def gridfivefive = > for k=-5u step 1u until 5u: > draw (-5u,k)--(5u,k) withcolor gridlines; > draw (k,-5u)--(k,5u) withcolor gridlines; > endfor; > enddef; > > def xyaxesfivefive= > drawdblarrow (-5u,0)--(5u,0); > label.rt(btex $x$ etex, (5u,0)); > label.bot(btex $5$ etex, (5u,0)); > drawdblarrow (0,-5u)--(0,5u); > label.top(btex $y$ etex, (0,5u)); > label.lft(btex $5$ etex, (0,5u)); > enddef; > > endinput; > > In the same directory as qdftools.mp, I have a file useemp.tex. Note > that I am using the emp package. > > \documentclass{article} > \usepackage{amsmath} > \usepackage{emp,ifpdf} > > \ifpdf > \DeclareGraphicsRule{*}{mps}{*}{} > \fi > > \setlength{\unitlength}{1cm} > > \begin{document} > > Now is the time for all good men to come to the aid of their country. > > \empprelude{input qdftools} > > \begin{empfile} > \begin{empdef}[david](4,4) > numeric u; 10u=3in; > gridfivefive; > xyaxesfivefive; > \end{empdef} > \end{empfile} > > \immediate\write18{mpost \jobname} > > \empuse{david} > > Now is the time for all good men to come to the aid of their country. > > \end{document} > > Now, here is what I fail to understand. If I compile useemp.tex with: > > pdflatex --shell-escape useemp > > Then all is well. I get a nice pdf file. > > However, if I change one line in the file useemp.tex, namely > > \immediate\write18{mpost \jobname} > > to: > > \immediate\write18{mpost -tex=latex \jobname} > > Then if I remove the file qdftools.mpx and compile useemp.tex with: > > pdflatex --shell-escape useemp > > Then I get: > > loading : Context Support Macros / PDF (2004.03.26) > )This is MetaPost, Version 0.901 (Web2C 7.5.5) > (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't exist. > /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command > failed: latex mpxerr.tex; see mpxerr.log > > >> qdftools.mp > >> qdftools.mpx > ! Unable to make mpx file. > l.41 label.rt(btex > $x$ etex, (5u,0)); > Transcript written on useemp.log. > > Can anyone tell how to work around this problem? I know Context has > much better support for labels, but I need to write this in Latex for > our online testing system. http://scinux.redwoods.edu/cgi-bin/ > online_s06/testing.cgi/ I have faced this problem in the past, but was never sure why it occured or how to rectify it. Try the command mpost --tex=latex useemp.mp on your shell. Do you get the same error message as before (you should). Now try, makempx --tex=latex useemp.mp useemp.mpx Does this create an mpx file? If it does, then atleast a workaround for the problem is to have \immediate\write18{makempx --tex=latex \jobname.mp \jobname.mpx} before \immediate\write18{mpost --tex=latex \jobname}. If makempx fails, look at the output of makempx --verbose --tex=latex useemp.mp useemp.mpx What do you get? Aditya ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 4:23 ` Aditya Mahajan @ 2006-06-28 6:06 ` David Arnold 2006-06-28 7:07 ` Taco Hoekwater 2006-06-28 14:08 ` Aditya Mahajan 0 siblings, 2 replies; 14+ messages in thread From: David Arnold @ 2006-06-28 6:06 UTC (permalink / raw) Aditya, > I have faced this problem in the past, but was never sure why it > occured or how to rectify it. Try the command > > mpost --tex=latex useemp.mp > > on your shell. Do you get the same error message as before (you > should). Yes, same error message. qdf $ mpost --tex=latex useemp.mp This is MetaPost, Version 0.901 (Web2C 7.5.5) (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't exist. /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command failed: latex mpxerr.tex; see mpxerr.log >> qdftools.mp >> qdftools.mpx ! Unable to make mpx file. l.41 label.rt(btex $x$ etex, (5u,0)); Transcript written on useemp.log. > Now try, > > makempx --tex=latex useemp.mp useemp.mpx > > Does this create an mpx file? qdf $ ls OTqdbpreview.sty dev.qdf sample2.qdf dev.1 dev.tex useemp.mp dev.mp functions.qdf useemp.pdf dev.pdf qdftools.mp useemp.tex qdf $ qdf $ makempx --tex=latex useemp.mp useemp.mpx newer: target file `useemp.mpx' doesn't exist. dvitomp: mpx14741.dvi: No such file or directory mv: rename mpx14741.dvi to mpxerr.dvi: No such file or directory /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command failed: dvitomp mpxerr.dvi useemp.mpx qdf $ ls OTqdbpreview.sty functions.qdf sample2.qdf dev.1 mpx14741.aux useemp.mp dev.mp mpx14741.log useemp.pdf dev.pdf mpx14741.tex useemp.tex dev.qdf mpxerr.log dev.tex qdftools.mp Doesn't look like it. > If it does, then atleast a workaround > for the problem is to have > > \immediate\write18{makempx --tex=latex \jobname.mp \jobname.mpx} > before > \immediate\write18{mpost --tex=latex \jobname}. > > If makempx fails, look at the output of > > makempx --verbose --tex=latex useemp.mp useemp.mpx > > What do you get? qdf $ makempx --verbose --tex=latex useemp.mp useemp.mpx /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Invalid option: --verbose. Try `makempx --help' for more information. qdf $ makempx --help Usage: /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx [- tex|-tex=<program>|-troff] MPFILE MPXFILE. If MPXFILE is older than MPFILE, translate the labels from the MetaPost input file MPFIle to low-level commands in MPXFILE, by running mpto -tex, , and dvitomp by default; or, if -troff is specified, mpto -troff, eqn -Tps -d\$\$ | troff -Tps, and dmp. The current directory is used for writing temporary files. Errors are left in mpxerr.{tex,log,dvi}. If the file named in $MPTEXPRE (mptexpre.tex by default) exists, it is prepended to the output in tex mode. Email bug reports to metapost@tug.org. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 6:06 ` David Arnold @ 2006-06-28 7:07 ` Taco Hoekwater 2006-06-28 7:17 ` Hans Hagen 2006-06-28 15:24 ` David Arnold 2006-06-28 14:08 ` Aditya Mahajan 1 sibling, 2 replies; 14+ messages in thread From: Taco Hoekwater @ 2006-06-28 7:07 UTC (permalink / raw) David Arnold wrote: >> >>makempx --tex=latex useemp.mp useemp.mpx >> >>Does this create an mpx file? What happens if you run the bare command 'latex' on a simple test file? Taco ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 7:07 ` Taco Hoekwater @ 2006-06-28 7:17 ` Hans Hagen 2006-06-28 15:27 ` David Arnold 2006-06-28 15:24 ` David Arnold 1 sibling, 1 reply; 14+ messages in thread From: Hans Hagen @ 2006-06-28 7:17 UTC (permalink / raw) Taco Hoekwater wrote: > David Arnold wrote: > >>> makempx --tex=latex useemp.mp useemp.mpx >>> >>> Does this create an mpx file? >>> > > What happens if you run the bare command 'latex' > on a simple test file? > there's also mptopdf useemp.mp or (more clever): texexec --mpgraphic useemp.mp (latest version) Hans ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 7:17 ` Hans Hagen @ 2006-06-28 15:27 ` David Arnold 0 siblings, 0 replies; 14+ messages in thread From: David Arnold @ 2006-06-28 15:27 UTC (permalink / raw) Hans, On Jun 28, 2006, at 12:17 AM, Hans Hagen wrote: > Taco Hoekwater wrote: >> David Arnold wrote: >> >>>> makempx --tex=latex useemp.mp useemp.mpx >>>> >>>> Does this create an mpx file? >>>> >> >> What happens if you run the bare command 'latex' >> on a simple test file? >> > there's also > > mptopdf useemp.mp qdf $ mptopdf useemp.mp MPtoPDF 1.3.2 : running 'texexec --mptex ' TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 metapost : useemp format : metafun This is MetaPost, Version 0.901 (Web2C 7.5.5) (/usr/local/teTeX/share/texmf.local/web2c/natural.tcx) (useemp.mp (qdftools.mp >> qdftools.mp >> qdftools.mpx ! Unable to make mpx file. l.41 label.rt(btex $x$ etex, (5u,0)); Transcript written on useemp.log. error in metapost run : useemp.mp:41 total run time : 0 seconds warning : use 'texmfstart texexec' instead MPtoPDF 1.3.2 : error while processing mp file > > or (more clever): > > texexec --mpgraphic useemp.mp > > (latest version) qdf $ texexec --mpgraphics useemp.mp TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 fixing engine variable : pdfetex executable : pdfetex format : cont-en inputfile : useemp output : standard interface : en current mode : none TeX run : 1 This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5) (/usr/local/teTeX/share/texmf.local/web2c/natural.tcx) entering extended mode (./useemp.mp ConTeXt ver: 2006.06.23 20:39 fmt: 2006.6.27 int: english mes: english language : language en is active <protectionstate 0> system : cont-new loaded (/usr/local/teTeX/share/texmf.local/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex color : palette rollover is available ) system : cont-old loaded (/usr/local/teTeX/share/texmf.local/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/local/teTeX/share/texmf.local/tex/context/base/cont-fil.tex loading : Context File Synonyms ) system : cont-sys.rme loaded (/usr/local/teTeX/share/texmf.local/tex/context/user/cont-sys.rme (/usr/local/teTeX/share/texmf.local/tex/context/base/type-exa.tex) (/usr/local/teTeX/share/texmf.local/tex/context/base/type-syn.tex) (/usr/local/teTeX/share/texmf.local/tex/context/base/type-enc.tex) (/usr/local/teTeX/share/texmf.local/tex/context/base/type-siz.tex) (/usr/local/teTeX/share/texmf.local/tex/context/base/type-map.tex) (/usr/local/teTeX/share/texmf.local/tex/context/base/type-spe.tex) (/usr/local/teTeX/share/texmf.local/tex/context/base/type-akb.tex)) bodyfont : 12pt rm is loaded language : patterns en->ec:ec->1->2:3 uk->ec:ec->2->2:3 de- >texnansi:tex nansi->3->2:3 de->ec:ec->4->2:3 fr->texnansi:texnansi->5->2:3 fr- >ec:ec->6->2:3 es->ec:ec->7->2:3 pt->texnansi:texnansi->8->2:3 pt->ec:ec->9->2:3 it- >texnansi :texnansi->10->2:3 it->ec:ec->11->2:3 nl->texnansi:texnansi->12->2:3 nl->ec:ec- >13->2:3 cz->il2:il2->14->2:3 cz->ec:ec->15->2:3 sk->il2:il2->16- >2:3 sk->ec:ec ->17->2:3 pl->pl0:pl0->18->2:3 pl->ec:ec->19->2:3 pl->qx:qx->20->2:3 loaded specials : tex,postscript,rokicki loaded system : useemp.top loaded (./useemp.top) systems : system commands are disabled ! Undefined control sequence. l.3 \documentclass [10pt]{article} ? > > Hans > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 7:07 ` Taco Hoekwater 2006-06-28 7:17 ` Hans Hagen @ 2006-06-28 15:24 ` David Arnold 2006-06-28 16:04 ` Taco Hoekwater 1 sibling, 1 reply; 14+ messages in thread From: David Arnold @ 2006-06-28 15:24 UTC (permalink / raw) Taco, Not sure what you mean here, so I ran: latex useemp.tex And got: No file useemp.aux. emp: File useemp.1 not found: emp: Process useemp.mp with MetaPost and then reprocess this file. [1] (./useemp.aux) ) Output written on useemp.dvi (1 page, 400 bytes). Transcript written on useemp.log. On Jun 28, 2006, at 12:07 AM, Taco Hoekwater wrote: > David Arnold wrote: >>> >>> makempx --tex=latex useemp.mp useemp.mpx >>> >>> Does this create an mpx file? > > What happens if you run the bare command 'latex' > on a simple test file? > > Taco > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 15:24 ` David Arnold @ 2006-06-28 16:04 ` Taco Hoekwater 2006-06-28 16:11 ` David Arnold 0 siblings, 1 reply; 14+ messages in thread From: Taco Hoekwater @ 2006-06-28 16:04 UTC (permalink / raw) David Arnold wrote: > Taco, > > Not sure what you mean here, so I ran: > > latex useemp.tex > > And got: > <correct output> And now I am lost as well. Nothing useful in the mpxerr.log, I assume? Taco ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 16:04 ` Taco Hoekwater @ 2006-06-28 16:11 ` David Arnold 2006-06-28 17:40 ` Taco Hoekwater 0 siblings, 1 reply; 14+ messages in thread From: David Arnold @ 2006-06-28 16:11 UTC (permalink / raw) OK. Clean directory. qdf $ ls OTqdbpreview.sty dev.qdf sample2.qdf dev.1 dev.tex useemp.mp dev.mp functions.qdf useemp.pdf dev.pdf qdftools.mp useemp.tex qdf $ useemp.tex: \documentclass{article} \usepackage{amsmath} \usepackage{emp,ifpdf} \ifpdf \DeclareGraphicsRule{*}{mps}{*}{} \fi \setlength{\unitlength}{1cm} \begin{document} Now is the time for all good men to come to the aid of their country. \empprelude{input qdftools} \begin{empfile} \begin{empdef}[david](4,4) numeric u; 10u=3in; gridfivefive; xyaxesfivefive; \end{empdef} \end{empfile} \immediate\write18{mpost -tex=latex \jobname} \empuse{david} Now is the time for all good men to come to the aid of their country. \end{document} qdftools.mp: numeric s; s=0.2; color gridlines; gridlines:=(s,s,s); def openbluedot(expr pos)= fill fullcircle scaled 4pt withcolor white; draw fullcircle scaed 4pt withcolor blue; enddef; def openreddot(expr pos)= fill fullcircle scaled 4pt withcolor white; draw fullcircle scaed 4pt withcolor red; enddef; def filledreddot(expr pos)= fill fullcircle scaled 4pt withcolor red; draw fullcircle scaed 4pt withcolor red; enddef; def filledbluedot(expr pos)= fill fullcircle scaled 4pt withcolor blue; draw fullcircle scaed 4pt withcolor blue; enddef; def vtick(expr pos)= draw ((0,-3)--(0,3)) shifted pos; enddef; def htick(expr pos)= draw ((-3,0)--(3,0)) shifted pos; enddef; def gridfivefive = for k=-5u step 1u until 5u: draw (-5u,k)--(5u,k) withcolor gridlines; draw (k,-5u)--(k,5u) withcolor gridlines; endfor; enddef; def xyaxesfivefive= drawdblarrow (-5u,0)--(5u,0); label.rt(btex $x$ etex, (5u,0)); label.bot(btex $25$ etex, (5u,0)); drawdblarrow (0,-5u)--(0,5u); label.top(btex $y$ etex, (0,5u)); label.lft(btex $5$ etex, (0,5u)); enddef; endinput; Now a run: $ pdflatex --shell-escape useemp.tex ... )This is MetaPost, Version 0.901 (Web2C 7.5.5) (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't exist. /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command failed: latex mpxerr.tex; see mpxerr.log >> qdftools.mp >> qdftools.mpx ! Unable to make mpx file. l.41 label.rt(btex $x$ etex, (5u,0)); Transcript written on useemp.log. emp: File useemp.1 not found: emp: Process useemp.mp with MetaPost and then reprocess this file. [1{/Users/darnold/Library/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./useemp.aux) )</usr/local/teTeX/share/texmf.tetex/fonts/type1/ bluesky/cm/cmr1 0.pfb> Output written on useemp.pdf (1 page, 7947 bytes). Transcript written on useemp.log. Now my directory: qdf $ ls OTqdbpreview.sty functions.qdf useemp.aux dev.1 mpx509.dvi useemp.log dev.mp mpxerr.log useemp.mp dev.pdf mpxerr.tex useemp.pdf dev.qdf qdftools.mp useemp.tex dev.tex sample2.qdf And mpxerr.log: qdf $ cat mpxerr.log This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5) (format=latex 2006.6.27) 28 JUN 2006 09:10 entering extended mode **mpx509.tex (./mpx509.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, d utch, italian, norsk, portuges, spanish, swedish, nohyphenation, loaded. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 12. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 12. [1] [1] [1] [1] ! I can't find file `mpx509.aux'. \enddocument ...makeatletter \input \jobname .aux \fi \@dofilelist \ifdim \f... l.19 \end{document} Please type another input file name ! Emergency stop. \enddocument ...makeatletter \input \jobname .aux \fi \@dofilelist \ifdim \f... l.19 \end{document} *** (job aborted, file error in nonstop mode) Here is how much of TeX's memory you used: 10 strings out of 95138 181 string characters out of 1183036 2045165 words of memory out of 4500000 3256 multiletter control sequences out of 10000+50000 3640 words of font info for 14 fonts, out of 2000000 for 2000 58 hyphenation exceptions out of 5000 18i,2n,12p,76b,66s stack positions out of 5000i,500n,6000p,200000b, 40000s Output written on mpx509.dvi (4 pages, 432 bytes). On Jun 28, 2006, at 9:04 AM, Taco Hoekwater wrote: > David Arnold wrote: >> Taco, >> >> Not sure what you mean here, so I ran: >> >> latex useemp.tex >> >> And got: >> <correct output> > > And now I am lost as well. Nothing useful in the mpxerr.log, I assume? > > Taco > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 16:11 ` David Arnold @ 2006-06-28 17:40 ` Taco Hoekwater 0 siblings, 0 replies; 14+ messages in thread From: Taco Hoekwater @ 2006-06-28 17:40 UTC (permalink / raw) David Arnold wrote: > And mpxerr.log: > > qdf $ cat mpxerr.log > This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5) > (format=latex 2006.6.27) 28 JUN 2006 09:10 > entering extended mode > **mpx509.tex > (./mpx509.tex > LaTeX2e <2003/12/01> > Babel <v3.8d> and hyphenation patterns for american, french, german, > ngerman, d > utch, italian, norsk, portuges, spanish, swedish, nohyphenation, loaded. > LaTeX Font Info: External font `cmex10' loaded for size > (Font) <7> on input line 12. > LaTeX Font Info: External font `cmex10' loaded for size > (Font) <5> on input line 12. > [1] [1] [1] [1] > ! I can't find file `mpx509.aux'. > \enddocument ...makeatletter \input \jobname .aux > \fi \@dofilelist > \ifdim \f... Educated guess: the 'embedded' latex never gets to see \documentclass nor \begin{document}, and therefore it does not write an .aux file. (In case you are wondering: the \end{document} is only there because it is automatically added by makempx). Taco PS Turns out there was something useful in the mpxerr.log after all ;) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 6:06 ` David Arnold 2006-06-28 7:07 ` Taco Hoekwater @ 2006-06-28 14:08 ` Aditya Mahajan 2006-06-28 15:37 ` David Arnold 1 sibling, 1 reply; 14+ messages in thread From: Aditya Mahajan @ 2006-06-28 14:08 UTC (permalink / raw) On Tue, 27 Jun 2006, David Arnold wrote: > Aditya, > > >> I have faced this problem in the past, but was never sure why it >> occured or how to rectify it. Try the command >> >> mpost --tex=latex useemp.mp >> >> on your shell. Do you get the same error message as before (you >> should). > > Yes, same error message. > > qdf $ mpost --tex=latex useemp.mp > This is MetaPost, Version 0.901 (Web2C 7.5.5) > (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't exist. > /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command > failed: latex mpxerr.tex; see mpxerr.log > > >> qdftools.mp > >> qdftools.mpx > ! Unable to make mpx file. > l.41 label.rt(btex > $x$ etex, (5u,0)); > Transcript written on useemp.log. > > >> Now try, >> >> makempx --tex=latex useemp.mp useemp.mpx >> >> Does this create an mpx file? > > qdf $ ls > OTqdbpreview.sty dev.qdf sample2.qdf > dev.1 dev.tex useemp.mp > dev.mp functions.qdf useemp.pdf > dev.pdf qdftools.mp useemp.tex > qdf $ > > qdf $ makempx --tex=latex useemp.mp useemp.mpx > newer: target file `useemp.mpx' doesn't exist. > dvitomp: mpx14741.dvi: No such file or directory > mv: rename mpx14741.dvi to mpxerr.dvi: No such file or directory > /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command > failed: dvitomp mpxerr.dvi useemp.mpx > > qdf $ ls > OTqdbpreview.sty functions.qdf sample2.qdf > dev.1 mpx14741.aux useemp.mp > dev.mp mpx14741.log useemp.pdf > dev.pdf mpx14741.tex useemp.tex > dev.qdf mpxerr.log > dev.tex qdftools.mp > > Doesn't look like it. > >> If it does, then atleast a workaround >> for the problem is to have >> >> \immediate\write18{makempx --tex=latex \jobname.mp \jobname.mpx} >> before >> \immediate\write18{mpost --tex=latex \jobname}. >> >> If makempx fails, look at the output of >> >> makempx --verbose --tex=latex useemp.mp useemp.mpx >> >> What do you get? > > > qdf $ makempx --verbose --tex=latex useemp.mp useemp.mpx > /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Invalid > option: --verbose. > Try `makempx --help' for more information. > > > qdf $ makempx --help > Usage: /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx [- > tex|-tex=<program>|-troff] MPFILE MPXFILE. > If MPXFILE is older than MPFILE, translate the labels from the > MetaPost > input file MPFIle to low-level commands in MPXFILE, by running > mpto -tex, , and dvitomp > by default; or, if -troff is specified, > mpto -troff, eqn -Tps -d\$\$ | troff -Tps, and dmp. > > The current directory is used for writing temporary files. Errors > are > left in mpxerr.{tex,log,dvi}. > > If the file named in $MPTEXPRE (mptexpre.tex by default) exists, > it is > prepended to the output in tex mode. Hmm... the makempx that comes with miktex has --verbose, the one that comes with context standalone does not. So, you seem to have one from context. How about following makempx commands "by hand" that is, mpto useemp.mp This should strip out everything between btex ... etex into some tex commands. If this works, mpto useemp.mp > temp.tex Any non-existing filename instead of "temp" will do. Then do, latex temp.tex dvitomp temp.mp useemp.mpx and if all of these work without any error, do mpost useemp If possible, use Context to create the graphics, i.e. texexec --mptex useemp.mp to get mps files (.1, .2, etc) or texexec --mpgraphic useemp.mp pdf2ps useemp.pdf If however, you need to stick to latex for some reason, you need to figure out what is going wrong with your system. Aditya ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 14:08 ` Aditya Mahajan @ 2006-06-28 15:37 ` David Arnold 2006-06-28 15:47 ` Taco Hoekwater 2006-06-28 18:37 ` Aditya Mahajan 0 siblings, 2 replies; 14+ messages in thread From: David Arnold @ 2006-06-28 15:37 UTC (permalink / raw) Aditya, On Jun 28, 2006, at 7:08 AM, Aditya Mahajan wrote: > On Tue, 27 Jun 2006, David Arnold wrote: > >> Aditya, >> >> >>> I have faced this problem in the past, but was never sure why it >>> occured or how to rectify it. Try the command >>> >>> mpost --tex=latex useemp.mp >>> >>> on your shell. Do you get the same error message as before (you >>> should). >> >> Yes, same error message. >> >> qdf $ mpost --tex=latex useemp.mp >> This is MetaPost, Version 0.901 (Web2C 7.5.5) >> (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't >> exist. >> /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command >> failed: latex mpxerr.tex; see mpxerr.log >> >>>> qdftools.mp >>>> qdftools.mpx >> ! Unable to make mpx file. >> l.41 label.rt(btex >> $x$ etex, (5u,0)); >> Transcript written on useemp.log. >> >> >>> Now try, >>> >>> makempx --tex=latex useemp.mp useemp.mpx >>> >>> Does this create an mpx file? >> >> qdf $ ls >> OTqdbpreview.sty dev.qdf sample2.qdf >> dev.1 dev.tex useemp.mp >> dev.mp functions.qdf useemp.pdf >> dev.pdf qdftools.mp useemp.tex >> qdf $ >> >> qdf $ makempx --tex=latex useemp.mp useemp.mpx >> newer: target file `useemp.mpx' doesn't exist. >> dvitomp: mpx14741.dvi: No such file or directory >> mv: rename mpx14741.dvi to mpxerr.dvi: No such file or directory >> /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command >> failed: dvitomp mpxerr.dvi useemp.mpx >> >> qdf $ ls >> OTqdbpreview.sty functions.qdf sample2.qdf >> dev.1 mpx14741.aux useemp.mp >> dev.mp mpx14741.log useemp.pdf >> dev.pdf mpx14741.tex useemp.tex >> dev.qdf mpxerr.log >> dev.tex qdftools.mp >> >> Doesn't look like it. >> >>> If it does, then atleast a workaround >>> for the problem is to have >>> >>> \immediate\write18{makempx --tex=latex \jobname.mp \jobname.mpx} >>> before >>> \immediate\write18{mpost --tex=latex \jobname}. >>> >>> If makempx fails, look at the output of >>> >>> makempx --verbose --tex=latex useemp.mp useemp.mpx >>> >>> What do you get? >> >> >> qdf $ makempx --verbose --tex=latex useemp.mp useemp.mpx >> /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Invalid >> option: --verbose. >> Try `makempx --help' for more information. >> >> >> qdf $ makempx --help >> Usage: /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx [- >> tex|-tex=<program>|-troff] MPFILE MPXFILE. >> If MPXFILE is older than MPFILE, translate the labels from the >> MetaPost >> input file MPFIle to low-level commands in MPXFILE, by running >> mpto -tex, , and dvitomp >> by default; or, if -troff is specified, >> mpto -troff, eqn -Tps -d\$\$ | troff -Tps, and dmp. >> >> The current directory is used for writing temporary files. Errors >> are >> left in mpxerr.{tex,log,dvi}. >> >> If the file named in $MPTEXPRE (mptexpre.tex by default) exists, >> it is >> prepended to the output in tex mode. > > Hmm... the makempx that comes with miktex has --verbose, the one that > comes with context standalone does not. So, you seem to have one from > context. > > How about following makempx commands "by hand" that is, > > mpto useemp.mp > > This should strip out everything between btex ... etex into some tex > commands. If this works, > > mpto useemp.mp > temp.tex > > Any non-existing filename instead of "temp" will do. Then do, > > latex temp.tex > > dvitomp temp.mp useemp.mpx > > and if all of these work without any error, do > > mpost useemp > > > If possible, use Context to create the graphics, i.e. > > texexec --mptex useemp.mp > > to get mps files (.1, .2, etc) or > > texexec --mpgraphic useemp.mp > pdf2ps useemp.pdf > > If however, you need to stick to latex for some reason, you need to > figure out what is going wrong with your system. > Sorry, none of this works. I think you need to see what useemp.mp looks like. qdf $ cat useemp.mp %%% useemp.mp -- do not edit, generated automatically by useemp.tex verbatimtex \documentclass [10pt]{article} \begin {document} etex; input qdftools; beginfig(1); LaTeX_unitlength := 28.45274pt; w := 4*LaTeX_unitlength; h := 4*LaTeX_unitlength; numeric u; 10u=3in; gridfivefive; xyaxesfivefive; endfig; verbatimtex \end{document} etex; %%% the end. end. endinput; See, there aren't any btex ... etex commands in there. But see the input qdftools? That file looks like this: qdf $ cat qdftools.mp numeric s; s=0.2; color gridlines; gridlines:=(s,s,s); def openbluedot(expr pos)= fill fullcircle scaled 4pt withcolor white; draw fullcircle scaed 4pt withcolor blue; enddef; def openreddot(expr pos)= fill fullcircle scaled 4pt withcolor white; draw fullcircle scaed 4pt withcolor red; enddef; def filledreddot(expr pos)= fill fullcircle scaled 4pt withcolor red; draw fullcircle scaed 4pt withcolor red; enddef; def filledbluedot(expr pos)= fill fullcircle scaled 4pt withcolor blue; draw fullcircle scaed 4pt withcolor blue; enddef; def vtick(expr pos)= draw ((0,-3)--(0,3)) shifted pos; enddef; def htick(expr pos)= draw ((-3,0)--(3,0)) shifted pos; enddef; def gridfivefive = for k=-5u step 1u until 5u: draw (-5u,k)--(5u,k) withcolor gridlines; draw (k,-5u)--(k,5u) withcolor gridlines; endfor; enddef; def xyaxesfivefive= drawdblarrow (-5u,0)--(5u,0); label.rt(btex $x$ etex, (5u,0)); label.bot(btex $25$ etex, (5u,0)); drawdblarrow (0,-5u)--(0,5u); label.top(btex $y$ etex, (0,5u)); label.lft(btex $5$ etex, (0,5u)); enddef; endinput; And that causes the problem. pdflatex --shell-escape useemp.tex ... (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't exist. /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command failed: latex mpxerr.tex; see mpxerr.log >> qdftools.mp >> qdftools.mpx ! Unable to make mpx file. l.41 label.rt(btex $x$ etex, (5u,0)); Transcript written on useemp.log. emp: File useemp.1 not found: emp: Process useemp.mp with MetaPost and then reprocess this file. [1{/Users/darnold/Library/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./useemp.aux) )</usr/local/teTeX/share/texmf.tetex/fonts/type1/ bluesky/cm/cmr1 0.pfb> Output written on useemp.pdf (1 page, 7944 bytes). Transcript written on useemp.log. Now, the strange thing is that everything works if I change mpost - tex=latex \jobname to mpost \jobname in useemp.tex. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 15:37 ` David Arnold @ 2006-06-28 15:47 ` Taco Hoekwater 2006-06-28 18:37 ` Aditya Mahajan 1 sibling, 0 replies; 14+ messages in thread From: Taco Hoekwater @ 2006-06-28 15:47 UTC (permalink / raw) David Arnold wrote: > > Now, the strange thing is that everything works if I change mpost - > tex=latex \jobname to mpost \jobname in useemp.tex. That is why I asked whether the 'latex' command works in the first place. -- Taco ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: emp.sty and metapost 2006-06-28 15:37 ` David Arnold 2006-06-28 15:47 ` Taco Hoekwater @ 2006-06-28 18:37 ` Aditya Mahajan 1 sibling, 0 replies; 14+ messages in thread From: Aditya Mahajan @ 2006-06-28 18:37 UTC (permalink / raw) On Wed, 28 Jun 2006, David Arnold wrote: > Aditya, > > On Jun 28, 2006, at 7:08 AM, Aditya Mahajan wrote: > >> On Tue, 27 Jun 2006, David Arnold wrote: >> >>> Aditya, >>> >>> >>>> I have faced this problem in the past, but was never sure why it >>>> occured or how to rectify it. Try the command >>>> >>>> mpost --tex=latex useemp.mp >>>> >>>> on your shell. Do you get the same error message as before (you >>>> should). >>> >>> Yes, same error message. >>> >>> qdf $ mpost --tex=latex useemp.mp >>> This is MetaPost, Version 0.901 (Web2C 7.5.5) >>> (useemp.mp (qdftools.mpnewer: target file `qdftools.mpx' doesn't >>> exist. >>> /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command >>> failed: latex mpxerr.tex; see mpxerr.log >>> >>>>> qdftools.mp >>>>> qdftools.mpx >>> ! Unable to make mpx file. >>> l.41 label.rt(btex >>> $x$ etex, (5u,0)); >>> Transcript written on useemp.log. >>> >>> >>>> Now try, >>>> >>>> makempx --tex=latex useemp.mp useemp.mpx >>>> >>>> Does this create an mpx file? >>> >>> qdf $ ls >>> OTqdbpreview.sty dev.qdf sample2.qdf >>> dev.1 dev.tex useemp.mp >>> dev.mp functions.qdf useemp.pdf >>> dev.pdf qdftools.mp useemp.tex >>> qdf $ >>> >>> qdf $ makempx --tex=latex useemp.mp useemp.mpx >>> newer: target file `useemp.mpx' doesn't exist. >>> dvitomp: mpx14741.dvi: No such file or directory >>> mv: rename mpx14741.dvi to mpxerr.dvi: No such file or directory >>> /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Command >>> failed: dvitomp mpxerr.dvi useemp.mpx >>> >>> qdf $ ls >>> OTqdbpreview.sty functions.qdf sample2.qdf >>> dev.1 mpx14741.aux useemp.mp >>> dev.mp mpx14741.log useemp.pdf >>> dev.pdf mpx14741.tex useemp.tex >>> dev.qdf mpxerr.log >>> dev.tex qdftools.mp >>> >>> Doesn't look like it. >>> >>>> If it does, then atleast a workaround >>>> for the problem is to have >>>> >>>> \immediate\write18{makempx --tex=latex \jobname.mp \jobname.mpx} >>>> before >>>> \immediate\write18{mpost --tex=latex \jobname}. >>>> >>>> If makempx fails, look at the output of >>>> >>>> makempx --verbose --tex=latex useemp.mp useemp.mpx >>>> >>>> What do you get? >>> >>> >>> qdf $ makempx --verbose --tex=latex useemp.mp useemp.mpx >>> /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx: Invalid >>> option: --verbose. >>> Try `makempx --help' for more information. >>> >>> >>> qdf $ makempx --help >>> Usage: /usr/local/teTeX/bin/powerpc-apple-darwin-current/makempx [- >>> tex|-tex=<program>|-troff] MPFILE MPXFILE. >>> If MPXFILE is older than MPFILE, translate the labels from the >>> MetaPost >>> input file MPFIle to low-level commands in MPXFILE, by running >>> mpto -tex, , and dvitomp >>> by default; or, if -troff is specified, >>> mpto -troff, eqn -Tps -d\$\$ | troff -Tps, and dmp. >>> >>> The current directory is used for writing temporary files. Errors >>> are >>> left in mpxerr.{tex,log,dvi}. >>> >>> If the file named in $MPTEXPRE (mptexpre.tex by default) exists, >>> it is >>> prepended to the output in tex mode. >> >> Hmm... the makempx that comes with miktex has --verbose, the one that >> comes with context standalone does not. So, you seem to have one from >> context. >> >> How about following makempx commands "by hand" that is, >> >> mpto useemp.mp >> >> This should strip out everything between btex ... etex into some tex >> commands. If this works, >> >> mpto useemp.mp > temp.tex >> >> Any non-existing filename instead of "temp" will do. Then do, >> >> latex temp.tex >> >> dvitomp temp.mp useemp.mpx >> >> and if all of these work without any error, do >> >> mpost useemp >> >> >> If possible, use Context to create the graphics, i.e. >> >> texexec --mptex useemp.mp >> >> to get mps files (.1, .2, etc) or >> >> texexec --mpgraphic useemp.mp >> pdf2ps useemp.pdf >> >> If however, you need to stick to latex for some reason, you need to >> figure out what is going wrong with your system. >> > > Sorry, none of this works. I think you need to see what useemp.mp > looks like. > > qdf $ cat useemp.mp > %%% useemp.mp -- do not edit, generated automatically by useemp.tex > verbatimtex > \documentclass [10pt]{article} > \begin {document} > etex; > input qdftools; > beginfig(1); > LaTeX_unitlength := 28.45274pt; > w := 4*LaTeX_unitlength; > h := 4*LaTeX_unitlength; > numeric u; 10u=3in; > gridfivefive; > xyaxesfivefive; > endfig; > verbatimtex > \end{document} > etex; > %%% the end. > end. > endinput; > > See, there aren't any btex ... etex commands in there. But see the > input qdftools? That file looks like this: > > qdf $ cat qdftools.mp > numeric s; s=0.2; > color gridlines; gridlines:=(s,s,s); > > def openbluedot(expr pos)= > fill fullcircle scaled 4pt withcolor white; > draw fullcircle scaed 4pt withcolor blue; > enddef; > > def openreddot(expr pos)= > fill fullcircle scaled 4pt withcolor white; > draw fullcircle scaed 4pt withcolor red; > enddef; > > def filledreddot(expr pos)= > fill fullcircle scaled 4pt withcolor red; > draw fullcircle scaed 4pt withcolor red; > enddef; > > def filledbluedot(expr pos)= > fill fullcircle scaled 4pt withcolor blue; > draw fullcircle scaed 4pt withcolor blue; > enddef; > > def vtick(expr pos)= > draw ((0,-3)--(0,3)) shifted pos; > enddef; > > def htick(expr pos)= > draw ((-3,0)--(3,0)) shifted pos; > enddef; > > def gridfivefive = > for k=-5u step 1u until 5u: > draw (-5u,k)--(5u,k) withcolor gridlines; > draw (k,-5u)--(k,5u) withcolor gridlines; > endfor; > enddef; > > def xyaxesfivefive= > drawdblarrow (-5u,0)--(5u,0); > label.rt(btex $x$ etex, (5u,0)); > label.bot(btex $25$ etex, (5u,0)); > drawdblarrow (0,-5u)--(0,5u); > label.top(btex $y$ etex, (0,5u)); > label.lft(btex $5$ etex, (0,5u)); > enddef; > > endinput; > > And that causes the problem. > Ah. If I understand correctly, adding verbatimtex \documentclass [10pt]{article} \begin {document} etex; in top of qdftools.mp should do the trick. Aditya ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-06-28 18:37 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-06-28 4:00 emp.sty and metapost David Arnold 2006-06-28 4:23 ` Aditya Mahajan 2006-06-28 6:06 ` David Arnold 2006-06-28 7:07 ` Taco Hoekwater 2006-06-28 7:17 ` Hans Hagen 2006-06-28 15:27 ` David Arnold 2006-06-28 15:24 ` David Arnold 2006-06-28 16:04 ` Taco Hoekwater 2006-06-28 16:11 ` David Arnold 2006-06-28 17:40 ` Taco Hoekwater 2006-06-28 14:08 ` Aditya Mahajan 2006-06-28 15:37 ` David Arnold 2006-06-28 15:47 ` Taco Hoekwater 2006-06-28 18:37 ` Aditya Mahajan
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).