On Mon, 27 Dec 2021 07:41:59 +0000,
Juan Manuel Macías <maciasch...@posteo.net> wrote:

[...]

> If you use the caption package (https://www.ctan.org/pkg/caption), you
> can indicate in each figure the width of the caption. In this case,
> you would have to introduce the code using raw latex via the
> `:caption' property:

> #+LaTeX_Header: \usepackage{caption}

> #+ATTR_LaTeX: :caption \captionsetup{width=.3\linewidth}\caption{Lorem
> ipsum dolor sit amet, consectetuer adipiscing elit} #+ATTR_LaTeX:
> :width .3\linewidth [[file_path]]

Thank you, Juan.  Unfortunately, there is a price for this solution as
it is now impossible to name and refer to this segment as usual:

#+LATEX_HEADER: \usepackage{caption}

See [[fig1]].

#+NAME: fig1
#+ATTR_LATEX: :caption \captionsetup{width=0.5\textwidth}\caption{Lorem ipsum 
dolor sit amet, consectetuer adipiscing elit}
[[file_path]]

leads to this (I compile with latexmk):

Latexmk: Summary of warnings from last run of *latex:
  Latex failed to resolve 1 reference(s)


-- 
Seb


Reply via email to