0

I am using LaTeX to write a thesis now and there exists a problem that every time a new paragraph can not be fully situated on the current page, the system will put it completely on a new page, leaving large blanks at the current page. Is there any way to let the system break the paragraph and put it separately on two pages?

I have pasted my code below.

\documentclass[cit,thesis,plain,nochapterblankpages,uglyheadings]{puthesis-cot}
\usepackage{multirow,booktabs,setspace,caption}
\DeclareCaptionLabelSeparator*{spaced}{\\[2ex]}
\DeclareCaptionLabelSeparator*{null}{ }
\captionsetup[table]
{format=plain,justification=centering,singlelinecheck=false,labelsep=null,skip=0pt}
\captionsetup[figure]{labelsep=null,justification=centering,singlelinecheck=false,font=doublespacing}
\usepackage{indentfirst}
\newcommand{\ip}{\mbox{}\indent}
\usepackage{fixltx2e}
\usepackage{enumitem}
\newlist{italicdesc}{description}{4}
\setlist[italicdesc]{font=\normalfont\itshape}
\usepackage[none]{hyphenat}
\raggedright
\parindent=0.5in
\usepackage{amsmath,amssymb}
\usepackage{array}
\usepackage{changepage}
\usepackage[chapter]{algorithm}
\usepackage{algpseudocode}
\usepackage{url}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage[none]{hyphenat}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\hyphenpenalty=5000 
\tolerance=1000
\usepackage{multicol}
\usepackage{subfigure}
\usepackage{natbib}
\usepackage{setspace, caption}
\usepackage[margin=1cm]{caption}
\usepackage{caption}
\usepackage{ragged2e}
\captionsetup[figure]{font={stretch=0.5}}
\captionsetup[table]{font={stretch=0.5}}
\makeatletter
\renewcommand{\section}{\@startsection{section}{1}{0mm}
    {-\baselineskip}{0.2\baselineskip}{\bf\leftline}}
\renewcommand{\subsection}{\@startsection{subsection}{1}{0mm}
    {-\baselineskip}{0.2\baselineskip}{\bf\leftline}}
\makeatother
\renewcommand{\bibname}{REFERENCES}

\newcommand{\margins}{\Repeat{Show where the margins for the page are.}{4}}

\let\en=\ensuremath

\newcommand{\ve}[2]{\en{#1_1},~\en{#1_2},\ \ldots,~\en{#1_{#2}}}
\usepackage{etoolbox}
\patchcmd{\thebibliography}
{\Baselinestretch{1}\setlength{\itemsep}{12pt plus 0.1pt}\settowidth}
{}{}
\apptocmd{\thebibliography}
{\normalsize}
{}{}
\interlinepenalty=10000
\begin{document}
  • normally LaTeX does break paragraphs, so you are doing something to prevent this. You will have to show some code. – Ulrike Fischer Jul 15 at 15:47
  • 2
    By setting \interlinepenalty to 10000 you're essentially saying do not break paragraphs across pages. Why do you have that in your preamble? – Don Hosek Jul 15 at 16:36
3

The settings you have

\hyphenpenalty=5000
\tolerance=1000

will make bad paragraphs, with large spaces between words in order to avoid hyphenation.

But the real problem is

\interlinepenalty=10000

which prohibits TeX from splitting any paragraph across pages, because a penalty of 10000 is essentially infinite. So there is no feasible page break point between lines of a paragraph. The only points where a page break is possible is therefore between paragraphs.

Remove all three settings.


I'd also remove

\makeatletter
\renewcommand{\section}{\@startsection{section}{1}{0mm}
    {-\baselineskip}{0.2\baselineskip}{\bf\leftline}}
\renewcommand{\subsection}{\@startsection{subsection}{1}{0mm}
    {-\baselineskip}{0.2\baselineskip}{\bf\leftline}}
\makeatother

or, at least, change \bf\leftline into \bfseries. The command \bf has been obsolete for 25 years and \leftline simply prevents line breaks in a section title; if it's longer than the text width, it will go beyond the right margin without any warning.

There are several other things that make the preamble to look like it comes down from a few generations of students, each one adding their own bits.

Start with a fresh preamble and add only what you really need.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.