From: Anthony Cowley <acowley@gmail.com>
To: Emacs Org-Mode Help <emacs-orgmode@gnu.org>
Subject: Short captions
Date: Mon, 10 Feb 2020 23:20:33 -0500 [thread overview]
Message-ID: <m2zhdpwy9a.fsf@gmail.com> (raw)
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
next reply other threads:[~2020-02-11 4:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 4:20 Anthony Cowley [this message]
2020-02-11 13:14 ` Short captions Fraga, Eric
2020-02-11 19:50 ` Anthony Cowley
2020-02-12 8:17 ` Bastien
2020-02-12 10:13 ` Fraga, Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2zhdpwy9a.fsf@gmail.com \
--to=acowley@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).