Text FormattingHow to insert Section in the middle of Proof?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ychao
Posts: 13
Joined: Sun Apr 04, 2010 12:24 am

How to insert Section in the middle of Proof?

Post by ychao »

Dear all,

I need to insert Section name into the middle of Proof.

To be more specific,as the Proof takes multiple pages, I need to insert Section name on the top of each page, although it is still within the same proof.

Any suggestions?

Thanks a lot.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How to insert Section in the middle of Proof?

Post by gmedina »

ychao wrote:Dear all,

I need to insert Section name into the middle of Proof.

To be more specific,as the Proof takes multiple pages, I need to insert Section name on the top of each page, although it is still within the same proof...
I dont't understand... in the middle or on top of each page? You confused me there.

What exactly do you want to do? Which document class are you using? What are your current settings for the relevant objects mentioned (the proof, the section)?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ychao
Posts: 13
Joined: Sun Apr 04, 2010 12:24 am

Re: How to insert Section in the middle of Proof?

Post by ychao »

Sorry for the confusion.

Actually, I want to put the Section name on top of each page for a long proof, BUT not the first page of the proof. That's why I want to insert the Section name into the middle of proof.

Any ideas?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How to insert Section in the middle of Proof?

Post by gmedina »

With the help of the titlesec package you can define a new page style and then apply it from the second page of the proof on, as the following simple example schematically shows:

Code: Select all

\documentclass{article}
\usepackage[pagestyles]{titlesec}
\usepackage{amsthm}
\usepackage{lipsum}

\newpagestyle{proofheader}{%
  \sethead{}{Proof of the main result}{}
}
\begin{document} 


\section{Proof of the main result}
\begin{proof}
\lipsum[1-7]
{% to keep the page style local
\pagestyle{proofheader}
\lipsum[1-30]\thispagestyle{proofheader}
}
\end{proof}

\section{Another section}
\lipsum[1-20]
\end{document} 
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply