Text FormattingToo much space between chapter and section headings

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Too much space between chapter and section headings

Post by thedoctor818 »

I had a prob w/ centering chapter headings that is now completely solved - thanks to everyone here. But, now I have way TOO much space above my chapter & *mainly* my section headings. Here is my MWE below.

Code: Select all

Code, edit and compile here:
\documentclass[12pt,letterpaper,twoside,openany]{book}
\usepackage[pagestyles]{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{}{20pt}{\Huge}
\titlespacing*{\chapter} {0pt}{30pt}{20pt}
\titleformat{\section}[display]
{\normalfont\LARGE\bfseries\centering}{}{14pt}{\Large}
\titlespacing*{\section} {0pt}{18pt}{14pt}
\titleformat{\subsection}[display]
{\normalfont\Large\bfseries\centering}{}{12pt}{\large}
\titlespacing*{\section} {0pt}{14pt}{10pt}
\newpagestyle{mystyle}{\sethead{}{}{}\setfoot{}{\thepage}{}}
\pagestyle{mystyle}
\begin{document}
%\maketitle
\tableofcontents
\chapter{SATURDAY EVENING PRAYERS.}
<text>
<other chs>
<more text>
\chapter{MEALTIME PRAYERS.}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{\centering\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\titleformat{\section}[display]
{\normalfont\Large\bfseries\centering}{}{20pt}{\Large}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thanks for any help you all can provide.
-Michael D

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Too much space between chapter and section headings

Post by gmedina »

Change the value of the last two arguments of the corresponding \titlespacing commands; use something like the following (I corrected some mistakes in the first arguments also):

Code: Select all

Code, edit and compile here:
\documentclass[12pt,letterpaper,twoside,openany]{book}
\usepackage[pagestyles]{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{}{20pt}{\Huge}
\titlespacing*{\chapter} {0pt}{30pt}{20pt}
\titleformat{\section}[display]
{\normalfont\LARGE\bfseries\centering}{}{14pt}{\Large}
\titlespacing*{\section} {0pt}{18pt}{14pt}
\titleformat{\subsection}[display]
{\normalfont\Large\bfseries\centering}{}{12pt}{\large}
\titlespacing*{\subsection} {0pt}{14pt}{10pt}
\newpagestyle{mystyle}{\sethead{}{}{}\setfoot{}{\thepage}{}}
\pagestyle{mystyle}
\begin{document}
%\maketitle
\tableofcontents
\chapter{SATURDAY EVENING PRAYERS.}
<text>
<other chs>
<more text>
\chapter{MEALTIME PRAYERS.}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{\centering\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{10pt}{10pt}
\titleformat{\section}[display]
{\normalfont\Large\bfseries\centering}{}{20pt}{\Large}
\titlespacing*{\section}
{0pt}{10pt}{10pt}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1,1,2,3,5,8,13,21,34,55,89,144,233,...
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Too much space between chapter and section headings

Post by thedoctor818 »

I tried that & it works fine. However, when I go back & try to reduce the space above the section headings, by making the 2nd & 3rd numbers smaller - then running tex, I get the following errors:
Missing $ inserted
Double superscript
Missing }

Here is the code I tried:

Code: Select all

Code, edit and compile here:
\documentclass[12pt,letterpaper,twoside,openany]{book}
\usepackage[pagestyles]{titlesec}
\usepackage[left=0.50in,right=0.45in,top=0.50in,bottom=0.50in]{geometry}
\usepackage{liturg, framed, amsmath, amssymb}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{}{20pt}{\Huge}
\titlespacing*{\chapter} {0pt}{30pt}{20pt}
\titleformat{\section}[display]
{\normalfont\LARGE\bfseries\centering}{}{14pt}{\Large}
\titlespacing*{\section} {0pt}{18pt}{14pt}
\titleformat{\subsection}[display]
{\normalfont\Large\bfseries\centering}{}{12pt}{\large}
\titlespacing*{\subsection} {0pt}{14pt}{10pt}
\newpagestyle{mystyle}{\sethead{}{}{}\setfoot{}{\thepage}{}}
\pagestyle{mystyle}
\begin{document}
%\maketitle
\tableofcontents
\chapter{SATURDAY EVENING PRAYERS.}
<text>
<other chs>
<more text>
\chapter{MEALTIME PRAYERS.}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{\centering\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\titleformat{\section}[display]
{\normalfont\Large\bfseries\centering}{}{20pt}{\Large}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-Michael D
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: too much space

Post by Stefan Kottwitz »

Do you get such errors with that code posted above? I could compile it without errors or warnings.
Check the posted code again, if it brings errors then post the .log file or post code that would raise the error instead of cut code without error.

Stefan
LaTeX.org admin
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Too much space between chapter and section headings

Post by thedoctor818 »

Stephan,

This is what I am getting in my log for the original code, and when I try to simplify it:

Code: Select all

LOG FILE :
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=latex 2009.8.19) 21 SEP 2009 20:11
entering extended mode
%&-line parsing enabled.
**001.tex
(./001.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, farsi, croatian, ukrainian, russian, bulgarian, czech, slov
ak, danish, dutch, finnish, basque, french, german, ngerman, ibycus, greek, mon
ogreek, ancientgreek, hungarian, italian, latin, mongolian, norsk, icelandic, i
nterlingua, turkish, coptic, romanian, welsh, serbian, slovenian, estonian, esp
eranto, uppersorbian, indonesian, polish, portuguese, spanish, catalan, galicia
n, swedish, ukenglish, pinyin, loaded.
(/usr/share/texmf-texlive/tex/latex/base/book.cls
Document Class: book 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/bk12.clo
File: bk12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-texlive/tex/latex/titlesec/titlesec.sty
Package: titlesec 2005/01/22 v2.6 Sectioning titles
\ttl@box=\box26
\beforetitleunit=\skip43
\aftertitleunit=\skip44
\ttl@plus=\dimen103
\ttl@minus=\dimen104
\titlewidth=\dimen105
\titlewidthlast=\dimen106
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-Michael D
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: too much space

Post by gmedina »

It's still isn't clear to me if the error appears with the code that you posted before. If that's not the case, please post the offending code itself.

I took a quick look at the log file that you just posted and noticed that your system is using old versions of some packages. Try updating your LaTeX system.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Re: too much space

Post by thedoctor818 »

I'll try doing that first. What is the quickest, easiest way of doing that. I am using ubuntu, & I think TexLive.

-Michael
-Michael D
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Too much space between chapter and section headings

Post by Stefan Kottwitz »

Hi Michael,

just post a reduced code that really brings the error (minimal working example, follow the link).
If we could reproduce this error using your code we should be able then fo find the cause and to correct it.

Stefan
LaTeX.org admin
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Too much space between chapter and section headings

Post by thedoctor818 »

Here is what I have.

Code: Select all

Code, edit and compile here:
\documentclass[12pt,letterpaper,twoside,openany]{book}
\usepackage[pagestyles]{titlesec}
\usepackage[left=0.50in,right=0.45in,top=0.50in,bottom=0.50in]{geometry}
\usepackage{liturg, framed, amsmath, amssymb}
\titleformat{\chapter}[display]
{\normalfont\Huge\bfseries\centering}{}{20pt}{\huge}
\titlespacing*{\chapter} {0pt}{30pt}{20pt}
\titleformat{\section}[display]
{\normalfont\LARGE\bfseries\centering}{}{14pt}{\Large}
\titlespacing*{\section} {0pt}{18pt}{14pt}
\titleformat{\subsection}[display]
{\normalfont\Large\bfseries\centering}{}{12pt}{\large}
\titlespacing*{\subsection} {0pt}{14pt}{10pt}
\newpagestyle{mystyle}{\sethead{}{}{}\setfoot{}{\thepage}{}}
\pagestyle{mystyle}
\begin{document}
%\maketitle
\tableofcontents
\chapter{SATURDAY EVENING PRAYERS.}
\ins{Towards evening, we stand before the holy icons (having lit a candle and maybe some incense), with reverence and fear of God; we gather our thoughts, make the Sign of the Cross, and say:}
In the Name of the Father, and of the Son, and of the Holy Spirit. Amen.
\begin{framed}
\rubric{From St. Thomas Sunday until Ascension, instead of \textbf{O God, cleanse me, a sinner \ldots we say:}}
Christ is risen from the dead, trampling down death by death, and upon those in the tombs bestowing life. \ins{(thrice)}\\
\ins{During any Vigil-rank Festal Period [(see Appendix A) - including your and your Temple's Patronal Feast Day], we begin our prayers by praying the Festal Troparia (again, see Appendix A).}
\rubric{Then, in either case, we immediately pray the Trisagion Prayers as below:}
\end{framed}
\rubric{Afterwards, we collect our thoughts, and make seven prostrations (or metanoias), saying:}
\subsection{THE SEVEN--BOW BEGINNING.}
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
That is w/o the appendices.
-Michael D
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: too much space

Post by Stefan Kottwitz »

That code is not producing that error. Instead the macros \ins and \rubric are undefined. Did you define them somewhere else? Without their definition it's not compilable and also the other errors are not reproducable.

Stefan
LaTeX.org admin
Post Reply