我想在页面顶部生成一个包含标题的部分。我从 [如何在分页符后生成“<section>继续”标题?
\documentclass{article}
\usepackage{lipsum}
\usepackage{everyshi}% http://ctan.org/pkg/everyshi
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\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
\EveryShipout{%
\ifdim\pagetotal>\pagegoal
\if@sectionpage
\if@tab@pagebreak\else\aftergroup\@section@title@\fi
\else
\aftergroup\@section@title@
\fi
\fi
\global\@sectionpagefalse
\global\@tab@pagebreakfalse}
%redefinition to make the sectionpage-switch work
\let\ltx@section=\section
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{-1em}%
{\normalfont\Large\bfseries\centering}}
\renewcommand \thesection {Some-text \arabic{section}}
\let\cmdsec\section
\makeatother
\begin{document}
\cmdsec{A section}\lipsum[1-4]
\cmdsec{Second section section}
\lipsum[7-14]
\section{Not to cont on next page}
{\bf This section onwards, i don't want to continue the pattern ( section name continueee....) }
\lipsum[1-4]
\end{document}
根据此代码,
我让
section cont
标题继续显示到文章的最后一页,没有限制。实际上,我想将其限制在特定部分。如何做到这一点?我如何拆分部分、居中部分(如第二页中的部分)。我想将前两个部分对齐,就像第二页中的部分一样(没有连续文本)
提前致谢