# Using math expression in short caption for listoffigures [duplicate]

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}

\begin{document}
\listoffigures

$\{[\phi(t+h),p(t+h)]_2\}$

\begin{figure}[htb]
\centering
something here
\caption[math $x+y$ ]{math $\{[\phi(t+h),p(t+h)]_2\}$ }
% \caption[math $\{[\phi(t+h),p(t+h)]_2\}$ ]{math $\{[\phi(t+h),p(t+h)]_2\}$}
\end{figure}

\end{document}


I want to use a short caption for \listoffigures. However, the simple math expressions ($x+y$) can work. But a more complicated math expression like

\caption[math $\{[\phi(t+h),p(t+h)]_2\}$ ]{math $\{[\phi(t+h),p(t+h)]_2\}$}


does not work.

Am I misunderstanding something in typing math using latex?

• use {$math$} LaTeX can't know here that the closing bracket in your formulae is not closing the optional argument. – Johannes_B Jan 14 '15 at 15:52
• @Johannes_B Thanks! Straight to the point! Still I am a bit confused why the "simple" case work, but the "complicated"one. – Chen Stats Yu Jan 14 '15 at 15:54
• See my edited comment. – Johannes_B Jan 14 '15 at 15:55
• useful information here: ] inside an optional argument – barbara beeton Jan 14 '15 at 16:01