I want to generate a section cont.. heading on the top of page. I got almost data from [How to generate a "<section> continued" heading after page-break?

\usepackage{everyshi}% http://ctan.org/pkg/everyshi
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox

\let\@section@title@\relax% Sectional heading storage
\patchcmd{\@sect}% <cmd>
  {\@xsect}% <search>
  {\gdef\@section@title@{% Store sectional heading
  {\centering #6 \@svsec\\#8\normalfont\ \smash{\bf (continued)}\\}\par\bigskip}\@xsect}% <replace>
  {}{}% <success><failure>
\newif\if@sectionpage %Conditional to see if we are on the page where a section has been started
\newif\if@tab@pagebreak %Conditional to check if a table will cause a pagebreak
%redefinition to make the sectionpage-switch work

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%

\renewcommand \thesection {Some-text \arabic{section}}  


\cmdsec{A section}\lipsum[1-4]
\cmdsec{Second section section}


\section{Not to cont on next page}
{\bf This section onwards, i don't want to continue the pattern ( section name continueee....) }


By this code,

  1. i got section cont heading continue upto the last page of my article, there is no limit. Actually i want to restrict that for a particular section. How to do that?

  2. How can i break section, centering section (like section in second page). I want to align the first two section like one in the second page (without cont... text)

Thanks in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.