LaTeX只打印文档的前两页

问题描述 投票:2回答:5

我在LaTeX工作,当我创建一个pdf文件(使用LaTeX按钮或pdfLaTeX按钮或使用yap)时,pdf只有前两页。没有错误。它就停止了。如果我通过添加文本使第一页更长,它仍然在第2页的末尾停止。有任何想法吗?

好的,回复第一条评论,这是代码

\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} 

谢谢

彼得

latex pdflatex
5个回答
2
投票

在这些section和subsection命令之后添加一个波浪号(〜)。如果您没有任何内容,LaTeX将不会破坏该框(波浪线是一个不间断的空间,将计为内容)。

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

为了实现您的目标(大纲),最好使用嵌套枚举:

\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}

有关枚举环境的自定义,请参阅其他帖子。


6
投票

LaTeX宏\ section,\ subsection等用于在它们后面加上一些文本。他们刻意防止紧随其后的材料破裂。由于你有一系列的切片宏没有别的东西,所以没有任何地方可以发生中断。如果你查看你的日志,你会看到一个过满的vbox:我明白了

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

这意味着\ box 255(实际上包含排版页面)的内容太大了,并且从底部开始运行。由于部分命令从未打算像这样使用,您可能需要重新考虑您的方法,或者编写您自己的版本,不要破坏断行。


1
投票

需要更多信息!你能用最少的文件重现这种行为吗?

我要做的是:

  1. 尝试删除所有文本块并用一个单词替换它们,但保留所有乳胶命令。你还能看到最后一段文字吗?
  2. 现在尝试删除所有琐碎的乳胶命令(\subject{}公式等)。
  3. 如果问题仍然存在,请尝试逐个删除每个可疑的乳胶命令,直到找到罪魁祸首为止。
  4. Google用于记录违规命令,并尝试了解出了什么问题。

我的猜测是,你使用了一些TeX命令来“切换”文档的状态,并以某种方式从某一点删除所有文本。

比如在单个单词上使用\em命令一次,并使文档的其余部分加粗。


0
投票

我仍然不确定发生了什么,但当我在每个部分添加一些文字时,问题就消失了。


0
投票

所以我有一个不同的问题,但我只想指出,当我在寻找类似的问题时,使用Overleaf来编译我的Latex文档时,它停在2页因为我没有正确地结束一小部分(我有一个太少的结束花括号)。不过,在我检查了日志之后,我才知道这一点。

© www.soinside.com 2019 - 2024. All rights reserved.