ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* RE: Metaerror?
@ 2000-09-14 10:49 Haseloff, Lutz
  2000-09-14 12:23 ` Metaerror? Berend de Boer
  0 siblings, 1 reply; 21+ messages in thread
From: Haseloff, Lutz @ 2000-09-14 10:49 UTC (permalink / raw)


Hi Hans, Hi all,

> Are you sure then that you enabled immediate write 18? Since your file
runs
> okay here. 

and

> combines with enables write 18 in texmf.cnf should do the magic trick. 

how can i do this?

Lutz


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

* Re: Metaerror?
  2000-09-14 10:49 Metaerror? Haseloff, Lutz
@ 2000-09-14 12:23 ` Berend de Boer
  2000-09-14 13:39   ` Metaerror? Tobias Burnus
  0 siblings, 1 reply; 21+ messages in thread
From: Berend de Boer @ 2000-09-14 12:23 UTC (permalink / raw)
  Cc: 'ntg-context@ntg.nl'

"Haseloff, Lutz" wrote:
> 
> Hi Hans, Hi all,
> 
> > Are you sure then that you enabled immediate write 18? Since your file
> runs
> > okay here.
> 
> and
> 
> > combines with enables write 18 in texmf.cnf should do the magic trick.
> 
> how can i do this?
> 
> Lutz

Look in texmf.cnf. There is a line about shell_escape. Set it to true
(t).

Groetjes,

Berend. (-:


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

* Re: Metaerror?
  2000-09-14 12:23 ` Metaerror? Berend de Boer
@ 2000-09-14 13:39   ` Tobias Burnus
  0 siblings, 0 replies; 21+ messages in thread
From: Tobias Burnus @ 2000-09-14 13:39 UTC (permalink / raw)
  Cc: 'ntg-context@ntg.nl'

Hi all,

> > > combines with enables write 18 in texmf.cnf should do the magic trick.
> > how can i do this?
> Look in texmf.cnf. There is a line about shell_escape. Set it to true
> (t).
If you work under UNIX and cannot set this because your admin is against
it, you may overrule it using a shell (environment) variable: export
shell_escape=t / setenv shell_escape t.
If you work under Windows* you should be able to set it yourself (don't
know about NT), but I think it should work there as well.

Tobias


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

* RE: Metaerror?
@ 2000-09-18 10:15 Haseloff, Lutz
  0 siblings, 0 replies; 21+ messages in thread
From: Haseloff, Lutz @ 2000-09-18 10:15 UTC (permalink / raw)
  Cc: 'ntg-context@ntg.nl'

Hi Hans, Hi all,

>>mpost complains on the commandline about:
>>
>>mpost: unrecognized option ´-progname=mpost´

>This is strange. This is pretty legal web2c. Is there a non web2c mp living
>on your system?

I use miktex + pdfetex binaries from fptex on WinNT

>>immidiate write 18 is enabled and

i changed the entry in texmf.cnf so it only is valid for pdfetex.
does metapost need this entry? How it is to set for miktex?

>You files looks ok. What does texexec --verbose report? 

Output by texexec --verbose :

 TeXExec 2.2 - ConTeXt / PRAGMA ADE 1997-2000

     locating ini file : kpsewhich not found in path
     locating ini file : found by searching
               reading : c:\localtexmf\tex\context\perltk\texexec.ini
               setting : 'TeXShell' to 'fptex' for 'all'
               setting : 'UsedInterfaces' to 'en' for 'all'
               setting : 'UserInterface' to 'en' for 'all'
               setting : 'TeXExecutable' to 'pdfetex' for 'all'
               setting : 'MpExecutable' to 'mp' for 'all'
               setting : 'MpToTeXExecutable' to 'mptotex' for 'all'
               setting : 'DviToMpExecutable' to 'dvitomp' for 'all'
               setting : 'DviSpecialScript' to 'dvispec' for 'all'
               setting : 'MpFormat' to 'metafun' for 'all'
               setting : 'TeXFormatFlag' to '&' for 'all'
               setting : 'MpFormatFlag' to '&' for 'all'
               setting : 'TeXFontsPath' to
'c:/texmf/fonts;c:/localtexmf/fonts;' for 'all'
               setting : 'UsedInterfaces' to 'en' for 'fptex'
               setting : 'UserInterface' to 'en' for 'fptex'
               setting : 'TeXExecutable' to 'pdfetex' for 'fptex'
               setting : 'TeXVirginFlag' to '-ini' for 'fptex'
               setting : 'TeXPassString' to '-progname=context' for 'fptex'
               setting : 'TeXBatchString' to '-int=batchmode' for 'fptex'
               setting : 'MpVirginFlag' to '-ini' for 'fptex'
               setting : 'MpPassString' to '' for 'fptex'
               setting : 'MpBatchString' to '' for 'fptex'

          used setting : TeXShell = fptex
          used setting : SetupPath =
          used setting : UserInterface = en
          used setting : UsedInterfaces = en
          used setting : TeXFontsPath = c:/texmf/fonts;c:/localtexmf/fonts;
          used setting : MpExecutable = mp
          used setting : MpToTeXExecutable = mptotex
          used setting : DviToMpExecutable = dvitomp
          used setting : TeXProgramPath =
          used setting : TeXFormatPath =
          used setting : ConTeXtPath =
          used setting : TeXScriptsPath =
          used setting : TeXExecutable = pdfetex
          used setting : TeXVirginFlag = -ini
          used setting : TeXBatchFlag = -int=batchmode
          used setting : MpBatchFlag = -int=batchmode
          used setting : TeXPassString = -progname=context
          used setting : TeXFormatFlag = &
          used setting : MpFormatFlag = &
          used setting : MpVirginFlag = -ini
          used setting : MpPassString =
          used setting : MpFormat = metafun
          used setting : FmtLanguage =
          used setting : FmtBodyFont =
          used setting : TcXPath =

      locating fmtutil : not found in path
                --help   show this or more, e.g. '--help interface'

texexec.ini :

% == introduction ==
%
% This is 'texexec.ini', the file used by texexec to determine where
% to find files, what TeX to use, what flags to pass, etc. Although
% TeXexec tries to locate things itself, a little help is sometimes
% needed. One can influence texexec by setting some variables. These
% are only needed when the automatic determined settings fail.
%
% == interfacing ==
%
% UsedInterfaces  nl,en  the formats generated with --make
% UserInterface   nl     the default format used
%
% == binaries ==
%
% TeXExecutable      pdfetex  the TeX binary to use
% MpExecutable       mpost    the MetaPost binary to use
% MpToTeXExecutable  mpto     the MetaPost to TeX converter
% DviToMpExecutable  dvitomp  the DVI to MetaPost converter
%
% == Scripts ==
%
% DviSpecialScript   dvispec  the DVI special filter script
%
% == flags ==
%
% TeXFormatFlag  &     the format introducer
% TeXVirginFlag  -ini  the format generation switch
%
% == paths ==
%
% TeXFormatPath   texmf/...               fmt files
% ConTeXtPath     texmf/tex/context/base  sources
% SetupPath       texmf/tex/base/user     cont-sys/usr file
% TeXScriptsPath  texmf/context/perltk    scripts
% TeXFontsPath    texmf                   font files
%
% == the main shell setting ==
%
% As shown below, one can define his/her own sections. We default to
% the teTeX/fpTeX web2c based settings.

%set  TeXShell  to  tetex
set TeXShell  to  fptex
%set TeXShell  to  miktex
%set TeXShell  to  private

% == setting up the variables ==
%
% Here are some general defaults. They can be overruled later.

set  UsedInterfaces     to  en
set  UserInterface      to  en

set  TeXExecutable      to  pdfetex

set  MpExecutable       to  mp
set  MpToTeXExecutable  to  mptotex
set  DviToMpExecutable  to  dvitomp
set  DviSpecialScript   to  dvispec

set  MpFormat           to  metafun

set  TeXFormatFlag      to  &
set  MpFormatFlag       to  &

set  TeXFontsPath       to  c:/texmf/fonts;c:/localtexmf/fonts;

% For teTeX the next settings will do.

for  tetex  set  UsedInterfaces  to  en,nl,de,uk
for  tetex  set  UserInterface   to  en
for  tetex  set  TeXExecutable   to  pdfetex
for  tetex  set  TeXVirginFlag   to  -ini
for  tetex  set  TeXPassString   to  -progname=context
for  tetex  set  TeXBatchString  to  -int=batchmode
for  tetex  set  MpVirginFlag    to  -ini
for  tetex  set  MpPassString    to  -progname=mpost
for  tetex  set  MpBatchString   to  -int=batchmode

% These also apply to fpTeX.

for  fptex  set  UsedInterfaces  to  en
for  fptex  set  UserInterface   to  en
for  fptex  set  TeXExecutable   to  pdfetex
for  fptex  set  TeXVirginFlag   to  -ini
for  fptex  set  TeXPassString   to  -progname=context
for  fptex  set  TeXBatchString  to  -int=batchmode
for  fptex  set  MpVirginFlag    to  -ini
for  fptex  set  MpPassString    to
for  fptex  set  MpBatchString   to

% MikTeX users probably have to set up some paths too.

for  miktex  set  UsedInterfaces  to  en,nl,de,uk
for  miktex  set  UserInterface   to  en
for  miktex  set  TeXExecutable   to  pdftex
for  miktex  set  TeXVirginFlag   to  --initialize
for  miktex  set  TeXBatchString  to
for  miktex  set  MpVirginFlag    to  -ini
for  miktex  set  MpPassString    to
for  miktex  set  MpBatchString   to

% These are the settings used on some machines at PRAGMA ADE that
% don't use the texmf tree. They can serve as an example for local
% settings. Local settings should either be added to the previous
% one, or go without the 'for' directives. Consider these
% settings as an example.

for  private  set  UsedInterfaces  to  en,nl
for  private  set  UserInterface   to  nl
for  private  set  ConTeXtPath     to  t:/sources/
for  private  set  SetupPath       to  t:/perl/
for  private  set  TeXScriptsPath  to  t:/perl/

% == read this too ==
%
% If this file is called 'texexec.rme', copy it to 'texexec.ini',
% check the settings above, change them according to your TeX
% distribution, and say:
%
%   texexec  --verbose
%
% When set up properly, you should see your local settings fly by.
% When these settings are ok, the next call should work:
%
%   texexec  --make
%
% and you should be able to process a file by saying
%
%   texexec  filename
%
% See 'mtexexec.pdf' for more information on the flags you can use with
% 'texexec'. Also make sure you have the 'texutil' script installed in
% the same path as 'texexec'.

% Experimental
%
% set  TcXPath     to  d:/tex/texmf/web2c
% set  FmtLanguage to  pl
% set  FmtBodyFont to  plr

Greetings

Lutz


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

* RE: Metaerror?
       [not found] <0F3313EC125AD311981100105AB3A75D4DBD41@N0795.mdf.fvbb.de>
@ 2000-09-15 10:29 ` Hans Hagen
  0 siblings, 0 replies; 21+ messages in thread
From: Hans Hagen @ 2000-09-15 10:29 UTC (permalink / raw)
  Cc: ntg-context

At 11:33 AM 9/15/00 +0200, Haseloff, Lutz wrote:               

>i have the same problem.
>
>newest beta context + texexec
>newest pdfetex (fp) 12.09.2000
>
>only the last mpgraphic is written into the mpgraph.mp
>and no graphic can be found.
>
>mpost complains on the commandline about:
>
>mpost: unrecognized option ´-progname=mpost´

This is strange. This is pretty legal web2c. Is there a non web2c mp living
on your system?

>immidiate write 18 is enabled and
>i have following entries in my cont-sys.tex:
>
>\runMPgraphicstrue
>\runMPTEXgraphicstrue
>\recycleMPslotstrue
>%\protectbufferstrue
>\useMETAFUNformattrue
>
>btw. \protectbufferstrue never worked here
>always context/texexec complains about graphic not found.

Real strange since it works here (windows I must admit). 

You files looks ok. What does texexec --verbose report? 

Looks like i have to test linux -) 

Hans

============================= texexec --verbose ==============

 TeXExec 2.2 - ConTeXt / PRAGMA ADE 1997-2000

     locating ini file : found by kpsewhich
               reading : c:/LOCAL/TEX/TEXMF-LOCAL/context/config/texexec.ini
               setting : 'TeXShell' to 'tetex' for 'all'
               setting : 'UsedInterfaces' to 'en,nl,de,uk' for 'all'
               setting : 'UserInterface' to 'en' for 'all'
               setting : 'TeXExecutable' to 'tex' for 'all'
               setting : 'MpExecutable' to 'mpost' for 'all'
               setting : 'MpToTeXExecutable' to 'mpto' for 'all'
               setting : 'DviToMpExecutable' to 'dvitomp' for 'all'
               setting : 'DviSpecialScript' to 'dvispec' for 'all'
               setting : 'MpFormat' to 'metafun' for 'all'
               setting : 'TeXFormatFlag' to '&' for 'all'
               setting : 'MpFormatFlag' to '&' for 'all'
               setting : 'TeXFontsPath' to
'l:/tex/texmf;l:/tex/texmf-local;' for 'all'
               setting : 'UsedInterfaces' to 'en,nl,de,uk' for 'tetex'
               setting : 'UserInterface' to 'en' for 'tetex'
               setting : 'TeXExecutable' to 'pdfetex' for 'tetex'
               setting : 'TeXVirginFlag' to '-ini' for 'tetex'
               setting : 'TeXPassString' to '-progname=context' for 'tetex'
               setting : 'TeXBatchString' to '-int=batchmode' for 'tetex'
               setting : 'MpVirginFlag' to '-ini' for 'tetex'
               setting : 'MpPassString' to '-progname=mpost' for 'tetex'
               setting : 'MpBatchString' to '-int=batchmode' for 'tetex'

          used setting : TeXShell = tetex
          used setting : SetupPath = 
          used setting : UserInterface = en
          used setting : UsedInterfaces = en,nl,de,uk
          used setting : TeXFontsPath = l:/tex/texmf;l:/tex/texmf-local;
          used setting : MpExecutable = mpost
          used setting : MpToTeXExecutable = mpto
          used setting : DviToMpExecutable = dvitomp
          used setting : TeXProgramPath = 
          used setting : TeXFormatPath = 
          used setting : ConTeXtPath = 
          used setting : TeXScriptsPath = 
          used setting : TeXExecutable = pdfetex
          used setting : TeXVirginFlag = -ini
          used setting : TeXBatchFlag = -int=batchmode
          used setting : MpBatchFlag = -int=batchmode
          used setting : TeXPassString = -progname=context
          used setting : TeXFormatFlag = &
          used setting : MpFormatFlag = &
          used setting : MpVirginFlag = -ini
          used setting : MpPassString = -progname=mpost
          used setting : MpFormat = metafun
          used setting : FmtLanguage = 
          used setting : FmtBodyFont = 
          used setting : TcXPath = 

      locating fmtutil : found
                --help   show this or more, e.g. '--help interface'

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* RE: Metaerror?
@ 2000-09-15  9:35 Haseloff, Lutz
  0 siblings, 0 replies; 21+ messages in thread
From: Haseloff, Lutz @ 2000-09-15  9:35 UTC (permalink / raw)


Hi Hans Hi all,

i have the same problem.

newest beta context + texexec
newest pdfetex (fp) 12.09.2000

only the last mpgraphic is written into the mpgraph.mp
and no graphic can be found.

mpost complains on the commandline about:

mpost: unrecognized option ´-progname=mpost´

immidiate write 18 is enabled and
i have following entries in my cont-sys.tex:

\runMPgraphicstrue
\runMPTEXgraphicstrue
\recycleMPslotstrue
%\protectbufferstrue
\useMETAFUNformattrue

btw. \protectbufferstrue never worked here
always context/texexec complains about graphic not found.

my file:

\startuseMPgraphic{Fig 1}
linejoin:=mitered;
for i = 0 upto 4:
z[i]=(7cm*sind(i*360/5),7cm*cosd(i*360/5));
endfor;
draw z0--z1--z2--z3--z4--cycle;
draw z0..z1..z2..z3..z4..cycle;
pickup pencircle scaled 1.5pt;
draw z2--z3--(x3,y0)--(x2,y0)--cycle;
\stopuseMPgraphic
\startuseMPgraphic{Fig 2}
linejoin:=mitered;
z1=(0,0); z2=(140mm,0); z3=(140mm,140mm*.75); z4=(0,140mm*.75);
draw z1--z2--z3--z4--cycle;
z5=.5[z3,z4];
z6=.5[z1,z5];
draw .5[z1,z2]--z5;
pickup pencircle scaled 1.5pt;
draw .5[z1,z2]--z2--.5[z2,z3]--.5[z1,z3]--cycle;
drawarrow z6--(x6+1.5cm,y6);
drawarrow z6--(x6-1.5cm,y6);
\stopuseMPgraphic
\setuplabeltext[de][figure={Figur\kern.2em}]
\setupcaptions[headstyle=italic,style=italic,conversion=O]
\useencoding[win]
\mainlanguage[de]
\starttext
{\sc Zwei} Konstanten regieren die Proportionen eines gut gemachten Buches:
Hand und Auge.
Das gesunde Auge ist immer um zwei Spannen von der Buchseite entfernt, und
alle Menschen fassen Bücher
auf die gleiche Weise an.

\placefigure[][Fig 1]
  {Rechteck aus dem Fünfeck. Verhältnis 1:1,538 (\kern.07em
irrational\kern.07em).}
  {\useMPgraphic{Fig 1}}
Figur\kern.2em1 führt ein wenig bekanntes, sehr schönes Rechteck aus dem
Fünfeck vor\kern.07em; Proportion 1:1,538.

\placefigure[][Fig 2]
  {Quartformat mit seiner Faserlaufrichtung.}
  {\useMPgraphic{Fig 2}}

\stoptext

Greetings

Lutz


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

* Re: Metaerror?
  2000-09-14 18:18                 ` Metaerror? Berend de Boer
@ 2000-09-15  7:36                   ` Hans Hagen
  0 siblings, 0 replies; 21+ messages in thread
From: Hans Hagen @ 2000-09-15  7:36 UTC (permalink / raw)
  Cc: ntg-context

At 08:18 PM 9/14/00 +0200, Berend de Boer wrote:
>
>> But perhaps I'm a bit further now: I've hacked texexec to copy
>> mpgraph.mp to tmp.mp and tmp.mp is 0 bytes at that time (that explains
>> the error). mpgraph.mp is ok when texexec finishes...
>> 
>
>It seems that the command that is executed:
>
>	pdfetex  -progname=context  \&cont-en tmpgraph
>
>removes mpgraph.mp. And because a copy is kept in a .kep file, this one
>is copied back so everything looks fine afterwards when executed by
>texexec.

That is because there were problems with buffer sizes (fixed now by fabrice
popineau). I let texexec copy the file, and add line breaks but not spoil
the original.

What I don't understand is that it does not work on your machine while it
works ok on mine. 

Hans 
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Re: Metaerror?
  2000-09-14 17:53               ` Metaerror? Berend de Boer
@ 2000-09-14 18:18                 ` Berend de Boer
  2000-09-15  7:36                   ` Metaerror? Hans Hagen
  0 siblings, 1 reply; 21+ messages in thread
From: Berend de Boer @ 2000-09-14 18:18 UTC (permalink / raw)


> But perhaps I'm a bit further now: I've hacked texexec to copy
> mpgraph.mp to tmp.mp and tmp.mp is 0 bytes at that time (that explains
> the error). mpgraph.mp is ok when texexec finishes...
> 

It seems that the command that is executed:

	pdfetex  -progname=context  \&cont-en tmpgraph

removes mpgraph.mp. And because a copy is kept in a .kep file, this one
is copied back so everything looks fine afterwards when executed by
texexec.

Groetjes,

Berend. (-:


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

* Re: Metaerror?
  2000-09-14 15:28             ` Metaerror? Hans Hagen
@ 2000-09-14 17:53               ` Berend de Boer
  2000-09-14 18:18                 ` Metaerror? Berend de Boer
  0 siblings, 1 reply; 21+ messages in thread
From: Berend de Boer @ 2000-09-14 17:53 UTC (permalink / raw)
  Cc: ntg-context

Hans Hagen wrote:

> >It seems that texexec --mptex mpgraph doesn't really read mpgraph.mp. I
> >can make typo's in mpgraph.mp but there are no warnings.
> 
> Are you sure that . is prepended to your mp path?

Really necessary??

But perhaps I'm a bit further now: I've hacked texexec to copy
mpgraph.mp to tmp.mp and tmp.mp is 0 bytes at that time (that explains
the error). mpgraph.mp is ok when texexec finishes...

Perhaps some close or flush doesn't work???

My perl version is: 5.005_03 

Groetjes,

Berend. (-:


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

* Re: Metaerror?
  2000-09-14 13:05           ` Metaerror? Berend de Boer
  2000-09-14 13:23             ` Metaerror? Marc van Dongen
@ 2000-09-14 15:28             ` Hans Hagen
  2000-09-14 17:53               ` Metaerror? Berend de Boer
  1 sibling, 1 reply; 21+ messages in thread
From: Hans Hagen @ 2000-09-14 15:28 UTC (permalink / raw)
  Cc: ntg-context

At 03:05 PM 9/14/00 +0200, Berend de Boer wrote:

>It seems that texexec --mptex mpgraph doesn't really read mpgraph.mp. I
>can make typo's in mpgraph.mp but there are no warnings.

Are you sure that . is prepended to your mp path? 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Re: Metaerror?
  2000-09-14 13:05           ` Metaerror? Berend de Boer
@ 2000-09-14 13:23             ` Marc van Dongen
  2000-09-14 15:28             ` Metaerror? Hans Hagen
  1 sibling, 0 replies; 21+ messages in thread
From: Marc van Dongen @ 2000-09-14 13:23 UTC (permalink / raw)
  Cc: ntg-context

Berend de Boer (berend@pobox.com) wrote:

: It seems that texexec --mptex mpgraph doesn't really read mpgraph.mp. I
: can make typo's in mpgraph.mp but there are no warnings.

Conduct a find in the directories where (La)TeX searches.
I bet you there will be several mpgraphs.mp.
 find thedirectorywherelatexsearches -name mpgraph.mp
In my system it's in
 teTeX/share/texmf/doc/metapost/base/mpgraph.mp

Next rename the on that starts with the four lines:
input graph

%if false:  %% Begin skipping already debugged figures
%fi input sarith %% End skipping of already debugged figures

This is John Hobby's mpgraph.mp.

I thin that should do the trick.

Regards,

Marc van Dongen


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

* Re: Metaerror?
  2000-09-14 12:40         ` Metaerror? Marc van Dongen
@ 2000-09-14 13:20           ` Hans Hagen
  0 siblings, 0 replies; 21+ messages in thread
From: Hans Hagen @ 2000-09-14 13:20 UTC (permalink / raw)
  Cc: Berend de Boer, ntg-context

At 01:40 PM 9/14/00 +0100, Marc van Dongen wrote:

>Also I noticed you use btex etex which doesn't
>work properly with me. In stead I am using the
>code appended below which I shamelessly stole
>and adapted from

btex .. etex returns a picture picked up from a file generated by a bunch
of mp tools. 

>http://www.mathp7.jussieu.fr/~zoonek/LaTeX/Metapost/metapost.html 
>
>You can use this macro and play sexy games like:
> .....
> counter := 3;
> boxit.ctr( LATEX( "The value of counter is "
>                 & decimal( counter )
>                 & ". Cool no?"
>                 )
>           );
>
>Perhaps context's btex and etex work fine---I

it's metapost's btex etex btw

>vardef LATEX primary s =
>   write "verbatimtex"                    to "mptextmp.mp";
>   write "\documentclass[12pt]{article}"  to "mptextmp.mp";
>   write "\usepackage[T1]{fontenc}"       to "mptextmp.mp";
>   write "\usepackage{amsmath,amssymb}"   to "mptextmp.mp";
>   write "\begin{document}"               to "mptextmp.mp";
>   write "etex"                           to "mptextmp.mp";
>   write "btex "&s&" etex"                to "mptextmp.mp";
>   write EOF                              to "mptextmp.mp";
>   scantokens "input mptextmp"
>enddef;

This is not needed in context since it saves environments and additional
data already. Also, this macro is rather hard coded -) 

see metafun manual: 

\startMPenvironment 
  \setupbodyfont[pos,12pt]
\stopMPenvironment 

So, for string composition purposes, one may define: 

vardef TEX primary s = 
  write "btex " &s " etex" & EOF to "mptextmp.mp" ;
  scantokens "input mptextmp"  
enddef ;  

But there are easier ways I think. 

Btw, i'm thinking of a different mechanism which permits making macros with
embedded btex/etex things, 

Hans

Hans

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Re: Metaerror?
       [not found]         ` <m33dj3jffv.fsf@coe.uga.edu>
@ 2000-09-14 13:05           ` Berend de Boer
  2000-09-14 13:23             ` Metaerror? Marc van Dongen
  2000-09-14 15:28             ` Metaerror? Hans Hagen
  0 siblings, 2 replies; 21+ messages in thread
From: Berend de Boer @ 2000-09-14 13:05 UTC (permalink / raw)


Ed L Cashin wrote:
> 
> Berend de Boer <berend@pobox.com> writes:
> 
> ...
> > When executing this command:
> >
> > texexec --mpformat=metafun --mptex --nomp --once mpgraph
> >
> > The run ends with:
> >
> >
> >               run time : 2 seconds
> >               metapost : mpgraph
> >                 format : metafun
> > This is MetaPost, Version 0.641 (Web2C 7.3.2x)
> > (mpgraph.mp)
> > *
> >
> >
> > So I have to type \end to exit it.
> 
> Is the texexec in your path current?

It is (version 2.2)

It seems that texexec --mptex mpgraph doesn't really read mpgraph.mp. I
can make typo's in mpgraph.mp but there are no warnings.

The command is executed though.

Groetjes,

Berend. (-:


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

* Re: Metaerror?
  2000-09-14 12:15         ` Metaerror? Hans Hagen
@ 2000-09-14 12:48           ` Berend de Boer
  0 siblings, 0 replies; 21+ messages in thread
From: Berend de Boer @ 2000-09-14 12:48 UTC (permalink / raw)
  Cc: ntg-context

Hans Hagen wrote:

> It may indeed be an error, since there is an 'end' in the file. Mayeb mp
> waits for something else.

It's really, really strange.

With:

	texexec --mptex mpgraph

mpost fails, with 

	mpost \&metafun mpgraph	

it runs fine.

Can some kind soul send me his linux i386 mpost binary??

I'll see if I can perhaps recompile mpost.

Groetjes,

Berend. (-:


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

* Re: Metaerror?
  2000-09-14 12:05       ` Metaerror? Berend de Boer
  2000-09-14 12:15         ` Metaerror? Hans Hagen
@ 2000-09-14 12:40         ` Marc van Dongen
  2000-09-14 13:20           ` Metaerror? Hans Hagen
       [not found]         ` <m33dj3jffv.fsf@coe.uga.edu>
  2 siblings, 1 reply; 21+ messages in thread
From: Marc van Dongen @ 2000-09-14 12:40 UTC (permalink / raw)
  Cc: Hans Hagen, ntg-context

Berend de Boer (berend@pobox.com) wrote:

[problem]

Hi Berend,

Have you checked the contents of the temporary
log and error file mpost generates?

Maybe this will bring you closer to a discovery
of the error.

Also I noticed you use btex etex which doesn't
work properly with me. In stead I am using the
code appended below which I shamelessly stole
and adapted from
http://www.mathp7.jussieu.fr/~zoonek/LaTeX/Metapost/metapost.html 

You can use this macro and play sexy games like:
 .....
 counter := 3;
 boxit.ctr( LATEX( "The value of counter is "
                 & decimal( counter )
                 & ". Cool no?"
                 )
           );

Perhaps context's btex and etex work fine---I
don't use context. If you decide to use the macro
you may wish to change its prelude a bit so that
it complies with your Context settings.

Just a thought.

Regards,

Marc van Dongen

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

vardef LATEX primary s =
   write "verbatimtex"                    to "mptextmp.mp";
   write "\documentclass[12pt]{article}"  to "mptextmp.mp";
   write "\usepackage[T1]{fontenc}"       to "mptextmp.mp";
   write "\usepackage{amsmath,amssymb}"   to "mptextmp.mp";
   write "\begin{document}"               to "mptextmp.mp";
   write "etex"                           to "mptextmp.mp";
   write "btex "&s&" etex"                to "mptextmp.mp";
   write EOF                              to "mptextmp.mp";
   scantokens "input mptextmp"
enddef;


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

* Re: Metaerror?
  2000-09-14 12:05       ` Metaerror? Berend de Boer
@ 2000-09-14 12:15         ` Hans Hagen
  2000-09-14 12:48           ` Metaerror? Berend de Boer
  2000-09-14 12:40         ` Metaerror? Marc van Dongen
       [not found]         ` <m33dj3jffv.fsf@coe.uga.edu>
  2 siblings, 1 reply; 21+ messages in thread
From: Hans Hagen @ 2000-09-14 12:15 UTC (permalink / raw)
  Cc: ntg-context

At 02:05 PM 9/14/00 +0200, Berend de Boer wrote:
>Hans Hagen wrote:

>So I have to type \end to exit it.

or 'end', the \ is an ignore in metapost \to \suit \tex \lovers. 

>

It may indeed be an error, since there is an 'end' in the file. Mayeb mp
waits for something else. 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Re: Metaerror?
  2000-09-14 11:37     ` Metaerror? Hans Hagen
@ 2000-09-14 12:05       ` Berend de Boer
  2000-09-14 12:15         ` Metaerror? Hans Hagen
                           ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Berend de Boer @ 2000-09-14 12:05 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]

Hans Hagen wrote:

> >It runs, but complains. Perhaps output is not flushed??
> 
> Them how does mpgraph.mp look like?

When executing this command:

texexec --mpformat=metafun --mptex --nomp --once mpgraph

The run ends with:

              run time : 2 seconds
              metapost : mpgraph
                format : metafun
This is MetaPost, Version 0.641 (Web2C 7.3.2x)
(mpgraph.mp)
*

So I have to type \end to exit it.

My mp file (in this case):

% runtime generated graphics of job "test"
mpgraph:=1;
randomseed := 3343;
if unknown context_tool : input mp-tool ;
fi ;
if unknown context_spec : input mp-spec ;
fi ;
defaultfont := "cmr10" ;
defaultscale := 12.0pt/10pt ;
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" ;
if unknown context_page : input mp-page ;
fi ;
boolean PageStateAvailable ;
PageStateAvailable := true ;
boolean OnRightPage ;
OnRightPage := true ;
def LoadPageState = OnRightPage := true;
PageNumber := 1;
PaperHeight := 845.04684pt;
PaperWidth := 597.50787pt;
PrintPaperHeight := 845.04684pt;
PrintPaperWidth := 597.50787pt;
TopSpace := 71.12546pt;
BackSpace := 71.13275pt;
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;
PageOffset := 0pt;
PageDepth := 0pt;
enddef ;
if unknown context_core : input mp-core.mp ;
fi ;
;;
verbatimtex  etex;
beginfig(1);
input bon.mp ;
path stdcbase, posixbase, basebase ;
 stdcbase := class (btex \it STDC\_BASE etex
, 4cm, 10cm) ;
basebase := class (btex \it STDC\_BASE etex
, 4cm, 5cm) ;
posixbase := class (btex \it POSIX\_BASE etex
, 4cm, 0cm) ;
inheritfrom (basebase, stdcbase, 6) ;
inheritfrom (posixbase, basebase, 6) ;
endfig;
end.

I've also attached bon.mp.

I'll try to make some changes to see where the error is.

Groetjes,

Berend. (-:

[-- Attachment #2: bon.mp --]
[-- Type: text/plain, Size: 739 bytes --]

numeric classyscale, classxscale ;

classyscale := 2cm ;
classxscale := 3.5cm ;

vardef class ( expr name, x, y ) =
  save p, q ;
  path p, q, pd, qd ;

  pickup pencircle scaled 0.8pt ;
  pd := fullcircle xscaled classxscale yscaled classyscale ;
  qd := pd shifted (x + 5pt, y);
  fill qd withcolor black ;
  draw qd ;  
  p := fullcircle xscaled 3.5cm yscaled 2cm ;
  q := p shifted (x, y) ;
  fill q withcolor 0.7white ;
  label(name, center q) withcolor blue ;
  draw q;
  q
enddef ;

def inheritfrom ( expr child, parent, n ) =
  save p ;
  pair a, b ;
  path p ;
  pickup pencircle scaled 3pt ;
  a := point n of parent shifted (0, -5pt) ;
  b := point 2 of child shifted (0, 5pt) ;
  p := b -- unitvector (a) ;
  draw p ;
enddef ;

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

* Re: Metaerror?
  2000-09-14 11:34   ` Metaerror? Berend de Boer
@ 2000-09-14 11:37     ` Hans Hagen
  2000-09-14 12:05       ` Metaerror? Berend de Boer
  0 siblings, 1 reply; 21+ messages in thread
From: Hans Hagen @ 2000-09-14 11:37 UTC (permalink / raw)
  Cc: ntg-context

At 01:34 PM 9/14/00 +0200, Berend de Boer wrote:
>Hans Hagen wrote:
>
>> Are you sure then that you enabled immediate write 18? Since your file runs
>> okay here.
>
>It runs, but complains. Perhaps output is not flushed??

Them how does mpgraph.mp look like? 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Re: Metaerror?
  2000-09-14  8:48 ` Metaerror? Hans Hagen
@ 2000-09-14 11:34   ` Berend de Boer
  2000-09-14 11:37     ` Metaerror? Hans Hagen
  0 siblings, 1 reply; 21+ messages in thread
From: Berend de Boer @ 2000-09-14 11:34 UTC (permalink / raw)
  Cc: ntg-context

Hans Hagen wrote:

> Are you sure then that you enabled immediate write 18? Since your file runs
> okay here.

It runs, but complains. Perhaps output is not flushed??

I'll try the latest pdftex (I did run version f)

>    \runMPgraphicstrue
> \runMPTEXgraphicstrue
>   \recycleMPslotstrue
>   \protectbufferstrue % not really needed here btw
> \useMETAFUNformattrue

Except \protectbufferstrue (adding this didn't help).

> Btw, you can say there btex TEXT etex to get btex/etex labels.

Yes, I figured out that I needed to specify that there.

Groetjes,

Berend. (-:


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

* Re: Metaerror?
  2000-09-14  6:45 Metaerror? Berend de Boer
@ 2000-09-14  8:48 ` Hans Hagen
  2000-09-14 11:34   ` Metaerror? Berend de Boer
  0 siblings, 1 reply; 21+ messages in thread
From: Hans Hagen @ 2000-09-14  8:48 UTC (permalink / raw)
  Cc: ntg-context

At 08:45 AM 9/14/00 +0200, you wrote:
>Hello All,
>
>Running this file produces (on my system) a page with the same fore and
>background graphic, i.e. the overlay graphic disappears and is replaced
>by the other mpgraphic. I run the latest stuff, with all the options in
>cont-sys.tex

Are you sure then that you enabled immediate write 18? Since your file runs
okay here. 

   \runMPgraphicstrue
\runMPTEXgraphicstrue
  \recycleMPslotstrue
  \protectbufferstrue % not really needed here btw
\useMETAFUNformattrue

combines with enables wriote 18 in texmf.cnf should do the magic trick. 

>class ("TEST", 2cm, 2cm) ;
>class ("POSIX", 4cm, 5cm) ;

Btw, you can say there btex TEXT etex to get btex/etex labels. 

Hans

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Metaerror?
@ 2000-09-14  6:45 Berend de Boer
  2000-09-14  8:48 ` Metaerror? Hans Hagen
  0 siblings, 1 reply; 21+ messages in thread
From: Berend de Boer @ 2000-09-14  6:45 UTC (permalink / raw)


Hello All,

Running this file produces (on my system) a page with the same fore and
background graphic, i.e. the overlay graphic disappears and is replaced
by the other mpgraphic. I run the latest stuff, with all the options in
cont-sys.tex

I tried to remove the recycle slots option, but that didn't work either.

% interface=en

\setupcolors
  [state=start]

\startuniqueMPgraphic{concept} 
  draw btex \bf CONCEPT etex rotated 60 withcolor .8white ; 
  currentpicture := currentpicture ysized (\overlayheight-.5cm) ; 
\stopuniqueMPgraphic

\defineoverlay
  [concept]
  [\uniqueMPgraphic{concept}]

\setupbackgrounds
  [page]
  [background=concept]

\starttext

Test. 

\startuseMPgraphic{test}
def class ( expr name, x, y ) =

  path p, q ;

  %pickup pensquare scaled 1pt ;
  p := fullcircle xscaled 3cm yscaled 2cm ;
  q := p shifted (x, y) ;
  draw q ;
  %draw btex name etex withcolor blue ; 
  label(name, center q) withcolor blue ;

enddef ;

class ("TEST", 2cm, 2cm) ;
class ("POSIX", 4cm, 5cm) ;
\stopuseMPgraphic

\useMPgraphic{test}

\stoptext

Groetjes,

Berend. (-:


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

end of thread, other threads:[~2000-09-18 10:15 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-14 10:49 Metaerror? Haseloff, Lutz
2000-09-14 12:23 ` Metaerror? Berend de Boer
2000-09-14 13:39   ` Metaerror? Tobias Burnus
  -- strict thread matches above, loose matches on Subject: below --
2000-09-18 10:15 Metaerror? Haseloff, Lutz
     [not found] <0F3313EC125AD311981100105AB3A75D4DBD41@N0795.mdf.fvbb.de>
2000-09-15 10:29 ` Metaerror? Hans Hagen
2000-09-15  9:35 Metaerror? Haseloff, Lutz
2000-09-14  6:45 Metaerror? Berend de Boer
2000-09-14  8:48 ` Metaerror? Hans Hagen
2000-09-14 11:34   ` Metaerror? Berend de Boer
2000-09-14 11:37     ` Metaerror? Hans Hagen
2000-09-14 12:05       ` Metaerror? Berend de Boer
2000-09-14 12:15         ` Metaerror? Hans Hagen
2000-09-14 12:48           ` Metaerror? Berend de Boer
2000-09-14 12:40         ` Metaerror? Marc van Dongen
2000-09-14 13:20           ` Metaerror? Hans Hagen
     [not found]         ` <m33dj3jffv.fsf@coe.uga.edu>
2000-09-14 13:05           ` Metaerror? Berend de Boer
2000-09-14 13:23             ` Metaerror? Marc van Dongen
2000-09-14 15:28             ` Metaerror? Hans Hagen
2000-09-14 17:53               ` Metaerror? Berend de Boer
2000-09-14 18:18                 ` Metaerror? Berend de Boer
2000-09-15  7:36                   ` Metaerror? Hans Hagen

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).