Bug#122406: marked as forwarded (tetex-base: supp-pdf.tex version is buggy)
Your message dated Fri, 27 Dec 2002 08:54:23 +0900 (JST)
with message-id <20021227.085423.104043238.kohda@pm.tokushima-u.ac.jp>
has caused the Debian Bug report #122406,
regarding tetex-base: supp-pdf.tex version is buggy
to be marked as having been forwarded to the upstream software
author(s) tetex-pretest@dbs.uni-hannover.de.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
---------------------------------------
Received: (at 122406-forwarded) by bugs.debian.org; 26 Dec 2002 23:54:38 +0000
>From kohda@pm.tokushima-u.ac.jp Thu Dec 26 17:54:37 2002
Return-path: <kohda@pm.tokushima-u.ac.jp>
Received: from civic.pm.tokushima-u.ac.jp [150.59.48.140] (mail)
by master.debian.org with esmtp (Exim 3.12 1 (Debian))
id 18Rhpl-0001gO-00; Thu, 26 Dec 2002 17:54:37 -0600
Received: from localhost ([127.0.0.1] ident=kohda)
by civic.pm.tokushima-u.ac.jp with esmtp (Exim 3.36 #1 (Debian))
id 18Rhpa-0002Nc-00; Fri, 27 Dec 2002 08:54:26 +0900
Date: Fri, 27 Dec 2002 08:54:23 +0900 (JST)
Message-Id: <20021227.085423.104043238.kohda@pm.tokushima-u.ac.jp>
To: tetex-pretest@dbs.uni-hannover.de
Cc: 122406-forwarded@bugs.debian.org, Jean-Christophe.Dubacq@lri.fr
Subject: supp-pdf.tex's problem
From: Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp>
X-Mailer: Mew version 3.1 on Emacs 21.2 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Delivered-To: 122406-forwarded@bugs.debian.org
X-Spam-Status: No, hits=0.0 required=5.0
tests=PATCH_UNIFIED_DIFF,SPAM_PHRASE_00_01
version=2.41
X-Spam-Level:
Hi,
[Please CC to 122406-forwarded@bugs.debian.org also.]
I am one of maintainers of teTeX for Debian and got
the following bug (1 year old);
The version of supp-pdf.tex in [sid/unstable] is buggy.
The bug is explained at:
http://ml-archives.mini.pw.edu.pl/ntg-context/msg01800.html
This package is part of ConTeXt, but is necessary for including
graphics in pdf files made with pdflatex.
Fix is simple: find the current version of supp-pdf.tex (eg
at http://www.tug.org/applications/pdftex/) (oddly enough,
the date of this file is the same as the released date in
sid, but the file is not identical) and use it instead.
And I compared the one from http://www.tug.org/applications/pdftex/
with the one in the latest teTeX-texmf-beta-20021225.tar.gz
then, it is true that they have the same version (date) number
but not the same indeed.
I don't know anything about this supp-pdf.tex but there
seemed something wrong with it.
Best regards, 2002.12.27(Fri)
--
Debian Developer & Debian JP Developer - much more I18N of Debian
Atsuhito Kohda <kohda@debian.org>
Department of Math., Univ. of Tokushima
P.S. Here is the diff of the two files;
--- tetex/supp-pdf.tex 2002-12-27 08:30:41.000000000 +0900
+++ fixed/supp-pdf.tex 2002-12-25 20:47:18.000000000 +0900
@@ -109,15 +109,15 @@
\def\dopdfclippedimage#1#2#3#4#5#6%
{\bgroup
\pdfximage#1{#2}%
- \setbox\scratchbox\hbox
+ \setbox\scratchbox=\hbox
{\pdfrefximage\pdflastximage}%
- \hsize\wd\scratchbox
- \advance\hsize -#3
- \advance\hsize -#4
- \vsize\ht\scratchbox
- \advance\vsize -#5
- \advance\vsize -#6
- \setbox\scratchbox\vbox to \vsize
+ \hsize=\wd\scratchbox
+ \advance\hsize by -#3
+ \advance\hsize by -#4
+ \vsize=\ht\scratchbox
+ \advance\vsize by -#5
+ \advance\vsize by -#6
+ \setbox\scratchbox=\vbox to \vsize
{\vskip-#5\hbox to \hsize{\hskip-#3\box\scratchbox\hss}}%
\pdfxform\scratchbox
\pdfrefxform\pdflastxform
@@ -197,8 +197,6 @@
%D dimensions. Beware: the user supplied values are not the
%D bounding box ones!
-% this will become obsolete
-
\newif\ifPDFmediaboxprefered
\def\setPDFboundingbox#1#2#3#4#5#6%
@@ -216,8 +214,8 @@
\def\setPDFmediabox#1[#2 #3 #4 #5]#6\done%
{\dimen2=#2bp\dimen2=-\dimen2
\dimen4=#3bp\dimen4=-\dimen4
- \dimen6=#4bp\advance\dimen6 \dimen2
- \dimen8=#5bp\advance\dimen8 \dimen4
+ \dimen6=#4bp\advance\dimen6 by \dimen2
+ \dimen8=#5bp\advance\dimen8 by \dimen4
\setPDFboundingbox{\dimen2}{\dimen4}{\dimen6}{\dimen8}\PDFxscale\PDFyscale}
\def\checkPDFmediabox#1/MediaBox#2#3\done%
@@ -232,7 +230,7 @@
\def\handlePDFline%
{\ifx\@@PDFstream@@\fileline
- \let\doprocessPDFline\copyPDFobject
+ \let\doprocessPDFline=\copyPDFobject
\startPDFtoPDF
\else\ifPDFmediaboxprefered
\expandafter\checkPDFmediabox\fileline/MediaBox\relax\done
@@ -241,12 +239,12 @@
\def\copyPDFobject%
{\ifx\@@PDFendstream@@\fileline
\ifPDFmediaboxprefered
- \let\doprocessPDFline\findPDFmediabox
+ \let\doprocessPDFline=\findPDFmediabox
\else
- \let\doprocessPDFline\relax
+ \let\doprocessPDFline=\relax
\fi
\else
- \advance\scratchcounter 1
+ \advance\scratchcounter by 1
\PDFcode{\fileline}%
\fi}
@@ -326,9 +324,9 @@
\def\checkPDFtypepage##1/Type /Page##2##3\done%
{\ifx##2\relax
\else\if##2s% accept /Page and /Pages
- \let\doprocessPDFline\findPDFmediabox
+ \let\doprocessPDFline=\findPDFmediabox
\else
- \let\doprocessPDFline\findPDFmediabox
+ \let\doprocessPDFline=\findPDFmediabox
\fi\fi}%
\def\findPDFtypepage%
{\expandafter\checkPDFtypepage\fileline/Type /Page\relax\done}%
@@ -339,7 +337,7 @@
\fi}%
\def\findPDFmediabox%
{\expandafter\checkPDFmediabox\fileline/MediaBox\relax\done}%
- \let\doprocessPDFline\findPDFtypepage
+ \let\doprocessPDFline=\findPDFtypepage
\doprocessfile\scratchread{#1}\doprocessPDFline
\egroup
\ifx\PDFxoffset\undefined
@@ -709,10 +707,6 @@
{\PDFcode{\!MPgMPa1 g
\!MPgMPa1 G}}
-\def\handleMPspotcolor
- {\PDFcode{0 g
- 0 G}}
-
%D Beginning and ending the graphics is taken care of by the
%D macro \type{\handleMPgraphic}, which is redefined when
%D the first graphics operator is met.
@@ -771,10 +765,10 @@
\xdef\MPyoffset{\withoutpt{\the\dimen2}}%
\dimen0=#2bp\dimen0=-\dimen0
\dimen2=#3bp\dimen2=-\dimen2
- \advance\dimen0 #4bp
+ \advance\dimen0 by #4bp
\dimen0=\MPxscale\dimen0
\xdef\MPwidth{\the\dimen0}%
- \advance\dimen2 #5bp
+ \advance\dimen2 by #5bp
\xdef\MPyshift{\the\dimen2}% unscaled
\dimen2=\MPyscale\dimen2
\xdef\MPheight{\the\dimen2}%
@@ -835,9 +829,9 @@
\let\MPfshowcommand\empty
-\def\handleMPfshow
+\def\handleMPfshow%
{\bgroup
- \setbox\scratchbox\hbox
+ \setbox\scratchbox=\hbox
{\obeyMPspecials
\edef\size{\gMPa\nofMParguments}%
\ifx\size\PSnfont % round font size (to pt)
@@ -867,8 +861,7 @@
% we need to catch ( a ) (a a a) (\123 \123 \123) etc
\scratchcounter=1
\def\dodo##1% Andreas Fieger's bug: (\304...)
- {\edef\!!stringa{##1\empty\empty}% and another one: ( 11) -> \ifx 11
- \ifx\!!stringa\MPspacechar\MPspacechar\else\expandafter##1\fi}%
+ {\ifx##1\MPspacechar\MPspacechar\else\expandafter##1\fi}%
\def\do(##1{\dodo{##1}}%
\dogMPa\scratchcounter\MPspacechar
\let\do\relax
@@ -895,7 +888,7 @@
% \PDFcode{Q}%
% \egroup}
%
- \setbox\scratchbox\hbox
+ \setbox\scratchbox=\hbox
{\hskip\lastMPmoveX bp\raise\lastMPmoveY bp\box\scratchbox}%
\ht\scratchbox\!!zeropoint
\dp\scratchbox\!!zeropoint
@@ -918,11 +911,7 @@
%D safely assume that \METAPOST\ considers \type {\char32} to
%D be the space.
-\def\MPspacechar{\setbox\scratchbox\hbox{\char32}\kern\wd\scratchbox}
-
-%D Well, this does not work with math fonts, so:
-
-\def\MPspacechar{\char32\relax}
+\def\MPspacechar{\setbox\scratchbox=\hbox{\char32}\kern\wd\scratchbox}
%D Most operators are just converted and keep their
%D arguments. Dashes however need a bit different treatment,
@@ -936,7 +925,7 @@
\def\handleMPsetdash%
{\bgroup
\def\somestring{[}%
- \scratchcounter1
+ \scratchcounter=1
\loop
\ifnum\scratchcounter<\nofMParguments
\edef\somestring{\somestring\space\gMPa\scratchcounter}%
@@ -1072,8 +1061,8 @@
\fi}
\def\flushconcatMPpath%
- {\scratchcounter\nofMPsegments
- \nofMPsegments1
+ {\scratchcounter=\nofMPsegments
+ \nofMPsegments=1
\loop
\flushconcatMPsegment
\advance\nofMPsegments 1
@@ -1290,46 +1279,44 @@
% \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
% \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
-%D We cannot use \type {\beginETEX} here since in plain we
-%D get \type {\outer} problems, sigh.
+\beginETEX
-% \beginTEX
+ \newdimen\MPcriteriumA \MPcriteriumA=512pt
+ \newdimen\MPcriteriumB \MPcriteriumB= 2pt
-\def\MPcriteriumA {512pt} % scale
-\def\MPcriteriumB {2pt} % scale
+\endETEX
-% \endTEX
-%
+%D We don't waste dimen registers when uting normal \TEX:
-% \ifx\MPcriteriumA\undefined
-%
-% \newdimen\MPcriteriumA \MPcriteriumA=512pt
-% \newdimen\MPcriteriumB \MPcriteriumB= 2pt
-%
-% \fi
+\beginTEX
+
+ \def\MPcriteriumA{512pt} % position
+ \def\MPcriteriumB {2pt} % scale
+
+\endTEX
\def\doMPconcat#1#2#3#4%
{\dimen12=#1pt % p_x
\dimen14=#3pt % p_y
%
- \chardef\MPfactor0
- \ifdim\dimen4<\MPcriteriumB\ifdim\dimen4>-\MPcriteriumB
- \ifdim\dimen6<\MPcriteriumB\ifdim\dimen6>-\MPcriteriumB
- \ifdim\dimen8<\MPcriteriumB\ifdim\dimen8>-\MPcriteriumB
- \ifdim\dimen10<\MPcriteriumB\ifdim\dimen10>-\MPcriteriumB
- \chardef\MPfactor1
- \fi\fi
- \fi\fi
- \fi\fi
- \fi\fi
- \ifcase\MPfactor0
- \chardef\MPfactor1
- \ifdim\dimen12<\MPcriteriumA\ifdim\dimen12>-\MPcriteriumA
- \ifdim\dimen14<\MPcriteriumA\ifdim\dimen14>-\MPcriteriumA
- \chardef\MPfactor16
- \fi\fi
- \fi\fi
- \fi
+\chardef\MPfactor0
+\ifdim\dimen4<\MPcriteriumB\ifdim\dimen4>-\MPcriteriumB
+ \ifdim\dimen6<\MPcriteriumB\ifdim\dimen6>-\MPcriteriumB
+ \ifdim\dimen8<\MPcriteriumB\ifdim\dimen8>-\MPcriteriumB
+ \ifdim\dimen10<\MPcriteriumB\ifdim\dimen10>-\MPcriteriumB
+ \chardef\MPfactor1
+ \fi\fi
+ \fi\fi
+ \fi\fi
+\fi\fi
+\ifcase\MPfactor0
+ \chardef\MPfactor1
+ \ifdim\dimen12<\MPcriteriumA\ifdim\dimen12>-\MPcriteriumA
+ \ifdim\dimen14<\MPcriteriumA\ifdim\dimen14>-\MPcriteriumA
+ \chardef\MPfactor16
+ \fi\fi
+ \fi\fi
+\fi
%
\multiply\dimen12 \MPfactor
\multiply\dimen14 \MPfactor
@@ -1627,7 +1614,7 @@
\fi
\let\handleMPsequence\dohandleMPsequence
\resetMPstack
- \nofMPsegments0
+ \nofMPsegments=0
\handleMPsequence}
%D The following \METAPOST\ code is quite valid but, when
@@ -1646,7 +1633,7 @@
{\ifcase\finiMPpath
\ifnum\nofMPsegments<3 % n is one ahead
\message{omitting zero clip path}%
- \nofMPsegments0
+ \nofMPsegments=0
\fi
\fi}
@@ -1763,7 +1750,7 @@
\def\convertMPtoPDF#1#2#3%
{\bgroup
\ifx\pdfdecimaldigits\undefined\else \pdfdecimaldigits=5 \fi % new
- \setbox\scratchbox\vbox\bgroup
+ \setbox\scratchbox=\vbox\bgroup
\forgetall
\offinterlineskip
\startMPresources
@@ -1839,16 +1826,16 @@
\def\PDFMPformoffset
{\ifx\objectoffset\undefined\!!zeropoint\else\objectoffset\fi}
-\def\finishMPgraphic
+\def\finishMPgraphic%
{\stopMPresources
\egroup
\ifx\pdftexversion\undefined\else\ifnum\pdftexversion<14 % for the moment
- \chardef\makeMPintoPDFobject0
+ \chardef\makeMPintoPDFobject=0
\fi\fi
\ifcase\makeMPintoPDFobject\or\or\ifx\currentPDFresources\empty\else
- \chardef\makeMPintoPDFobject1
+ \chardef\makeMPintoPDFobject=1
\fi\fi
- \setbox\scratchbox\vbox
+ \setbox\scratchbox=\vbox
{\forgetall
\hbox
{\PDFcode{q \MPxscale\space 0 0 \MPyscale\space \MPxoffset\space \MPyoffset\space cm}%
@@ -1860,7 +1847,7 @@
\ifcase\makeMPintoPDFobject
\box\scratchbox
\or
- \scratchdimen\PDFMPformoffset\relax
+ \scratchdimen=\PDFMPformoffset\relax
\ifdim\scratchdimen>\!!zeropoint % compensate for error
\setbox\scratchbox=\vbox spread 2\scratchdimen
{\forgetall
Reply to: