将 pstricks 封面放在文件开头,而不影响其余部分

将 pstricks 封面放在文件开头,而不影响其余部分

我有两个文件。一个是 pstricks 封面。另一个是书的内部。它们两个单独使用都很好。

我想将 pstricks 封面的代码放在 pdf 的第一页并编译整个文档。但是,当我这样做时,它会弄乱书的内部格式。

我尝试过\clearpage,但\newpage没有成功。

基本上,我希望 Latex 假装有两个单独的文档。

答案1

创建新文档

\documentclass[...]{article}% should have the same header as the original
\usepackage{geometry}
\geometry{...}% the same as in your text document
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=1-]{thetitle}% pdf document of the title
\includepdf[pages=1-]{thetext}% the main text doc
\end{document}

您将获得一个包含标题和所有文本页面的新文档。如果您为标题创建一个四页文档(完整封面、前 2 页和后 2 页),请按如下方式操作:

\documentclass[...]{article}% should have the same header as the original
\usepackage{geometry}
\geometry{...}% the same as in your text document
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=1-2]{thetitle}% cover/back 
\includepdf[pages=1-]{thetext}% the main text doc
\includepdf[pages=3-4]{thetitle}% backcover
\end{document}

相关内容