[XeTeX] Conflict among XeLaTeX, LaTeX.mk, and pdfpages

Andreas Matthias andreas.matthias at gmail.com
Thu Jan 11 18:41:20 CET 2018


David Carlisle wrote:

> (apparently) you need to run
>
> extractbb testa.pdf
>
> after processing testa.tex and before testb.tex

Seems like texdepends insists on using extractbb which is very unfortunate since
graphicx.sty and xetex (xdvipdfmx) don't need it at all.

Using extractbb has one big drawback: It extracts the bounding box of only
/one/ page. By default the fist page, or any other page by using the -p
option. Anyway the xbb-file contains the bounding box of only /one/ page and
this bounding box will be used for /all/ pages. If your PDF has varying page
dimensions, extractbb will wreak havoc.

> not sure if pdfpages should not require this but in any case the issue
> seems to be at the macro layer not
> in the xetex or xdvipdfmx binaries.

If an xbb-file is missing texdepends will set the page dimensions to 1pt x 1pt.
While this causes an arithmetic overflow with pdfpages, the situation is not much
better with pure graphicx which does not produce any errors but is tricked into
using wrong page dimensions. 

Running the following example with and without an xbb-file reveals the problem.


   \RequirePackage{texdepends}
   \documentclass[a4paper]{article}
   \usepackage{graphicx}

   \begin{document}
   \fbox{%
     \includegraphics[scale=.3]{dummy.pdf}}
   \end{document}


For me this seems to be a bug in texdepends.

Andreas



More information about the XeTeX mailing list