[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Short captions
From: |
Anthony Cowley |
Subject: |
Short captions |
Date: |
Mon, 10 Feb 2020 23:20:33 -0500 |
User-agent: |
mu4e 1.2.0; emacs 28.0.50 |
I am having trouble understanding how short captions are supposed to work.
Consider this org document:
#+begin_src org
,#+title: Short Caption Test
,#+author: Org User
,#+label: table1
,#+caption[This is table1]: And here go on at length in a longer caption.
| Name | Favorite Number |
|------+-----------------|
| Sue | 42 |
| Tom | 99 |
,#+label: table2
,#+caption[This is table2]: But *with* /this/ table, the /short/ caption is
*lost*.
| Name | Favorite Color |
|-------+----------------|
| Alice | Red |
| Bob | Also Red |
,#+label: table3
,#+caption[This is table3]: No org markup is used in this long caption, but
some $\LaTeX$ is!
| Number | Favorite Person |
|--------+-----------------|
| 0 | Zed |
| 1 | Solo |
#+end_src
When I export it as a LaTeX file, the captions are:
#+begin_src latex
\caption[This is table1]{\label{table1}And here go on at length in a longer
caption.}
#+end_src
#+begin_src latex
\caption[\textbf{lost}]{\label{table2}But \textbf{with} \emph{this} table, the
\emph{short} caption is \textbf{lost}.}
#+end_src
and
#+begin_src latex
\caption{\label{table3}No org markup is used in this long caption, but some
\(\LaTeX\) is!}
#+end_src
The first matches my expectations. The second is an example of taking the last
bit of markup as the short caption. The third seems to lose the short caption
altogether.
When I look at
#+begin_src emacs-lisp
(org-element-map
(org-element-parse-buffer)
'table
(lambda (x) (org-element-property :caption x)))
#+end_src
Only the first caption seems to have the short caption in the parse results at
all. Is this a bug, or should I avoid using markup in captions?
Thank you,
Anthony
#+begin_src emacs-lisp
(org-version)
#+end_src
#+RESULTS:
: 9.3
- Short captions,
Anthony Cowley <=