I have a problem with a bookdown job running on travis (runs fine on my machine). the html builds fine, the latex version fails. it complains about a "wrong measure". The offending code chunk is (apparently) this one, and the fact that I used option out.width="700px"
?
! Illegal unit of measure (pt inserted).
<to be read again>
p
l.6137 ...ludegraphics[width=700px]{images/pasta1}
Error: Failed to compile ScPoEconometrics.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See ScPoEconometrics.log for more info.
Execution halted
So that's just a JPG image to be included. I read that this works with pdflatex
, not sure about xelatex
(which is what bookdown is using?). the travis job is here.
EDIT
MWE using px in latex:
\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\begin{document}
\noindent\includegraphics[width=3cm]{example-image-a}\qquad
\includegraphics[width=3cm]{example-image-golden}\qquad
\includegraphics[width=50px]{example-grid-100x100pt}
\includegraphics[width=30px]{example-grid-100x100pt}
\end{document}