ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem with supp-pdf.tex
@ 2001-01-19 16:53 Andreas Fieger
  2001-01-19 19:37 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Fieger @ 2001-01-19 16:53 UTC (permalink / raw)


Dear all,

after installing a new TeX (Web2C 7.3.2x) I' having a problem 
with included MetaPost figures. I'm using pdflatex to compile,
but as I found supp-pdf.tex (part of conTeXt) to be involved,
I hope I'm not off topic on this list.

I include the source with further descriptions and the
results I found so far below.

Any ideas?

Thanks,

Andreas

% TeX used to compile:
% pdfTeX 3.14159-14f-released-20000525 (Web2C 7.3.2x)
%
% Result:
% badly positioned text after graphics inclusion by
% \usepackage[pdftex]{graphicx} and \includegraphics{<file>}
% which also reads supp-pdf.tex from the Context macro package.
%
% The graphics file mptest.mps is produced by
%
%   beginfig(1);
%     label("a simple graphics file", origin);
%   endfig;
%   end
%
% and simply
%
%   cp mptest.1 mptest.mps
%
%
% The definitions in supp-pdf.tex seem to be the problem:
% Version 1999.26.01 produces the badly positioned text, whereas
% Version 2000.04.28 produces an error in the MetaPost label 
% (extra `[' and `]' arround words).
%
% The difference between the two Versions seems to be the bounding box
% as we can see from the \fbox{} output. With Version 2000.04.28 the BB
is
% correct (the text extends the BB only because of the additional `['s).
%
% Further, we only observe the problem only with 
%   label("This is a simple graphics file", origin);
% not with 
%   label(btex This is a simple graphics file etex, origin);
% as this results in different ps code where every word is
% positioned by itself and the problem seems to be with the 
% spaces between words.
% 
% By runnning diff on the two versions of supp-pdf.tex
% and experimenting a bit (without really understanding 
% the \TeX-code) we find (?) the problem in 
%
%            [\gMPa\scratchcounter]\space
%
% (see definition of \handleMPfshow in sup-pdf.tex version=2000.04.28). 
%
% If we change it to 
%
%            \gMPa\scratchcounter\space
%
% everything seems to work fine (except for a slightly too narrow
% bounding box which is probabply due to the missing `space-character' 
% in cmr; if we change the font by using defaultfont:="phvr8r"; the
% bounding box is OK). 
%
% I don't understand the concept behind the macro definition
% but there surely is some reason to have the `[' and `]'
% I deleted. I simply did not observe it yet.
% 

\documentclass[pdftex]{article}

\usepackage{graphicx}

\begin{document}

Text only: pagenumber in bottom center position.

\newpage

Text \par \fbox{\includegraphics{mptest.mps}} \par plus graphics:
pagenumber and text following graphics inclusion not properly
positioned or `[' `]' arround words (depending on the version
of supp-pdf.tex read in above).

\end{document}

-- 
Andreas Fieger
ServiceBarometer AG
Tel +49.89. 89 66 69 17
        _ o
      _`\<,
_____( )/( )_____


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

* Re: problem with supp-pdf.tex
  2001-01-19 16:53 problem with supp-pdf.tex Andreas Fieger
@ 2001-01-19 19:37 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2001-01-19 19:37 UTC (permalink / raw)
  Cc: ntg-context

At 05:53 PM 1/19/01 +0100, Andreas Fieger wrote:

>% Version 2000.04.28 produces an error in the MetaPost label 
>% (extra `[' and `]' arround words).

Can you try the latest version? There have been problems with spaces
[happens in strings] which were solved, 

>% and experimenting a bit (without really understanding 
>% the \TeX-code) we find (?) the problem in 
>%
>%            [\gMPa\scratchcounter]\space

Indeed, that has been there for a short moment, some left over from testing. 

>% (see definition of \handleMPfshow in sup-pdf.tex version=2000.04.28). 
>%
>% If we change it to 
>%
>%            \gMPa\scratchcounter\space
>%
>% everything seems to work fine (except for a slightly too narrow
>% bounding box which is probabply due to the missing `space-character' 
>% in cmr; if we change the font by using defaultfont:="phvr8r"; the
>% bounding box is OK). 

that is (at least as far as i can test) solved by using a box instead.
There should be some 

\def\MPspacechar%
  {\setbox\scratchbox=\hbox{\char32}\kern\wd\scratchbox}%

code in there. 

>% I don't understand the concept behind the macro definition

it was there purely for testing and i forgot to remove it, unfortunately
supp-pdf is coppied to other locations, instead of simply taking the one in
the context subtree. 

There are a few other changes, but these deal with improved clipping and
bbox issues but i don't think that that branch in the cod is used outside
context.

[if needed, you can convert mp graphics to stand alone pdf with the mptopdf
format which also takes care of things like shading, outline fonts, and
graphic inclusion in metapost code as well]

So, the solution to your problem is: fetch the latest context from our
site, unzip the cont-tmf file in the texmf root, and your latex will
probably work again; make sure that no other copies live on your system]

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] 2+ messages in thread

end of thread, other threads:[~2001-01-19 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-19 16:53 problem with supp-pdf.tex Andreas Fieger
2001-01-19 19:37 ` 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).