# [tex-live] [XeTeX] xetex.def

Akira Kakuto kakuto at fuk.kindai.ac.jp
Tue May 9 15:19:07 CEST 2017

Dear Joseph,

> Following a bug report for (x)dvipdfmx box scaling, we are talking a
> look at xetex.def and dvidpfmx.def to fix that and related issues. This
> raises a question: what is the reason for having two .def files here. A
> quick test suggests that XeTeX (xdvipdfmx) can happily use dvipdfmx.def
> with the exception of a few lines at the end of the file: those could

I'm not familiar with the drivers, but I think that the independent
xetex.def is definitely needed.

I think that images png, jpg, pdf, are efficiently embedded in XeTeX,
probably by using primitives, while dvipdfmx requires an external
program extractbb to obtain sizes of the images.

For example,

%
% xelatex test.tex    (xetex.def)
%
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={1-9}]{xtst.pdf}
\end{document}

is far faster than

%
% xelatex test.tex   (dvipdfmx.def)
%
\documentclass[12pt,dvipdfmx]{article}
\usepackage{graphicx}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={1-9}]{xtst.pdf}
\end{document}

Best,
Akira