ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: supp-mps.tex minor bugs found and their fixes
       [not found] <Pine.LNX.4.33.0111101929170.9924-100000@bioinf.medicina.un iovi.es>
@ 2001-11-12  9:58 ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2001-11-12  9:58 UTC (permalink / raw)
  Cc: ntg-context

At 07:30 PM 11/10/2001 +0100, Ricardo Sanchez Carmenes wrote:

>Dear Hans:
>
>
>I have found some bugs in supp-mps.tex that are shown when using
>this module with plain (i.e., without loading the whole context
>package).
>
>
>The supp-mps.tex file included in your latest beta/cont-tmf.zip
>contains a minor bug that shows up when trying to use metapost
>from tex->dvips->ps2pdf. The following diff fixes this bug:
>
>diff -u beta/supp-mps.tex fix/supp-mps.tex
>--- beta/supp-mps.tex   Thu Aug 30 18:06:00 2001
>+++ fix/supp-mps.tex    Sat Nov 10 13:12:08 2001
>@@ -545,9 +545,9 @@
>  \def\nouseMPbox#1%
>    {\setxvalue{#1}%
>       {\noexpand\forgetall
>        \noexpand\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
>-      \deallocateMPslot\currentMPgraphic
>+      \noexpand\deallocateMPslot\currentMPgraphic
>        \noexpand\placeMPgraphic}}
>
>  \ifCONTEXT \else \let\douseMPbox=\nouseMPbox          \fi
>  \ifCONTEXT \else \let\doifobjectssupportedelse=\relax \fi

hm, in that case the number shopuld also be {}'d

\def\nouseMPbox#1%
   {\setxvalue{#1}%
      {\noexpand\forgetall
       \noexpand\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
       \noexpand\deallocateMPslot{\currentMPgraphic}%
       \noexpand\placeMPgraphic}}

>Additionally, either the beta and the current official releases
>of supp-mps.tex try to check the value of \pdfoutput, even from
>classic-tex. The following, placed early in the file, may solve
>the problem without harming:
>
>% supp-mps.tex checks \pdfoutput, even if undefined!
>\ifx\pdftexversion\undefined\def\pdfoutput{0}\fi

I prefer:

\ifx \undefined \pdfoutput      \else \chardef\pdfoutput=0       \fi

which is a better one for testing

>And, finally, \startreusableMPgraphic uses the \ifundefined macro,
>which is itself undefined! The following addition could solve the
>problem:
>
>% \startreusableMPgraphic needs this (yet) undefined macro:
>\ifx\ifundefined\undefined
>\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
>\fi

ok, goes in supp-mis.tex

There may be a few more things, since I recently cleaned up / changed a 
couple of things.

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       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] 3+ messages in thread

* Re: supp-mps.tex minor bugs found and their fixes
@ 2001-11-15  9:47 Ricardo Sanchez Carmenes
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Sanchez Carmenes @ 2001-11-15  9:47 UTC (permalink / raw)
  Cc: ntg-context

On Mon, 12 Nov 2001, Hans Hagen wrote:

> >% supp-mps.tex checks \pdfoutput, even if undefined!
> >\ifx\pdftexversion\undefined\def\pdfoutput{0}\fi
>
> I prefer:
>
> \ifx \undefined \pdfoutput      \else \chardef\pdfoutput=0       \fi
>
> which is a better one for testing

Yes, but I would remove the "\else" :)

Ricardo.


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

* supp-mps.tex minor bugs found and their fixes
@ 2001-11-10 18:30 Ricardo Sanchez Carmenes
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Sanchez Carmenes @ 2001-11-10 18:30 UTC (permalink / raw)


Dear Hans:

I have found some bugs in supp-mps.tex that are shown when using
this module with plain (i.e., without loading the whole context
package).

The supp-mps.tex file included in your latest beta/cont-tmf.zip
contains a minor bug that shows up when trying to use metapost
from tex->dvips->ps2pdf. The following diff fixes this bug:

diff -u beta/supp-mps.tex fix/supp-mps.tex
--- beta/supp-mps.tex	Thu Aug 30 18:06:00 2001
+++ fix/supp-mps.tex	Sat Nov 10 13:12:08 2001
@@ -545,9 +545,9 @@
 \def\nouseMPbox#1%
   {\setxvalue{#1}%
      {\noexpand\forgetall
       \noexpand\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
-      \deallocateMPslot\currentMPgraphic
+      \noexpand\deallocateMPslot\currentMPgraphic
       \noexpand\placeMPgraphic}}

 \ifCONTEXT \else \let\douseMPbox=\nouseMPbox          \fi
 \ifCONTEXT \else \let\doifobjectssupportedelse=\relax \fi

Additionally, either the beta and the current official releases
of supp-mps.tex try to check the value of \pdfoutput, even from
classic-tex. The following, placed early in the file, may solve
the problem without harming:

% supp-mps.tex checks \pdfoutput, even if undefined!
\ifx\pdftexversion\undefined\def\pdfoutput{0}\fi

And, finally, \startreusableMPgraphic uses the \ifundefined macro,
which is itself undefined! The following addition could solve the
problem:

% \startreusableMPgraphic needs this (yet) undefined macro:
\ifx\ifundefined\undefined
\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
\fi

Regards,
Ricardo.


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

end of thread, other threads:[~2001-11-15  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.33.0111101929170.9924-100000@bioinf.medicina.un iovi.es>
2001-11-12  9:58 ` supp-mps.tex minor bugs found and their fixes Hans Hagen
2001-11-15  9:47 Ricardo Sanchez Carmenes
  -- strict thread matches above, loose matches on Subject: below --
2001-11-10 18:30 Ricardo Sanchez Carmenes

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