# Start new page with each section with new page geometry

I would like to start each section on a new page and new geometry. For each section on a new page, \newcommand{\sectionbreak}{\clearpage} is used but I can't change the page geometry.

Normally, 2.5 cm should be inside, but for section pages, it should be 5cm.

Is there a general tuning?

• You should provide a small example that can be use for tests. Beside this what do you mean by page geometry? which values do you want to change? – Ulrike Fischer Dec 5 '20 at 14:45
• If you want the entire section on one page, you can use standalone. See tex.stackexchange.com/questions/244348/… – John Kormylo Dec 5 '20 at 16:03
• @UlrikeFischer I edited my question. Can you help? – Ertuğrul Ağaç Dec 7 '20 at 22:53
• you don't want a new geometry, you simply want a \vspace*: \newcommand{\sectionbreak}{\clearpage\vspace*{2.5cm}} – Ulrike Fischer Dec 7 '20 at 22:57
• @UlrikeFischer thank you very much... – Ertuğrul Ağaç Dec 7 '20 at 23:36

There is no need for separate geometries for section and non-section pages. Instead, override the sectional command to insert an appropriate \vspace* at the top of the page. The following implements that under the default article class:

\documentclass{article}

\usepackage[margin=25mm]{geometry}
\usepackage{lipsum}

\let\oldsection\section
\renewcommand{\section}{%
\par
\clearpage
\vspace*{\dimexpr25mm-\baselineskip-3.5ex}% \section in article adds 3.5ex plus 1ex minus .2ex
\oldsection
}

% Add a vertical rule from the top of the page at lengths 25mm and 50mm, for reference
\usepackage{eso-pic}
\AtPageUpperLeft{%
\hspace{25mm}%
\rule[-25mm]{1pt}{25mm}%
\hspace{2mm}%
\rule[-50mm]{1pt}{50mm}%
}%
}

\begin{document}

\section{First section}\lipsum[1-10]
\section{Second section}\lipsum[1-20]

\end{document}


The removal of 3.5ex comes from the article class' definition of \section that adds a vertical skip of 3.5ex (+ 1ex - .2ex); see Where can I find help files or documentation for commands like \@startsection for LaTeX?:

\newcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}}