1

I'm trying to create a caption but the TOC caption doesn't display properly when there are subscripts, or citations with additional text in the main caption. Having them in the TOC caption seems to irrelevant.

The following org-mode snippet:

    #+CAPTION[Short caption with_{subscript}]: Caption without subscript
    #+NAME: table leq ln
    | a | b |

gives the expected output (shortened):

    \begin{table}[htbp]
    \caption[Short caption with\textsubscript{subscript}]{\label{tab:orgace4f0d}Caption without subscript}
    \centering
    \begin{tabular}{ll}
    a & b\\
    \end{tabular}
    \end{table}

However this example in org-mode:

    #+CAPTION[Short caption]: Caption with_{subscript}
    #+NAME: table leq ln
    | a | b |

creates this output (shortened):

    \begin{table}[htbp]
    \caption[\_]{\label{tab:orgf20f1ae}Caption with\textsubscript{subscript}}
    \centering
    \begin{tabular}{ll}
    a & b\\
    \end{tabular}

You'll see that the caption for the TOC is just an underscore. This occurs whenever there is an underscore marking subscript (and I get similar results with some other things like citations with additional text in the main caption. Including an underscore in the TOC caption (or no TOC caption at all) makes no difference.

How can I get the following sort of output?

    \begin{table}[htbp]
    \caption[Short caption]{\label{tab:orgf20f1ae}Caption with\textsubscript{subscript}}
    \centering
    \begin{tabular}{ll}
    a & b\\
    \end{tabular}
0

1 Answer 1

1

There was a bug with short captions, but it has been fixed.

In particular, the bug existed in release 9.3.4 of Org mode, but was fixed in release 9.3.5 and later. Check the version of Org mode you are running with M-x org-version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.