LaTeX prints only the first two pages of a document

I work in LaTeX and when I create a pdf (using the LaTeX button or pdfLaTeX button or using yap) there are only first two pages in the pdf. No mistakes. He just stops. If I make the first page longer by adding text, it still stops at the end of the second page. Any ideas?

OK, answering the first comment, here is the code

\documentclass{article}
\title{Outline of Book}
\author{Peter L. Flom}
    \begin{document}
\maketitle
\section*{Preface}
     \subsection*{Audience}
     \subsection*{What makes this book different?}
     \subsection*{Necessary background}
     \subsection*{How to read this book}
\section{Introduction}
    \subsection{The purpose of logistic regression}
    \subsection{The need for logistic regression}
    \subsection{Types of logistic regression}
\section{General issues in logistic regression}
    \subsection{Transforming independent and dependent variables}
    \subsection{Interactions}
    \subsection{Model selection}
    \subsection{Parameter estimates, confidence intervals, p values}
    \subsection{Summary and further reading}
\section{Dichotomous logistic regression}
    \subsection{Introduction, theory, examples}
    \subsection{Exploratory plots and analysis}
    \subsection{Basic model fitting}
    \subsection{Advanced and special issues in model fitting}
    \subsection{Diagnostic and descriptive plots and analysis}
    \subsection{Traps and gotchas}
    \subsection{Power analysis}
    \subsection{Summary and further reading}
    \subsection{Exercises}
\section{Ordinal logistic regression}
    \subsection{Introduction, theory, examples}
       \subsubsection{Introduction - what are ordinal variables?}
       \subsubsection{Theory of the model}
       \subsubsection{Examples for this chapter}
    \subsection{Exploratory plots and analysis}
    \subsection{Basic model fitting}
    \subsection{Advanced and special issues in model fitting}
    \subsection{Diagnostic and descriptive plots and analysis}
    \subsection{Traps and gotchas}
    \subsection{Power analysis}
    \subsection{Summary and further reading}
    \subsection{Exercises}
\section{Multinomial logistic regression}
    \subsection{Introduction, theory, examples}
    \subsection{Exploratory plots and analysis}
    \subsection{Basic model fitting}
    \subsection{Advanced and special issues in model fitting}
    \subsection{Diagnostic and descriptive plots and analysis}
    \subsection{Traps and gotchas}
    \subsection{Power analysis}
    \subsection{Summary and further reading}
    \subsection{Exercises}
\section{Choosing a model}
    \subsection{NOIR and its problems}
    \subsection{Linear vs. ordinal}
    \subsection{Ordinal vs. multinomial}
    \subsection{Summary and further reading}
    \subsection{Exercises}
\section{Extensions and related models}
    \subsection{Other logistic models}
    \subsection{Multilevel models - PROC NLMIXED and GLIMMIX}
    \subsection{Loglinear models - PROC CATMOD}
\section{Summary}
\end{document} 

      

thanks

Peter

+2


a source to share


5 answers


Add a tilde (~) after each of these section and subsection commands. If you have no content for a LaTeX section, it won't break the field (the tilde is a non-breaking space and will count as content).

i.e.

    \section*{Preface}~
         \subsection*{Audience}~
    ...

      



It might be better to use nested enums to achieve your goal (outline):

\begin{enumerate}
    \item Preface
    \begin{enumerate}
        \item  Audience
        \item  What makes this book different?
        \item  Necessary background
        \item  How to read this book
    \end{enumerate}
    \item Introduction
    \begin{enumerate}
        \item The purpose of logistic regression
        \item The need for logistic regression
        \item Types of logistic regression
    \end{enumerate}
    ...
\end{enumerate}

      

See other posts to customize your enumeration environment.

+2


a source


LaTeX macros \ section, \ subsection, etc. must have text after them. They intentionally prevent breakage with the material that follows it. Since you have a series of partitioning macros with nothing else, there is nowhere to break. If you look at your log you will see an overflowing vbox: I am getting

Overfull \ vbox (712.84044pt too high) has occurred while \ output is active []


This means that the contents of \ box 255 (which actually contains the set page) is too large and runs down. Since section commands were never intended to be used in this way, you may need to rethink your approach, or perhaps write your own versions that don't conflict with line breaks.

+6


a source


Additional information is needed! Can you reproduce this behavior with a minimal document?

What I would do:

  • Try to delete all blocks of text and replace them with one word, but keep all latex commands. Can you see the last block of text?
  • Now try removing all trivial latex commands ( \subject{}

    formulas, etc.).
  • If the issue is still reproducible, try removing each suspected latex command one at a time until you find the culprit.
  • Google for documentation of the offending command and try to figure out what went wrong.

I'm assuming you've used a command TeX

that "toggles" the document state and somehow removes all of the text from a specific point.

Something like using the command \em

once on one word and the rest of the bold text of the document.

+1


a source


I'm still not sure what was going on, but when I added some text to each section, the problem went away.

0


a source


So I had a different problem, but I just want to point out that when I was looking for a similar problem, when using Overleaf to compile my Latex doc, it stopped at 2 pages because I was ending the fraction incorrectly (I had too few trailing curly braces). I only realized this after checking the logs.

0


a source







All Articles