--- org-plus-contrib-20191203/ox-latex.el 2019-12-06 17:28:34.258945803 +1100 +++ org-plus-contrib-20191203/ox-latex.el 2019-12-06 17:28:53.765352128 +1100 @@ -2411,21 +2411,22 @@ ;; - if options are present, wrap in a tikzpicture environment. ;; - if width or height are present, use \resizebox to change ;; the image size. - (progn - (setq image-code (format "\\input{%s}" path)) - (when (org-string-nw-p options) - (setq image-code - (format "\\begin{tikzpicture}[%s]\n%s\n\\end{tikzpicture}" - options - image-code))) - (setq image-code - (cond ((org-string-nw-p scale) - (format "\\scalebox{%s}{%s}" scale image-code)) - ((or (org-string-nw-p width) (org-string-nw-p height)) - (format "\\resizebox{%s}{%s}{%s}" - (if (org-string-nw-p width) width "!") - (if (org-string-nw-p height) height "!") - image-code))))) + (setq image-code + (let* ((image-base (format "\\input{%s}" path)) + (image-input + (if (org-string-nw-p options) + (format "\\begin{tikzpicture}[%s]\n%s\n\\end{tikzpicture}" + options + image-base) + image-base))) + (cond ((org-string-nw-p scale) + (format "\\scalebox{%s}{%s}" scale image-input)) + ((or (org-string-nw-p width) (org-string-nw-p height)) + (format "\\resizebox{%s}{%s}{%s}" + (if (org-string-nw-p width) width "!") + (if (org-string-nw-p height) height "!") + image-input)) + (t image-base)))) ;; For other images: ;; - add scale, or width and height to options. ;; - include the image with \includegraphics.