From 91eee36742702ff101695d0a3747558510904108 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Thu, 31 Jul 2014 17:45:36 +0200 Subject: [PATCH] ox-latex.el: Add page number of link when exporting to latex * lisp/ox-latex.el (org-latex--inline-image): Use page number (:search-option) of pdf links as page option in includegraphics. TINYCHANGE --- lisp/ox-latex.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index ceea302f9..6ea35c5d0 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1861,6 +1861,12 @@ used as a communication channel." (setq options (concat options ",width=" width))) (when (org-string-nw-p height) (setq options (concat options ",height=" height))) + (let ((search-option (org-element-property :search-option link))) + (when (and search-option + (equal filetype "pdf") + (org-string-match-p "\\`[0-9]+\\'" search-option) + (not (org-string-match-p "page=" options))) + (setq options (concat options ",page=" search-option)))) (setq image-code (format "\\includegraphics%s{%s}" (cond ((not (org-string-nw-p options)) "") -- 2.11.4.GIT