3

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

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

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

谢谢

彼得

4

5 回答 5

7

LaTeX 宏 \section、\subsection 等旨在在其后添加一些文本。他们故意防止与紧随其后的材料中断。由于您有一系列没有其他内容的分段宏,因此无处可发生中断。如果你查看你的日志,你会看到一个过满的 vbox:我明白了

在 \output 处于活动状态时发生了 Overfull \vbox (712.84044pt too high) []

这意味着 \box 255 的内容(实际上包含排版页面)太大了,并且超出了底部。由于从未打算像这样使用部分命令,因此您可能必须重新考虑您的方法,或者可能编写自己的版本以不与换行符混淆。

于 2010-04-20T18:58:02.220 回答
4

在每个部分和小节命令后添加波浪号 (~)。如果某个部分没有内容,则 LaTeX 不会破坏框(波浪号是不间断的空格,将被视为内容)。

IE

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

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

于 2010-04-21T13:59:18.060 回答
1

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

我会做的是:

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

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

就像\em在一个单词上使用一次命令,然后将文档的其余部分用粗体显示。

于 2010-04-20T18:02:11.430 回答
0

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

于 2010-04-20T18:52:11.687 回答
0

所以我有一个不同的问题,但我只想指出,当我搜索类似的问题时,当使用 Overleaf 编译我的 Latex 文档时,它停在 2 页,因为我没有正确结束一个分数(我有一个太少的端花括号)。不过,我只是在检查日志后才发现这一点。

于 2019-04-18T15:31:46.357 回答