You may have hit a problem I had which is that you need to tell mpost what Tex to call. In my case I have my command line program incorporate the following line setenv TEX texexec before starting mpost label("aa",origin); is controlled by mpost alone whereas label(btex aa etex,(0,0)) ; calls TEX to make the space for the characters You may also need some verbatim code at the beginning of the file to set the fontsize etc. I don't know whether there is also a need to enable \write18 in this case I have it permanently enabled. To do this; Edit /usr/local/teTeX/texmf.cnf and set shell_escape = t %rather than f I hope this helps -- Nigel
From: Laurent Chéno
Reply-To: ntg-context@ntg.nl Date: Wed, 21 May 2003 22:21:09 +0200 To: ntg-context@ntg.nl Subject: [NTG-context] Metapost calling TeX (ConTeXt) (please excuse my poor english)
I'm using ConTeXt with the distribution of teTeX by Gerben Wierda (with iInstaller) under MacOS X (10.2.6). Version of texmf.ii2 : 2003/04/15 12:03:57
This works perfectly :
\starttext \startMPpage label("aa",(0,0)) ; draw fullcircle scaled 3cm ; \stopMPpage \stoptext \end
But this don't work :
\starttext \startMPpage label(btex aa etex,(0,0)) ; draw fullcircle scaled 3cm ; \stopMPpage \stoptext \end
Who can help me ?
Thank in advance,
Laurent
------------------------------------------------------------------------ -------- --- mpgraph.mpx produced :
% Written by DVItoMP, Version 0.64 (Web2C 7.4.5) begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; string _n[]; vardef _s(expr _t,_f,_m,_x,_y)= addto _p also _t infont _f scaled _m shifted (_x,_y); enddef; _n0="cmr12"; _s("aa",_n0,1.00000,0.0000,0.0000); setbounds _p to (0,0.0000)--(11.7060,0.0000)-- (11.7060,5.1474)--(0,5.1474)--cycle; _p endgroup mpxbreak
------------------------------------------------------------------------ -------- --- mpgraph.mp produced :
% collected graphics of job "test" mpgraph:=1; randomseed := 3705; if unknown context_tool : input mp-tool ; fi ; if unknown context_spec : input mp-spec ; fi ; if unknown context_grph : input mp-grph ; fi ; defaultfont := "cmr10" ; defaultscale := 12.0pt/10pt ; graphictextformat := "context" ; graphictextdirective "\global \loadfontfileoncetrue " ; string contextversion ; contextversion := "2003.1.31" ; if not known _data_prefix_ : string _data_prefix_ , _data_suffix_ ; fi ; _data_prefix_ := "mpd-" ; _data_suffix_ := ".mpd" ; boolean collapse_data ; collapse_data := true ; _data_suffix_ := ".mpd" ; cmykcolors := true ; spotcolors := true ; color OverlayColor, OverlayLineColor ; OverlayWidth := 426.78743pt ; OverlayHeight := 597.51323pt ; OverlayDepth := 597.51323pt ; OverlayColor := (0,0,0) ; OverlayLineWidth := 0pt; OverlayLineColor := (0,0,0) ; BaseLineSkip := 14.46669pt; LineHeight := 14.46669pt; BodyFontSize := 12.0pt; TopSkip := 12.0pt; StrutHeight := 10.41603pt; StrutDepth := 4.05064pt; CurrentWidth := 426.78743pt; CurrentHeight := 597.51323pt; EmWidth := 11.74988pt; ExHeight := 5.16667pt; PageNumber := 1; RealPageNumber := 1; LastPageNumber := 1; prologues := 2; if unknown context_page : input mp-page ; fi ; boolean PageStateAvailable, OnRightPage, InPageBody ; PageStateAvailable := OnRightPage := true ; InPageBody := false ; def LoadPageState = OnRightPage := true; RealPageNumber := 1; PageNumber := 1; NOfPages := 1; PaperHeight := 845.04684pt; PaperWidth := 597.50787pt; PrintPaperHeight := 845.04684pt; PrintPaperWidth := 597.50787pt; TopSpace := 71.12546pt; BottomSpace := 62.60228pt; BackSpace := 71.13275pt; CutSpace := 99.58769pt; MakeupHeight := 711.3191pt; MakeupWidth := 426.78743pt; TopHeight := 0.0pt; TopDistance := 0.0pt; HeaderHeight := 56.90294pt; HeaderDistance := 0.0pt; TextHeight := 597.51323pt; FooterDistance := 0.0pt; FooterHeight := 56.90294pt; BottomDistance := 0.0pt; BottomHeight := 0.0pt; LeftEdgeWidth := 0.0pt; LeftEdgeDistance := 0.0pt; LeftMarginWidth := 75.58197pt; LeftMarginDistance := 11.99829pt; TextWidth := 426.78743pt; RightMarginDistance := 11.99829pt; RightMarginWidth := 75.58197pt; RightEdgeDistance := 0.0pt; RightEdgeWidth := 0.0pt; InnerMarginDistance := 11.99829pt; InnerMarginWidth := 75.58197pt; OuterMarginDistance := 11.99829pt; OuterMarginWidth := 75.58197pt; InnerEdgeDistance := 0.0pt; InnerEdgeWidth := 0.0pt; OuterEdgeDistance := 0.0pt; OuterEdgeWidth := 0.0pt; PageOffset := 0.0pt; PageDepth := 0.0pt; enddef ; ResetTextAreas ; SaveTextAreas ; ResetTextAreas ; if unknown context_core : input mp-core.mp ; fi ; local_multi_par_area:=false; ;; verbatimtex \global \loadfontfileoncetrue etex; let mprunend = end ; beginfig(1); label(btex aa etex ,(0,0)) ; draw fullcircle scaled 3cm ; endfig; let end = mprunend ; end.
------------------------------------------------------------------------ -------- --- test.log produced
This is pdfeTeX, Version 3.14159-1.10b-2.1 (Web2C 7.4.5) (format=cont-en 2003.4.29) 21 MAY 2003 11:24 entering extended mode **&cont-en test.tex (./test.tex{/usr/local/teTeX/share/texmf.local/pdftex/config/pdftex.cfg}
ConTeXt ver: 2003.1.31 fmt: 2003.4.29 int: english mes: english
language : language en is active
system : cont-new loaded (/usr/local/teTeX/share/texmf.tetex/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex! system (E-TEX) : [line 726] \ifcsname ) system : cont-old loaded (/usr/local/teTeX/share/texmf.tetex/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/local/teTeX/share/texmf.tetex/tex/context/base/cont-fil.tex loading : Context File Synonyms ) bodyfont : 12pt rm is loaded language : patterns 2:2-en-2 3:2-uk-2 4:2-de-2 5:2-fr-2 6:2-es-2 7:2-it-2 8:2-nl-2 loaded specials : tex,postscript,rokicki loaded \openout2 = `test.tui'. system : test.top loaded (./test.top specials : loading definition file tpd (/usr/local/teTeX/share/texmf.tetex/tex/context/base/spec-tpd.tex specials : loading definition file fdf (/usr/local/teTeX/share/texmf.tetex/tex/context/base/spec-fdf.tex
system (E-TEX) : [line 1815] \ifcsname ) specials : fdf loaded ) specials : fdf,tpd loaded ) \openout0 = `mpgraph.mp'. \openout0 = `mprun.mp'.
\openout0 = `mpgraph.mp'.
\openout0 = `mprun.mp'.
pdftex : needs map file: original-context-symbol.map pdftex : needs map file: pl0-ams-cmr.map pdftex : needs map file: original-vogel-symbol.map (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) systems : begin file test at line 1 \openout5 = `mpgraph.mp'.
Randomizer initialized to 804058807. [MP mpgraph.1] [1.1] systems : end file test at line 8 [flush and process mpgraph.mp afterwards] ) Here is how much of TeX's memory you used: 754 strings out of 68090 11269 string characters out of 746163 4408763 words of memory out of 5524649 30492 multiletter control sequences out of 10000+50000 10284 words of font info for 34 fonts, out of 500000 for 1000 62 hyphenation exceptions out of 1000 33i,14n,28p,177b,370s stack positions out of 1500i,500n,5000p,200000b,5000s 4 PDF objects out of 300000 0 named destinations out of 131072 0 words of extra memory for PDF output out of 65536
Output written on test.pdf (1 page, 840 bytes).
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context