Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have two files. One is a pstricks cover. The other is the interior of the book. They both are fine on their own.

I would like to put the code for pstricks cover on the first page of the pdf and compile the whole document. However, when I do that, it messes up the formatting of the interior of the book.

I have tried \clearpage and \newpage without success.

Basically, I want latex to pretend that there are two separate documents.

share|improve this question

1 Answer 1

up vote 9 down vote accepted

create a new document

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

and you'll get a new one with the title and all text pages. If you create a four pages document for the title (the complete cover, the first 2 and last 2 pages), then do it this way:

\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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.