How do I remove a section/subsection title, but keep the section/subsection name in the headings and in the table of contents?
For example, I type in my document somewhere,
\section{My Section}
and I get
"(section number) MY SECTION" in the headings,
"(section number) My Section.........(page number)" in the table of contents,
"(section number) My Section" before the first paragraph.
How do I prevent the third item from occurring?
I have been searching for hours and it seems that this should have a simple one line solution, but I haven't found it. I have thought about using
\addcontentsline{toc}{subsection}{My Section}
but then I lose "(section number) MY SECTION" in the headings and I lose the (section number) in the table of contents. So an equivalent set of question,
How do I add numbered sections to the toc and to the headings?
Working example?
\documentclass[12pt]{book}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter{Chapter 1}
\section{Section 1}
\subsection{Subsection 1}
Here is lovely paragraph. And notice there is a ``subsection title'' right above me. How do I get rid of that title thingy????
\subsection{Subsection 2}
More stuff..... $$1+2+3+\cdots+\infty=-\frac{1}{12}$$
\lipsum[1-10]
\section{Section 2}
\lipsum[1-10]
\Section{Section 3}
\lipsum[1-10]
\chapter{Chapter 2}
\section{Section 1}
Again, above me a section name, how do I get rid of that guy??? \\
\lipsum[1-10]
\section{Section 2}
\lipsum[1-10]
\end{document}
\documentclass{...}
and ending with\end{document}
.\markboth{Name 1}{Name 2}