Metapost calling TeX (with ConTeXt)

Metapost calling TeX (with ConTeXt)

Post by Laurent Ché » Thu, 22 May 2003 18:57:18



(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
<protectionstate 0>
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
<unprotect 3> <unprotect 4>
system (E-TEX) : [line 1815] \ifcsname
<unprotect 5> <protect 5> <protect 4> <protect 3>)
specials       : fdf loaded
<unprotect 3> <protect 3>)
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).

 
 
 

Metapost calling TeX (with ConTeXt)

Post by Giuseppe Bilott » Fri, 23 May 2003 02:02:55



> (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

What do you mean by "doesn't work"? What kind of failure/message do
you get?

--
Giuseppe "Oblomov" Bilotta

"Da grande lotter per la pace"
"A me me la compra il mio babbo"
(Altan)
("When I grow up, I will fight for peace"
 "My daddy will buy it for me")

 
 
 

Metapost calling TeX (with ConTeXt)

Post by Steve Pete » Fri, 23 May 2003 02:25:00



Quote:> This works perfectly :

> \starttext
>         \startMPpage
>                 label("aa",(0,0)) ;
>                 draw fullcircle scaled 3cm ;
>         \stopMPpage
> \stoptext
> \end

I get a nice circle with "aa" in the middle.

Quote:> But this don't work :

> \starttext
>         \startMPpage
>                 label(btex aa etex,(0,0)) ;
>                 draw fullcircle scaled 3cm ;
>         \stopMPpage
> \stoptext
> \end

I also get a nice circle with "aa" in the middle.

What doesn't work?

 
 
 

Metapost calling TeX (with ConTeXt)

Post by Laurent Ché » Fri, 23 May 2003 05:37:40





> > This works perfectly :

> > \starttext
> >         \startMPpage
> >                 label("aa",(0,0)) ;
> >                 draw fullcircle scaled 3cm ;
> >         \stopMPpage
> > \stoptext
> > \end

> I get a nice circle with "aa" in the middle.

> > But this don't work :

> > \starttext
> >         \startMPpage
> >                 label(btex aa etex,(0,0)) ;
> >                 draw fullcircle scaled 3cm ;
> >         \stopMPpage
> > \stoptext
> > \end

> I also get a nice circle with "aa" in the middle.

> What doesn't work?

I get a blank page, without circle and without aa.

LC

 
 
 

Metapost calling TeX (with ConTeXt)

Post by Laurent Ché » Fri, 23 May 2003 05:37:40




> > (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

> What do you mean by "doesn't work"? What kind of failure/message do
> you get?

No error message, but a blank page, without circle and without "aa".
 
 
 

Metapost calling TeX (with ConTeXt)

Post by Dan Lueckin » Fri, 23 May 2003 06:33:07






>> > But this don't work :

>> > \starttext
>> >         \startMPpage
>> >                 label(btex aa etex,(0,0)) ;
>> >                 draw fullcircle scaled 3cm ;
>> >         \stopMPpage
>> > \stoptext
>> > \end

>> What do you mean by "doesn't work"? What kind of failure/message do
>> you get?

>No error message, but a blank page, without circle and without "aa".

Now the question that should have come first. You showed us what
you _typed_. Now what did you _do_? Assuming you invoked texexec,
what options did you use. If you didn't use texexec, what command did
you use?

Dan

--
Dan Luecking                     Department of Mathematical Sciences
University of Arkansas           Fayetteville, Arkansas 72701

 
 
 

Metapost calling TeX (with ConTeXt)

Post by Laurent Ché » Fri, 23 May 2003 15:03:04







> >> > But this don't work :

> >> > \starttext
> >> >         \startMPpage
> >> >                 label(btex aa etex,(0,0)) ;
> >> >                 draw fullcircle scaled 3cm ;
> >> >         \stopMPpage
> >> > \stoptext
> >> > \end

> >> What do you mean by "doesn't work"? What kind of failure/message do
> >> you get?

> >No error message, but a blank page, without circle and without "aa".

> Now the question that should have come first. You showed us what
> you _typed_. Now what did you _do_? Assuming you invoked texexec,
> what options did you use. If you didn't use texexec, what command did
> you use?

> Dan

I typed :   texexec --pdf test.tex
 
 
 

Metapost calling TeX (with ConTeXt)

Post by Giuseppe Bilott » Fri, 23 May 2003 17:53:32



> > What do you mean by "doesn't work"? What kind of failure/message do
> > you get?

> No error message, but a blank page, without circle and without "aa".

Ok, seen your message on hte ConTeXt mailing list.

Since your file works correctly here, and I have \write18 enabled,
you can try two things:

* try the patch to texexec.pl porposed by Dennis

or

* try enabling \write18 shell-escaping in your TeX

--
Giuseppe "Oblomov" Bilotta

"Da grande lotter per la pace"
"A me me la compra il mio babbo"
(Altan)
("When I grow up, I will fight for peace"
 "My daddy will buy it for me")

 
 
 

1. pdftex problems with metapost graphics conversion by context macros

Hello,

it seems that there, after I have upgraded my miktex installation with
the update option, has been introduced a bug in the mps handling of
graphicx.

When I include even the simplest metapost figure as:
beginfig(1);
draw fullcircle scaled 10;
endfig;
end;

with its output renamed to check.mps in a tex file as:
\documentclass{article}

\usepackage{graphicx}
\begin{document}
\includegraphics{check.mps}
\end{document}

I get an error message (100 of them) as:
File: check.mps Graphic file (type mps)
 [MP to PDF check.mps] (check.mps
! Undefined control sequence.

                                          \dohandleMPsequenceA \else ...


doesn't seem to be \let of \def'ed anywhere.

What has happened?

--
Brian (remove the sport for mail)
http://www.rk-speed.dk http://fiduso.dk http://sunsite.auc.dk/dk-tug
\TeX, tak.

2. Object transfers across operating systems

3. command that behaves different in a math context (vs. text context)

4. Computer Programmer Needed???

5. (La)TeX vs ConTeXt ?

6. FS: Sbus 8bit color frame buffer $55.00

7. context sensitive editor for TeX/LaTeX

8. Of Mice and QNX

9. Possible bug in ConTeXt files supp-{mis,pdf}.tex ?

10. my install of CONTEXT and PDF-TEX

11. Context vs (La)tex

12. MetaPost: How to increase memory capacity of metapost?

13. CALL FOR DEVELOPERS (aka: TeX runtime library)