[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Are 'placement' and 'float' "obsolete terms" in inline images export
From: |
Juan Manuel Macías |
Subject: |
Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX? |
Date: |
Mon, 02 Oct 2023 14:55:24 +0000 |
Ihor Radchenko writes:
>> ┌────
>> │ #+caption: Main caption
>> │ #+begin_figure
>> │ #+CAPTION: subcaption 1
>> │ #+ATTR_LaTeX: :float subfigure :placement {\textwidth} :center nil :width
>> \textwidth
>> │ [[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]
>> ...
>> I think this is a case where certain elements of Org have evolved
>> (consciously or unconsciously) ahead of the names, and these names have
>> become somewhat outdated. There is not only the case of :placement. Even
>> :float seems imprecise, since can be used to create a minipage, and the
>> minipage environment is not a float environment. Would it be worth
>> making those names obsolete (with backward compatibility, of course) and
>> replacing them with slightly more precise ones? I think that new names
>> would give the user an idea of more variety of uses, like the examples I
>> have put here.
>
> I am not sure about obsolete - I see not reason to obsolete the intended
> use case. Your example is rather an abuse.
Why abuse? First, it works like a charm. Second, if :float can support
any string as an environment name, why not minipage or subfigure? As for
:placement, the term would seem more precise to me if it were really
"placement" (as :align in tables is actually "align"), not LaTeX code
passed directly after the \begin{...}. That a user can put things like
this (I do it often, and I think I'm not the only one):
:placement [htbp]\SomeExtraLaTeXCode...
it is a consequence of the above. It is not an "orthodox" use (I mean,
it's not described in the manual), but it works without problems. Again,
I don't want to seem too picky about the names, but a user who doesn't
understand the source code might think that :placement only supports
things like [htbp]. My idea here is: instead of implementing new
features, recycle and take advantage of those that arise unexpectedly
:-). Although :placement was created thinking about putting code related
to placement figures, as it is implemented I would have called it
:latex-code or something similar.
> What we might do it to introduce something like a new :wrap attribute:
>
> #+attr_latex: :wrap subfigure,{\textwidht}
That would be nice if with a single latex_attr line you could export a
single figure environment for several images, since every subfigure
environment must be inside a figure environment. And putting a single
subfigure inside a figure environment doesn't make much sense. Other
than that, the idea of :wrap is good. I find it very useful, especially
on tables.
> I think we have discussed something similar in the past, but more
> generic - allow wrapping arbitrary Org elements (headings, drawers,
> paragraphs, etc) on export.
I remember that thread. In fact, I think I created a TODO to study that,
but due to lack of time I haven't been able to take a look at it.
--
Juan Manuel Macías
https://juanmanuelmacias.com
https://lunotipia.juanmanuelmacias.com
https://gnutas.juanmanuelmacias.com
- Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Juan Manuel Macías, 2023/10/01
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Juan Manuel Macías, 2023/10/01
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Ihor Radchenko, 2023/10/02
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?,
Juan Manuel Macías <=
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Ihor Radchenko, 2023/10/04
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Juan Manuel Macías, 2023/10/04
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Ihor Radchenko, 2023/10/06
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Juan Manuel Macías, 2023/10/06
- Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?, Ihor Radchenko, 2023/10/06