summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2014-01-25 14:57:46 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2014-01-25 14:57:46 +0100
commite0d14e6aa7675e1a37125cea8a68b2119aa40d7d (patch)
tree7278bf3b9a1ac01c6d228524c156abf4838baadc
parentf37904713c2d403cb185e4f7432a60706530364c (diff)
parentb2dce80601c4b9bc6ebcd40fb4c9df49b9dd44bf (diff)
downloadorg-mode-e0d14e6aa7675e1a37125cea8a68b2119aa40d7d.tar.gz
Merge branch 'maint'
-rw-r--r--doc/org.texi9
-rw-r--r--lisp/ox-latex.el11
2 files changed, 7 insertions, 13 deletions
diff --git a/doc/org.texi b/doc/org.texi
index 8e7b5ed..70305da 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11776,13 +11776,12 @@ the @LaTeX{} @code{\includegraphics} macro will be commented out.
@cindex plain lists, in @LaTeX{} export
Plain lists accept two optional attributes: @code{:environment} and
-@code{:options}. The first one allows the use of a non-standard
-environment (e.g., @samp{inparaenum}). The second one specifies
-optional arguments for that environment (square brackets may be
-omitted).
+@code{:options}. The first one allows the use of a non-standard environment
+(e.g., @samp{inparaenum}). The second one specifies additional arguments for
+that environment.
@example
-#+ATTR_LATEX: :environment compactitem :options $\circ$
+#+ATTR_LATEX: :environment compactitem :options [$\circ$]
- you need ``paralist'' package to reproduce this example.
@end example
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 4522c6b..cad80c9 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1911,18 +1911,13 @@ contextual information."
(latex-type (let ((env (plist-get attr :environment)))
(cond (env (format "%s" env))
((eq type 'ordered) "enumerate")
- ((eq type 'unordered) "itemize")
- ((eq type 'descriptive) "description")))))
+ ((eq type 'descriptive) "description")
+ (t "itemize")))))
(org-latex--wrap-label
plain-list
(format "\\begin{%s}%s\n%s\\end{%s}"
latex-type
- ;; Put optional arguments, if any inside square brackets
- ;; when necessary.
- (let ((options (format "%s" (or (plist-get attr :options) ""))))
- (cond ((equal options "") "")
- ((string-match "\\`\\[.*\\]\\'" options) options)
- (t (format "[%s]" options))))
+ (or (plist-get attr :options) "")
contents
latex-type))))