Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

After doing a mass substitution of a certain heading I had had in my document for \section{}, my document stopped compiling. It took me longer than I'd care to admit to figure out what caused it. What it seems to be is that a display \[ \] in a section heading makes it too irate to compile. Is there a good way around this? My way is just to end the \section{}, insert the \[ \], and resume with a \section*{} afterward, but this seems like it can't be the best way.

share|improve this question
    
Additionally, the \section{} environment also doesn't seem to accept \overset{f}{\to}'' or \varinjlim''... –  jdc Jan 8 '11 at 2:35

2 Answers 2

up vote 7 down vote accepted

Use \protect to make \overset and \varinjlim robust:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\tableofcontents

\section{$\protect\overset{f}\to \protect\varinjlim$}
foo
\end{document}
share|improve this answer

Display math environments create a new paragraph, and that obviously won't work inside a header. Instead, you can use $\displaystyle some math$.

I don't really know why \varinjlim doesn't work in sectioning commands. I seems to be defined in some way that breaks the ToC mechanism. Providing an alternative for the table of contents, it compiles, but might not be exactly what you want:

\section[$\displaystyle \injlim_k M_k$]{$\displaystyle \varinjlim_k M_k$}

(This uses \injlim for the toc entry and \varinjlin for the actual section.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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