1

It's my code,

\documentclass[a4paper,twoside,openright,11pt]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[svgnames]{xcolor}
\usepackage{lipsum}
\usepackage[explicit]{titlesec}
\usepackage{tikz}

\titleformat{\section}[block]%        
{\normalsize\bfseries\itshape\tikz[overlay] \shade[left color=red!20!yellow,right color=black!40!white] (0,-1ex) rectangle  (\linewidth,1em);}%
{\thesection}%                   
{1em}%
{\color{Maroon}#1}

\begin{document}
\chapter{Chapter One}
\section{Section One}
\section{Section Two}
\section{Mass}
\section{Time}
\section{Velocity}
\section{Force}
\section{Section}
\section{Lorem}
\section{Badness}
\section{Underfull}
\section{Section One}
\section{The Basic Structure Of an Atom}
\section{Mass}
\section{Time}
\section{Section One}
\section{Section Two}
\section{Mass}
\section{Time}
\section{Velocity}
\section{Force}
\section{Section}
\section{Lorem}
\section{Badness}
\section{Underfull}
\section{Section One}
\section{The Basic Structure Of an Atom}
\section{Mass}
\section{Time}
\end{document}

Display... enter image description here That is, at the bottom page Section Titles are not the crossing next page.

I'm sure this is a duplicate of another question that I just can't find. So, does anyone know how to fix it.

Özgür
  • 3,270

1 Answers1

2

LaTeX is trying to typeset what amounts to a poorly formed document.

Normally headings are "tied" to the text which follows. This is to avoid the unsightly situation where a heading appears alone at the bottom of a page, with its following text on the next page.

Your document has no content, just headings, therefore all break options are equal and no break is made. As dcmst notes, adding any content between the headings provides break options for laying out the text.

Nigel
  • 1,221