all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?
@ 2023-10-01 15:08 Juan Manuel Macías
  2023-10-01 18:07 ` Juan Manuel Macías
  2023-10-02 13:10 ` Ihor Radchenko
  0 siblings, 2 replies; 9+ messages in thread
From: Juan Manuel Macías @ 2023-10-01 15:08 UTC (permalink / raw)
  To: orgmode

 I don't know if this nomenclature issue that I'm going to raise is
excessively formalist, but here it goes.

Since the header arg :float now supports any string in inline images
exported to latex (that is, ':float foo' is exported as the environment
\begin{foo}…\end{foo}), the header arg :placement can be used for more
than just "placement". For example, this:

┌────
│ #+ATTR_LaTeX: :float minipage :placement {\textwidth}
│ [[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]
└────

produces in LaTeX this:

┌────
│ \begin{minipage}{\textwidth}
│ \centering
│ \includegraphics[width=.9\linewidth]{/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg}
│ \end{minipage}
└────

(in this case :placement is exported as the required minipage argument,
which is its width).

An example of more "unexpected" (but very practical) uses is this one
with three subfigures and the subcaption package:

┌────
│ #+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]]
│ @@latex:\vspace{2ex}@@
│ #+CAPTION: subcaption 2
│ #+ATTR_LaTeX: :float subfigure :placement {.4\textwidth} :center nil :width \textwidth
│ [[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]
│ @@latex:\hfill@@
│ #+CAPTION: subcaption3
│ #+ATTR_LaTeX: :float subfigure :placement {.4\textwidth} :center nil :width \textwidth
│ [[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]
│ #+end_figure
└────

(In all three subfigures, :placement is exported as the subfigure
environment argument, which designates the width of each subfigure).

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.

Best regards,

Juan Manuel 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-06 19:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-10-06 19:49             ` Ihor Radchenko

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.