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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
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