ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* staticMPfigure problem with \runMP[TEX]graphicsfalse
@ 2007-01-04  7:33 Sanjoy Mahajan
  2007-01-04  9:35 ` Taco Hoekwater
  2007-01-04 15:37 ` Hans Hagen
  0 siblings, 2 replies; 7+ messages in thread
From: Sanjoy Mahajan @ 2007-01-04  7:33 UTC (permalink / raw)


Not sure if the following are new behaviors or are the correct ones but
I'm just misunderstanding.  The following jjj.tex file doesn't correctly
generate and include the static metapost figure unless I set
\runMPgraphicstrue and \runMPTEXgraphicstrue in cont-sys.rme and set
shell_escape = t.

If \runMPgraphicsfalse and \runMPTEXgraphicsfalse but shell_escape = t,
then the generated pdf figure is only 1pt wide but is included.  If all
settings are false, then there's a grey square saying 'dummy' etc.

It all works fine if all three settings are true.

But I thought that one can leave all three settings false, and texexec
will still produce the same pdf just with more runs?

This is with context 2006.12.27 (from the Debian context package),
pdftex 1.40.0, metapost 0.993, plus mostly texlive 2005.

=================== begin: jjj.tex ==================
\starttext

\startstaticMPfigure{fig:ellipse}
  path p;
  p := fullcircle scaled 2in yscaled 0.5;
  label(btex hello etex, origin);
  draw p;
\stopstaticMPfigure

\placefigure[right,none]{}{\usestaticMPfigure[fig:ellipse]}

\input tufte

\stoptext
===================   end: jjj.tex ==================

-Sanjoy

`A nation of slaves is always prepared to applaud the clemency of their
 master who, in the abuse of absolute power, does not proceed to the
 last extremes of injustice and oppression.'  (Gibbon)  

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

* Re: staticMPfigure problem with \runMP[TEX]graphicsfalse
  2007-01-04  7:33 staticMPfigure problem with \runMP[TEX]graphicsfalse Sanjoy Mahajan
@ 2007-01-04  9:35 ` Taco Hoekwater
  2007-01-04 13:49   ` Sanjoy Mahajan
  2007-01-04 15:37 ` Hans Hagen
  1 sibling, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2007-01-04  9:35 UTC (permalink / raw)




Sanjoy Mahajan wrote:
> Not sure if the following are new behaviors or are the correct ones but
> I'm just misunderstanding.  The following jjj.tex file doesn't correctly
> generate and include the static metapost figure unless I set
> \runMPgraphicstrue and \runMPTEXgraphicstrue in cont-sys.rme and set
> shell_escape = t.

Personally, I believe this is a bug. Hans always runs with all
three switches true, so he never has any problems, but Mojca and I
also regularly have issues like this. The last of those was the
incorrect scaling of sometxt() in \runmpgraphicsfalse reported
two or three weeks back.

Hans, can you look at this, please? Or, if you don't want to support
\runmpgraphics false any more, document that somewhere.

Best, Taco


> If \runMPgraphicsfalse and \runMPTEXgraphicsfalse but shell_escape = t,
> then the generated pdf figure is only 1pt wide but is included.  If all
> settings are false, then there's a grey square saying 'dummy' etc.
> 
> It all works fine if all three settings are true.
> 
> But I thought that one can leave all three settings false, and texexec
> will still produce the same pdf just with more runs?
> 
> This is with context 2006.12.27 (from the Debian context package),
> pdftex 1.40.0, metapost 0.993, plus mostly texlive 2005.
> 
> =================== begin: jjj.tex ==================
> \starttext
> 
> \startstaticMPfigure{fig:ellipse}
>   path p;
>   p := fullcircle scaled 2in yscaled 0.5;
>   label(btex hello etex, origin);
>   draw p;
> \stopstaticMPfigure
> 
> \placefigure[right,none]{}{\usestaticMPfigure[fig:ellipse]}
> 
> \input tufte
> 
> \stoptext
> ===================   end: jjj.tex ==================
> 
> -Sanjoy
> 
> `A nation of slaves is always prepared to applaud the clemency of their
>  master who, in the abuse of absolute power, does not proceed to the
>  last extremes of injustice and oppression.'  (Gibbon)  
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: staticMPfigure problem with \runMP[TEX]graphicsfalse
  2007-01-04  9:35 ` Taco Hoekwater
@ 2007-01-04 13:49   ` Sanjoy Mahajan
  0 siblings, 0 replies; 7+ messages in thread
From: Sanjoy Mahajan @ 2007-01-04 13:49 UTC (permalink / raw)


Taco writes:
> Hans always runs with all three switches true, so he never has any
> problems, but Mojca and I also regularly have issues like this. The
> last of those was the incorrect scaling of sometxt() in
> \runmpgraphicsfalse reported two or three weeks back.  

Good to know that it isn't something I did when changing to texlive
from tetex.  Mine might be a similar problem to what you describe
about sometxt (although I used btex..etex), because in my example the
figure has the wrong width (very narrow).

> Hans, can you look at this, please? Or, if you don't want to support
> \runmpgraphics false any more, document that somewhere.

When the output depends on the settings, documents lose portability to
other ConTeXt installations. Most set shell_escape = f, the tetex and
texlive default, and most users won't have set \runMP[TEX]graphicstrue
in cont-sys.rme.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)

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

* Re: staticMPfigure problem with \runMP[TEX]graphicsfalse
  2007-01-04  7:33 staticMPfigure problem with \runMP[TEX]graphicsfalse Sanjoy Mahajan
  2007-01-04  9:35 ` Taco Hoekwater
@ 2007-01-04 15:37 ` Hans Hagen
  2007-01-04 17:28   ` Sanjoy Mahajan
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2007-01-04 15:37 UTC (permalink / raw)


Sanjoy Mahajan wrote:
> Not sure if the following are new behaviors or are the correct ones but
> I'm just misunderstanding.  The following jjj.tex file doesn't correctly
> generate and include the static metapost figure unless I set
> \runMPgraphicstrue and \runMPTEXgraphicstrue in cont-sys.rme and set
> shell_escape = t.
>
> If \runMPgraphicsfalse and \runMPTEXgraphicsfalse but shell_escape = t,
> then the generated pdf figure is only 1pt wide but is included.  If all
> settings are false, then there's a grey square saying 'dummy' etc.
>
>   
static graphics were never meant to be used otherwise so they force runMPgraphicstrue

I made an untested patch an dwill upload a beta later 

Hans 


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: staticMPfigure problem with \runMP[TEX]graphicsfalse
  2007-01-04 15:37 ` Hans Hagen
@ 2007-01-04 17:28   ` Sanjoy Mahajan
  2007-01-04 21:44     ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Sanjoy Mahajan @ 2007-01-04 17:28 UTC (permalink / raw)


> static graphics were never meant to be used otherwise so they force
> runMPgraphicstrue

Hmm, deja vu a bit -- you may have explained that point to me once
before.

> I made an untested patch an dwill upload a beta later 

Thanks, I'll be happy to test.  Will it require shell_escape = t ?

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)

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

* Re: staticMPfigure problem with \runMP[TEX]graphicsfalse
  2007-01-04 17:28   ` Sanjoy Mahajan
@ 2007-01-04 21:44     ` Hans Hagen
  2007-01-05  2:38       ` Sanjoy Mahajan
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2007-01-04 21:44 UTC (permalink / raw)


Sanjoy Mahajan wrote:
>> static graphics were never meant to be used otherwise so they force
>> runMPgraphicstrue
>>     
>
> Hmm, deja vu a bit -- you may have explained that point to me once
> before.
>
>   
>> I made an untested patch an dwill upload a beta later 
>>     
>
> Thanks, I'll be happy to test.  Will it require shell_escape = t ?
>
>   
you can test the beta 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: staticMPfigure problem with \runMP[TEX]graphicsfalse
  2007-01-04 21:44     ` Hans Hagen
@ 2007-01-05  2:38       ` Sanjoy Mahajan
  0 siblings, 0 replies; 7+ messages in thread
From: Sanjoy Mahajan @ 2007-01-05  2:38 UTC (permalink / raw)


> you can test the beta 

I used the same test file:

\starttext

\startstaticMPfigure{fig:ellipse}
  path p;
  p := fullcircle scaled 2in yscaled 0.5;
  label(btex hello etex, origin);
  draw p;
\stopstaticMPfigure

\placefigure[right,none]{}{\usestaticMPfigure[fig:ellipse]}

\input tufte

\stoptext


No luck with ver: 2007.01.04 17:37 MK II.  With all three settings
(the two runMP... ones and shell_escape) false, the static figure is
about 1pt wide.  The tufte text has a slight indentation in the right
margin to make room for it.

With all three settings true, it works fine.

With the run* settings true but shell_escape false, the whitespace
allocated is a block for a 'dummy' rectangle (with grey background).

So it looks like the same behavior as before.

With all the settings false, this is the texexec.tex produced:

\setupoutput[pdftex]
\setupcolors[state=start]
\global \loadfontfileoncetrue \readfile {cont-en.tmp}{}{}\starttext
\startMPpage


beginfig(1);

path p;
p := fullcircle scaled 2in yscaled 0.5;
label(btex hello etex, origin);
draw p;

endfig; \stopMPpage
\stoptext


Running 'texexec texexec.tex' produces the right pdf file, so I don't
know what's going on.  But off-list I'm sending you a tar.gz file that
has the two runs, each in a separate directory, and then the recursive
diff of them.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)

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

end of thread, other threads:[~2007-01-05  2:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-04  7:33 staticMPfigure problem with \runMP[TEX]graphicsfalse Sanjoy Mahajan
2007-01-04  9:35 ` Taco Hoekwater
2007-01-04 13:49   ` Sanjoy Mahajan
2007-01-04 15:37 ` Hans Hagen
2007-01-04 17:28   ` Sanjoy Mahajan
2007-01-04 21:44     ` Hans Hagen
2007-01-05  2:38       ` Sanjoy 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).