emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 1291e89d2d 1/2: ox-latex: Add a `t' value for `:flo


From: ELPA Syncer
Subject: [elpa] externals/org 1291e89d2d 1/2: ox-latex: Add a `t' value for `:float' in tables and figures
Date: Tue, 22 Feb 2022 14:57:40 -0500 (EST)

branch: externals/org
commit 1291e89d2d9f9b25178289925a5ac6235a07ab83
Author: Juan Manuel Macias <maciaschain@posteo.net>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    ox-latex: Add a `t' value for `:float' in tables and figures
    
    * org-latex--inline-image: default `figure' environment
    * org-latex--decorate-table: default table environment
    * doc/org-manual.org (Tables in LaTeX export): add `t' and arbitrary
    `:float' values
    * doc/org-manual.org (Images in LaTeX export): add `t' and arbitrary
    `:float' values
---
 doc/org-manual.org | 16 +++++++++++++---
 lisp/ox-latex.el   |  2 ++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index b8c61fddd4..eb38930af2 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13572,7 +13572,12 @@ include:
 
   The table environments by default are not floats in LaTeX.  To make
   them floating objects use =:float= with one of the following
-  options: =sideways=, =multicolumn=, =t=, and =nil=.
+  options: =t= (for a default =table= environment), =sideways= (for a
+  =sidewaystable= environment), =multicolumn= (to span the table
+  across multiple columns of a page in a =table*= environment) and
+  =nil=.  In addition to these three values, =:float= can pass through
+  any arbitrary value, for example a user-defined float type with the
+  =float= LaTeX package.
 
   LaTeX floats can also have additional layout =:placement=
   attributes.  These are the usual =[h t b p ! H]= permissions
@@ -13686,8 +13691,7 @@ attribute to one of the following:
 
 - =t= ::
 
-  For a standard =figure= environment; used by default whenever an
-  image has a caption.
+  For a default =figure= environment.
 
 - =multicolumn= ::
 
@@ -13708,6 +13712,12 @@ attribute to one of the following:
 
   To avoid a =:float= even if using a caption.
 
+- Any arbitrary value ::
+
+  For example, a user-defined float type with the =float= LaTeX
+  package.
+
+
 Use the =placement= attribute to modify a floating environment's
 placement.
 
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 5dda9b3ab0..0edba9e527 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2414,6 +2414,7 @@ used as a communication channel."
                  (cond ((string= float "wrap") 'wrap)
                        ((string= float "sideways") 'sideways)
                        ((string= float "multicolumn") 'multicolumn)
+                        ((string= float "t") 'figure)
                        ((and (plist-member attr :float) (not float)) 'nonfloat)
                         (float float)
                        ((or (org-element-property :caption parent)
@@ -3269,6 +3270,7 @@ Return new environment, as a string."
            (cond ((and (not float) (plist-member attributes :float)) nil)
                  ((member float '("sidewaystable" "sideways")) "sidewaystable")
                  ((equal float "multicolumn") "table*")
+                  ((string= float "t") "table")
                   (float float)
                  ((org-string-nw-p caption) "table")
                  (t nil))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]