Graphics, Figures & TablesInsert square bracket in short caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
spiderchee84
Posts: 9
Joined: Sat Feb 14, 2009 11:47 pm

Insert square bracket in short caption

Post by spiderchee84 »

Dear all,

Is there any way to insert square bracket in the short caption of a table?

Below is a minimal example of my code:

Code: Select all

\documentclass{report}

\begin{document}

\listoftables

\begin{table}
\caption[I wish to insert $[a,b]$]{Long caption}
\centering
\begin{tabular}{cc}
a&b\\
c&d\\
\end{tabular}
\end{table}

\end{document}
Many thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Insert square bracket in short caption

Post by gmedina »

Hi,

enclose the caption using braces:

Code: Select all

\caption[{I wish to insert $[a,b]$}]{Long caption}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Insert square bracket in short caption

Post by localghost »

gmedina wrote:[…] enclose the caption using braces: […]
Or only the concerned expression.

Code: Select all

\caption[I wish to insert {$[a,b]$}]{Long caption}
Post Reply