7

For reasons of my own (so please don't advise me to simply not do that, I considered that already) I want to have this expression in the title of a section

\section{$\left< a \vphantom{L} \right| \left. b\vphantom{L} \right>$}

but this gives me

! Incomplete \iffalse;

Any idea why that happens? And maybe a workaround?

0

1 Answer 1

10

The command \vphantom is fragile. You need to protect it:

\section{$\left< a \protect\vphantom{L} \right| \left. b\protect\vphantom{L} \right>$}

However, there's a better way to do it:

\documentclass{article}
\begin{document}

\section{$\left< a \protect\vphantom{L} \right| \left. b\protect\vphantom{L} \right>$}

\section{$\langle a \mid b \rangle$}

\section{$\left< a \;\middle|\; b\right>$}

\end{document}

The first is your code, the second is what I'd prefer, because \left and \right are really doing nothing. The third uses \middle. As you notice, the first has the spacing wrong.

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .