0

I want to reduce spacing between titles of chapters. What changing should I do in the following example?

\documentclass[12pt]{report}
\usepackage[dvipdfm]{graphicx}
\usepackage{amsfonts}
\usepackage{amscd,amsmath,latexsym,makeidx,tocbibind}
\usepackage{amssymb,amsthm,amsfonts}
\usepackage{color}
\usepackage{setspace}
\usepackage{palatino,lettrine}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{definition-new}{\begin{definition} \em}{\end{definition}}
\newtheorem{remark}[theorem]{Remark}
\newenvironment{remark-new}{\begin{remark} \em}{\end{remark}}
\newtheorem{example}[theorem]{Example}
\newenvironment{example-new}{\begin{example} \em}{\end{example}}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{notation}[theorem]{Notation}
\newenvironment{notation-new}{\begin{notatio} \em}{\end{notatio}}
\newtheorem{agreement}[theorem]{Agreement}
\newenvironment{agreement-new}{\begin{agreement} \em}{\end{agreement}}
\def\theequation{\arabic{chapter}.\arabic{section}.\arabic{equation}}
\makeatletter \@addtoreset{equation}{section} \makeatother
\def\thefigure{\arabic{chapter}.\arabic{section}.\arabic{figure}}
\makeatletter \@addtoreset{figure}{section} \makeatother
\pagestyle{plain}
\usepackage[english]{babel}
\usepackage{blindtext}
\makeatletter
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0ex}%
 {-3.25ex plus -1ex minus -0.2ex}%
{1.5ex plus 0.2ex}%
{\normalfont\normalsize\bfseries}}
\makeatother
\stepcounter{secnumdepth}
\stepcounter{tocdepth}
\linespread{1.8}
\addtolength{\textwidth}{2cm}
\addtolength{\hoffset}{-.5cm}
\addtolength{\voffset}{-.3cm}
\addtolength{\textheight}{3cm}
\addtolength{\marginparwidth}{.3cm}
\stepcounter{secnumdepth}
\stepcounter{tocdepth}
\begin{document}


\chapter{Mathematical Modeling for Malaria Transmission and Chemical Control with Human         Related Activities}

\chapter{Mathematical Modeling for Malaria Transmission and Biological Control with Human Related Activities}

\end{document}
lockstep
  • 250,273

2 Answers2

2

Your question is ambiguous:

  1. Spacing between titles and chapters could mean the spacing between the actual chapters.
  2. It could also mean the way chapters and titles are indented.
  3. It could even mean the space between body text and chapter (?).
  4. Spacing inside the chapter title was the last I would've thought of.

I hope this is what you want:

I've come up with a dirty solution that suffices if you need this spacing only for some chapters (alternatively, use \renewcommand\chapter instead for all chapters). You can adjust line spacing inside the chapter through e.g. \linespread{.8} (make sure to group the value if you're using a factor with a decimal! TeX otherwise won't read past the first character).

Use the macro \interlinespacing{<factor>} for the body text.


http://i.imgur.com/rX0occE.png?1

\documentclass[12pt]{report}
\usepackage[]{graphicx}
\usepackage{amsfonts}
\usepackage{amscd,amsmath,latexsym,makeidx,tocbibind}
\usepackage{amssymb,amsthm,amsfonts}
\usepackage{color}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{palatino,lettrine}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{definition-new}{\begin{definition} \em}{\end{definition}}
\newtheorem{remark}[theorem]{Remark}
\newenvironment{remark-new}{\begin{remark} \em}{\end{remark}}
\newtheorem{example}[theorem]{Example}
\newenvironment{example-new}{\begin{example} \em}{\end{example}}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{notation}[theorem]{Notation}
\newenvironment{notation-new}{\begin{notatio} \em}{\end{notatio}}
\newtheorem{agreement}[theorem]{Agreement}
\newenvironment{agreement-new}{\begin{agreement} \em}{\end{agreement}}
\def\theequation{\arabic{chapter}.\arabic{section}.\arabic{equation}}
\makeatletter \@addtoreset{equation}{section} \makeatother
\def\thefigure{\arabic{chapter}.\arabic{section}.\arabic{figure}}
\makeatletter \@addtoreset{figure}{section} \makeatother
\pagestyle{plain}
\usepackage[english]{babel}
\usepackage{blindtext}
\makeatletter
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0ex}%
 {-3.25ex plus -1ex minus -0.2ex}%
{1.5ex plus 0.2ex}%
{\normalfont\normalsize\bfseries}}
\makeatother
\stepcounter{secnumdepth}
\stepcounter{tocdepth}
\linespread{1.8}
\addtolength{\textwidth}{2cm}
\addtolength{\hoffset}{-.5cm}
\addtolength{\voffset}{-.3cm}
\addtolength{\textheight}{3cm}
\addtolength{\marginparwidth}{.3cm}
\stepcounter{secnumdepth}
\stepcounter{tocdepth}

\makeatletter
\newcommand\mychapter{\if@openright\cleardoublepage\else\clearpage\fi%
                    \linespread1%
                    \thispagestyle{plain}%
                    \global\@topnum\z@
                    \@afterindentfalse%
                    \secdef\@chapter\@schapter%
                    %
                    }%
\def\@setsize#1#2#3#4{
\let\@currsize#1
}
\def\interlinespacing#1{
\def\baselinestretch{#1}%
  \@currsize%
  \vskip \baselineskip
}
\makeatother

\begin{document}

\chapter{Mathematical Modeling for Malaria Transmission and Chemical Control with Human\kern5em         Related Activities}

\mychapter{Mathematical Modeling for Malaria Transmission and Biological Control with Human Related Activities}

\interlinespacing{1.5}

\lipsum[1-2]

\end{document}
1010011010
  • 6,357
1

Here is a solution with titlesec. I redefine \chapter with the \chapterformat and \chapterspacing so that it mimicks the default, but for linespacing in title. Incidentally, since I use titlesec I rewrote your modifications to \paragraph.

I also simplified your modifications to equation and figure numbering, using the chngcntr package and its \counterwithin command.

For the general layout, you'd better use the geometry package which uses parameters that are easier to understand and makes the necessary computations for you.

Let me mention that amscd has rather limited possibilities, and should be replaced, in my opinion, with either tikz-cd or the psmatrix environment from pst-node. A final remark: amsfonts don't go well with palatino; uou should consider loading mathpazo or newpx instead.

Here is the code:

\documentclass[12pt]{report}
\usepackage{graphicx}
\usepackage{amscd,amsmath,latexsym,makeidx,tocbibind}
\usepackage{amssymb,amsthm,amsfonts}
\usepackage{color}
\usepackage{setspace}
\usepackage{palatino,lettrine}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{definition-new}{\begin{definition} \em}{\end{definition}}
\newtheorem{remark}[theorem]{Remark}
\newenvironment{remark-new}{\begin{remark} \em}{\end{remark}}
\newtheorem{example}[theorem]{Example}
\newenvironment{example-new}{\begin{example} \em}{\end{example}}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{notation}[theorem]{Notation}
\newenvironment{notation-new}{\begin{notatio} \em}{\end{notatio}}
\newtheorem{agreement}[theorem]{Agreement}
\newenvironment{agreement-new}{\begin{agreement} \em}{\end{agreement}}
\usepackage{chngcntr}
\counterwithin{equation}{section}
\counterwithin{figure}{section}
\pagestyle{plain}
\usepackage[english]{babel}
\usepackage{blindtext}
\stepcounter{secnumdepth}
\stepcounter{tocdepth}
\linespread{1.8}
\addtolength{\textwidth}{2cm}
\addtolength{\hoffset}{-.5cm}
\addtolength{\voffset}{-.3cm}
\addtolength{\textheight}{3cm}
\addtolength{\marginparwidth}{.3cm}
\stepcounter{secnumdepth}
\stepcounter{tocdepth}

\usepackage[explicit]{titlesec}%
\titleformat{\chapter}[display]{\raggedright\bfseries}{{\huge\chaptername~\thechapter}}{32pt}{\begin{spacing}{1.15}\Huge#1\end{spacing} }%[]
\titlespacing*{\chapter}{0pt}{65pt}{15pt}

\titleformat{\paragraph}[hang]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{#1}%
\titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus 0.2ex}{1.5ex plus 0.2ex}

\usepackage[nomarginpar, showframe]{geometry}

\begin{document}


\chapter{Mathematical Modeling for Malaria Transmission and Chemical Control with Human         Related Activities}

\section{A first section}
\blindtext
\begin{equation}\label{eq1}a = b
\end{equation}

{Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text. }
%
\paragraph{My paragraph title }
Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.

\chapter{Mathematical Modeling for Malaria Transmission and Biological Control with Human Related Activities}

\section{A first section}
\begin{equation}\label{eq2}a = b
\end{equation}

\end{document} 

It results in these three pages:

enter image description here

enter image description here

enter image description here

Bernard
  • 271,350