(apparently) you need to run extractbb testa.pdf
after processing testa.tex and before testb.tex 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. David On 1 January 2018 at 23:22, <msk...@ansuz.sooke.bc.ca> wrote: > I've run into a problem when using all three of XeLaTeX, LaTeX.mk, and > pdfpages, in their current versions from the latest TeXLive. It appears > that in order to determine file dependencies, LaTeX.mk runs the TeX engine > with the texdepends package (which is part of LaTeX.mk) wedged into the > input file; then texdepends intercepts a bunch of internal macros used by > various graphics packages including indirectly by pdfpages, and the result > is a failure with "arithmetic overflow" when trying to include PDF files. > > All three elements seem to be necessary: it doesn't happen with other TeX > engines I've tried; when invoking XeLaTeX manually instead of through > LaTeX.mk; nor without using pdfpages. However, I can also reproduce the > problem by loading texdepends in my .tex file (with \RequirePackage - it > must be loaded before \documentclass and \usepackage cannot be used then) > and running xelatex from the command line instead of through make. > > The relevant messages in the log file when it fails look like: > > Package texdepends Warning: No 'testa.xbb' file > (texdepends) using 1 for graphic dimensions on input line 31. > > File: testa.pdf Graphic file (type pdf) > <use testa.pdf, page 1> > ! Arithmetic overflow. > <recently read> \calc@Acount > > l.31 \includepdf[pages=-]{testa.pdf} > > Any thoughts on how this might be fixable? > > -- > Matthew Skala > msk...@ansuz.sooke.bc.ca People before principles. > http://ansuz.sooke.bc.ca/ > > > -------------------------------------------------- > Subscriptions, Archive, and List information, etc.: > http://tug.org/mailman/listinfo/xetex > -------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex