How can I compile first 2 pages of 24 pages in a Latex document?

非 Y 不嫁゛ 提交于 2019-12-06 13:34:36

I'd just make a new file with only the abstract and introduction and compile that.

Actually, if this is not just a one-time thing, I'd use three files:

absintro.tex:

\begin{abstract}
  ...
\end{abstract}
...introduction...

onlyabsintro.tex:

...
\begin{document}
    \include{absintro.tex}
\end{document}

fullreport.tex:

...
\begin{document}
   \include{absintro.tex}
   ...other stuff...
\end{document}

(Obviously the filenames can be whatever you want, this just shows the structure) You can compile onlyabsintro.tex to get only the abstract and introduction, or fullreport.tex to get the whole thing.

dmckee

In addition to David's good advice, you could simple compile the whole thing, then extract the pages you want from the finished product. This might be the easiest approach for a one time task.

If you compile to PDF, consider using pdftk, which would let you use a command like:

pdftk A=one.pdf cat A1-2 output intro.pdf
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!