[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH 5/5] ox-latex: Convert the image inclusion code to use option
From: |
Aaron Ecay |
Subject: |
[O] [PATCH 5/5] ox-latex: Convert the image inclusion code to use optional packages |
Date: |
Wed, 20 Feb 2013 23:02:26 -0500 |
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
- [O] [RFC] [PATCH] conditional use of latex packages, Aaron Ecay, 2013/02/20
- [O] [PATCH 3/5] ob-R: change the file extension for tikz figures, Aaron Ecay, 2013/02/20
- [O] [PATCH 4/5] ox-latex: Treat tikz files as images, Aaron Ecay, 2013/02/20
- [O] [PATCH 1/5] ox-latex: add optional-packages machinery, Aaron Ecay, 2013/02/20
- [O] [PATCH 2/5] ox-latex: convert source code and table export to use optional packages, Aaron Ecay, 2013/02/20
- [O] [PATCH 5/5] ox-latex: Convert the image inclusion code to use optional packages,
Aaron Ecay <=
- Re: [O] [RFC] [PATCH] conditional use of latex packages, Suvayu Ali, 2013/02/21
- Re: [O] [RFC] [PATCH] conditional use of latex packages, Nicolas Goaziou, 2013/02/21