From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?
Date: Fri, 06 Oct 2023 18:35:17 +0000 [thread overview]
Message-ID: <87v8bj4n16.fsf@posteo.net> (raw)
In-Reply-To: <87zg0vg1do.fsf@localhost> (Ihor Radchenko's message of "Fri, 06 Oct 2023 16:29:55 +0000")
Ihor Radchenko writes:
>> In tables there is more consistency because :float is a float
>> environment (table or any arbitrary value) and :environment is a table
>> environment (tabular or any arbitrary value). Here :placement :options
>> and :align act as what is expected of them:
>>
>> #+ATTR_LaTeX: :environment foo :float var :placement [!h] :options [blah] :align cccc
>> |a|a|a|a|
>>
>> ===>
>>
>> \begin{var}[!h]
>> \centering
>> \begin{foo}[blah]{cccc}
>> a & a & a & a\\[0pt]
>> \end{foo}
>> \end{var}
>> \end{document}
>
> This is not documented and is possibly a bug.
I would say that it is the expected behavior: :float is for a float
environment and :environment is for the environment that builds the
table (by default tabular). According to the manual:
#+begin_quote
The table environments by default are not floats in LaTeX. To make
them floating objects use =:float= with one of the following
options: =t= (for a default =table= environment), =sideways= (for a
=sidewaystable= environment), =multicolumn= [...] 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
#+end_quote
and (for :environment):
#+begin_quote
Set the default LaTeX table environment for the LaTeX export
backend to use when exporting Org tables. Common LaTeX table
environments are provided by these packages: tabularx, longtable,
array, tabu, and bmatrix. For packages, such as tabularx and tabu,
or any newer replacements
#+end_quote
The difference is that with images, except in cases of somewhat more
complex constructions where there are subfigures, there is only one
environment, "figure" by default or any other arbitrary one. There was a
commit a while ago, I don't remember when, that allowed :float to
support any arbitrary string as the float environment name, in images
and tables. In images ':float t' is figure (by default) and in tables it
is table (also by default).
Update: ah, I already have the commit located, because I also remember
that I myself sent a patch to update the documentation and correct a
regression that that commit introduced (:float t produced an environment
"t" (\begin{t}...\end{t}):
https://list.orgmode.org/878ruhrvfq.fsf@posteo.net/
next prev parent reply other threads:[~2023-10-06 18:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 15:08 Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX? Juan Manuel Macías
2023-10-01 18:07 ` Juan Manuel Macías
2023-10-02 13:10 ` Ihor Radchenko
2023-10-02 14:55 ` Juan Manuel Macías
2023-10-04 9:12 ` Ihor Radchenko
2023-10-04 14:34 ` Juan Manuel Macías
2023-10-06 16:29 ` Ihor Radchenko
2023-10-06 18:35 ` Juan Manuel Macías [this message]
2023-10-06 19:49 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8bj4n16.fsf@posteo.net \
--to=maciaschain@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.