Page Layout ⇒ Remove space after a specific chapter
Remove space after a specific chapter
Is it possible to remove space between chapter and the following text, if I only want to remove it after one specific chapter?
Thanks for helping
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Remove space after a specific chapter
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Remove space after a specific chapter
Code: Select all
\documentclass[11pt,twoside]{report}
\usepackage{type1cm}
\usepackage[utf8]{inputenc}
\usepackage[Lenny]{fncychap}
\makeatletter
\ChNameVar{\fontsize{24}{26}\usefont{OT1}{rm}{m}{n}\selectfont}
\ChNumVar{\fontsize{60}{62}\usefont{OT1}{rm}{m}{n}\selectfont}
\ChTitleVar{\huge\bfseries\rm}
\ChRuleWidth{1pt}
\renewcommand{\DOCH}{
\vspace*{-3cm}
\settowidth{\px}{\CNV\FmN{\@chapapp}}
\addtolength{\px}{2pt}
\settoheight{\py}{\CNV\FmN{\@chapapp}}
\addtolength{\py}{1pt}
\settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter}
\addtolength{\mylen}{1pt}
\settowidth{\pxx}{\CNoV\thechapter}
\addtolength{\pxx}{-1pt}
\settoheight{\pyy}{\CNoV\thechapter}
\addtolength{\pyy}{-2pt}
\setlength{\myhi}{\pyy}
\addtolength{\myhi}{-1\py}
\par
\parbox[b]{\textwidth}{%
\rule[\py]{\RW}{\myhi}%
\hskip -\RW%
\rule[\pyy]{\px}{\RW}%
\hskip -\px%
\raggedright%
\CNV\FmN{\@chapapp}\space\CNoV\thechapter%
\hskip1pt%
\mghrulefill{\RW}%
\rule{\RW}{\pyy}\par\nobreak%
\vskip -\baselineskip%
\vskip -\pyy
\hskip \mylen
\mghrulefill{\RW}\par\nobreak
\vskip \pyy}
\vskip 20\p@}
\renewcommand{\DOTI}[1]{
\raggedright
\CTV\FmTi{#1}\par\nobreak
\vskip 20\p@}
\renewcommand{\DOTIS}[1]{
\vspace*{-3cm}
\raggedright
\CTV\FmTi{#1}\par\nobreak
\vskip -20\p@}
\makeatother
\begin{document}
\chapter{Title 1}
Something something something
\chapter{Title 2}
Something something something
\end{document}