首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >LaTeX仅打印文档的前两页

LaTeX仅打印文档的前两页
EN

Stack Overflow用户
提问于 2010-04-21 01:51:50
回答 4查看 6.6K关注 0票数 3

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

好的,对第一条评论的回应是,代码如下

代码语言:javascript
运行
复制
\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} 

谢谢

彼得

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2010-04-21 21:59:18

在这些section和section命令之后添加一个波浪号(~)。如果某个部分没有内容,LaTeX将不会拆分该框(代字号是一个不间断的空格,将算作内容)。

代码语言:javascript
运行
复制
    \section*{Preface}~
         \subsection*{Audience}~
    ...

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

代码语言:javascript
运行
复制
\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}

枚举环境自定义请参考其他帖子。

票数 2
EN

Stack Overflow用户

发布于 2010-04-21 02:02:11

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

我会做的是:

  1. 尝试删除所有文本块并将其替换为单个单词,但保留所有latex命令。您还能看到最后一块文本吗?
  2. 现在尝试删除所有无关紧要的latex命令(\subject{}公式等)。
  3. 如果问题仍然存在,请尝试逐个删除每个可疑的latex命令,直到找到违规命令文档的culprit.
  4. Google,并尝试了解哪里出了问题。

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

类似于在单个单词上使用一次\em命令,然后将文档的其余部分设置为粗体。

票数 1
EN

Stack Overflow用户

发布于 2010-04-21 02:52:12

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2677426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档