Juan Manuel Macías <maciasch...@posteo.net> writes: >> So, the difference between :environment and :float is that :float also >> encapsulates \caption in addition to the actual environment (like >> tabularx or includegraphics) used for transcoded exported element. > >> I can see how :float+:placement can be imprecise and that the existing >> :environment indeed serves a different purpose. (It might be worth >> clarifying this distinction in the manual - it seems arbitrary from >> the first glance). > >> But what would be the better name then? > > I think the problem is limited to images, where there is no "double" > environment as in the case of tables (float environment that encloses an > environment to generate the table, and :placement points to the correct > environment).
IMHO, an equivalent of :environment for images is \includegraphics or \includesvg. > ... In the case of images, I am afraid that the new features > have advanced the meaning of the old ones. Previously, :float only > supported t/nil ("figure" by default, in case of t) along with a few > explicit "float" environments, such as sidewaysfigure or wrapfigure. > Since :float now can accept any string as an environment name, Pandora's > box has been opened and the meaning of the old :float has been left > behind: for example, we can put :float minipage, and minipage is not a > float environment. Something similar has happened to :placement. > > My suggestion is to add a :environment attribute next to another > :environment-options attr (or something like that, to introduce any > arbitrary LaTeX code). A LaTeX image can be enclosed in many environment > types, float or non-float. As I said above, I feel that :environment term will be overloaded then. What about :wrap? > ... However, :float can still be useful for > certain combinations. For example, a minipage environment cannot include > a caption (it produces an error of the type "LaTeX Error: \caption > outside float"). Do we know in advance which environments support \caption and which not? I feel that we may handle this programmatically without creating an array of almost-identical attributes. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>