diff options
author | Karl Berry <karl@freefriends.org> | 2014-11-13 23:51:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-11-13 23:51:30 +0000 |
commit | c3397e2195329b400975b069f1f6e3b2092f84a8 (patch) | |
tree | b5e539b3ad03e58f7552c7ee323850336fe45f4b /Master/texmf-dist/doc | |
parent | d7ae9744636deb8a0695827d55cc483385ce7db0 (diff) |
epsf-dvipdfmx (13nov14)
git-svn-id: svn://tug.org/texlive/trunk@35575 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/plain/epsf-dvipdfmx/README | 51 | ||||
-rw-r--r-- | Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.eps | 22 | ||||
-rw-r--r-- | Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.tex | 13 |
3 files changed, 86 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/plain/epsf-dvipdfmx/README b/Master/texmf-dist/doc/plain/epsf-dvipdfmx/README new file mode 100644 index 00000000000..6a14341b4d5 --- /dev/null +++ b/Master/texmf-dist/doc/plain/epsf-dvipdfmx/README @@ -0,0 +1,51 @@ +epsf-dvipdfmx.tex is a plain TeX file to be \input after epsf.tex when +using plain TeX with dvipdfmx. As in: + +\input epsf +\input epsf-dvipdfmx + +It is needed when an .eps file has anything except the origin (0,0) for +the lower-left of its bounding box. + +An alternative is to use the LaTeX graphicx package from your plain TeX +document, as in: + \input miniltx + \input graphicx.sty + \input dvipdfmx.def % needed tex+dvipdfmx only, omit for xetex +Loading graphicx can also be done through Eplain (http://tug.org/eplain). +Of course graphicx has many more features than epsf.tex. + +That's the whole usage. The rest of this document is the explanation of +why it is necessary. +----------------------------------------------------------------------------- +The ultimate source of the problem is that the dvipdfmx driver has a +feature to autoconvert .eps files to .pdf in order to generate its PDF +output. By default, the conversion is done using Ghostscript. +Ghostscript forces the lower-left in the output to 0,0 regardless of the +input, and graphics programs (e.g., MetaPost) can create an .eps with a +lower-left that can be anything, depending on what is actually drawn +(e.g., a graph starting at (-10,-10)). + +Since this conversion happens at DVI processing time, it conflicts with +what the TeX code sees. The result is that the output is wrong; part of +the graphic is lost. Included in this distribution is a trivial TeX +file, graphic, and the bad output by default (the circle is cut off and +misplaced). You can observe that uncommenting the \input epsf-dvipdfmx +in the input file and rerunning tex+dvipdfmx produces good output (the +whole circle). + +This cannot be fixed in epsf.tex, which looks at the graphic as it +exists, with the arbitrary lower-left (and handles it properly), and has +no way of knowing that a driver is going to transform it. The two +reasonable workarounds for users are given above. + +It also cannot be fixed in the dvipdfmx program because the graphic +inclusion in TeX might also use the trim or viewport options, and +sufficient information is not passed through to handle them properly. + +The two viable workarounds for the problem that we have found are given above. +----------------------------------------------------------------------------- +This README was originally written in 2014 by Karl Berry. +The epsf-dvipdfmx.tex and test files were originally written in 2014 +by Akira Kakuto. +All released to the public domain. diff --git a/Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.eps b/Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.eps new file mode 100644 index 00000000000..232600a2c47 --- /dev/null +++ b/Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.eps @@ -0,0 +1,22 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: -40 -40 40 40 +%%CreationDate: 2014.09.15:0921 +%%BeginProlog +/bd{bind def}bind def/fshow {exch findfont exch scalefont setfont show}bd +/fcp{findfont dup length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall}bd +/fmc{FontMatrix dup length array copy dup dup}bd/fmd{/FontMatrix exch def}bd +/Amul{4 -1 roll exch mul 1000 div}bd/ExtendFont{fmc 0 get Amul 0 exch put fmd}bd +/ScaleFont{dup fmc 0 get Amul 0 exch put dup dup 3 get Amul 3 exch put fmd}bd +/SlantFont{fmc 2 get dup 0 eq{pop 1}if Amul FontMatrix 0 get mul 2 exch put fmd}bd +%%EndProlog + 1 0 0 setrgbcolor +newpath 40 0 moveto +40 10.60913 35.78491 20.78247 28.28369 28.28369 curveto +20.78247 35.78491 10.60913 40 0 40 curveto +-10.60913 40 -20.78247 35.78491 -28.28369 28.28369 curveto +-35.78491 20.78247 -40 10.60913 -40 0 curveto +-40 -10.60913 -35.78491 -20.78247 -28.28369 -28.28369 curveto +-20.78247 -35.78491 -10.60913 -40 0 -40 curveto +10.60913 -40 20.78247 -35.78491 28.28369 -28.28369 curveto +35.78491 -20.78247 40 -10.60913 40 0 curveto closepath fill +%%EOF diff --git a/Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.tex b/Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.tex new file mode 100644 index 00000000000..582d2fb1d0f --- /dev/null +++ b/Master/texmf-dist/doc/plain/epsf-dvipdfmx/testepdpx.tex @@ -0,0 +1,13 @@ +% Public domain. +% +% To see the problem, as described in the README: +% tex testepdpx; dvipdfmx testepdpx + +\input epsf + +% Uncomment to observe the problem being fixed: +%\input epsf-dvipdfmx + +\nopagenumbers +\centerline{\epsfxsize=8cm\epsfbox{testepdpx.eps}} +\bye |