I have document with many figures as following:

        \includegraphics[width=\textwidth, trim = 0px 200px 100px 30px,clip]{A.png}
        \includegraphics[width=\textwidth, trim = 83px 210px 150px 115px,clip]{B.png}
    \caption{Caption text}

Document were compiled by pdflatex therefore px unites were used. How this can be compiled by xelatex where px unit are not supported. What is the simplest modification to preserve the same visual impression?

  • Using px is wrong to begin with, see tex.stackexchange.com/questions/33370/… – egreg Sep 19 '16 at 10:39
  • @egreg this aroused my curiosity a bit. Do you know if XeTeX's definition of pt is different than PdfLaTeX? (I compiled the OP's example with both and the results are tremendously different) – Guilherme Zanotelli Sep 19 '16 at 10:49
  • Of course 1pt is the same for both engines – egreg Sep 19 '16 at 10:53
  • 1
    If you don't change \pdfpxdimen as explained in the linked answer, the value of 1px is the same as 1bp (and XeTeX knows bp units). – egreg Sep 19 '16 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.