Eliminate unconditional use of wrapfig and graphicx packages. Also
allows loading the (large, expensive) tikz package only when tikz
graphics are present.
---
lisp/org.el | 2 --
lisp/ox-latex.el | 5 +++++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index d3506d1..4f10959 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3752,9 +3752,7 @@ header, or they will be appended."
'(("AUTO" "inputenc" t)
("T1" "fontenc" t)
("" "fixltx2e" nil)
- ("" "graphicx" t)
("" "float" nil)
- ("" "wrapfig" nil)
("" "soul" t)
("" "textcomp" t)
("" "marvosym" t)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 8027ce7..4889911 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1829,6 +1829,11 @@ used as a communication channel."
(image-code (if (equal filetype "tikz")
(format "\\input{%s}" path)
(format "\\includegraphics%s{%s}" options path))))
+ (if (equal filetype "tikz")
+ (org-latex--use-package info "tikz")
+ (org-latex--use-package info "graphicx"))
+ (when (eq float 'wrap)
+ (org-latex--use-package info "wrapfig"))
;; Return proper string, depending on FLOAT.
(case float
(wrap (format "\\begin{wrapfigure}%s
--
1.8.1.4