Page LayoutRemove space after a specific chapter

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Rimme
Posts: 6
Joined: Wed Nov 28, 2012 2:18 pm

Remove space after a specific chapter

Post by Rimme »

Hi

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove space after a specific chapter

Post by localghost »

It is essential that you provide a self-contained and minimal example to give an adequate problem description.


Thorsten
Rimme
Posts: 6
Joined: Wed Nov 28, 2012 2:18 pm

Remove space after a specific chapter

Post by Rimme »

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}
What I wish to do is only removing the spacing between title 2 and the text but not between title 1 and the text.
Post Reply