I am using memoir for writing my PhD thesis. In my university we have to include submitted, accepted, and prepared drafts of related papers as appendices.
These papers have all been previously created using LaTeX (using the class elsarticle). I have them as PDF with white borders/margins stripped away using Adobe Acrobat. They are therefore in different sizes.
My question is in regard to pdfpages. How can I make sure that a pdf-page is inserted correctly on a full document-page (without a Chapter-title).
I use the following class-options and predefined layout:
\documentclass[a4paper,12pt,twoside,onecolumn,openright,final,showtrims]{memoir}
\semiisopage[12]
\checkandfixthelayout
My problem is that pdfpages seems to center the pdf-page itself on the entire stock (if we use memoir-jargon). I want the pages to center/fit in the area delimited by lengths such as \textwidth
and \textheight
(defined in the memoir manual, memman.pdf, on page 10 and 11).
I use the following options with \includepdf
:
\includepdf[
pages={-},
frame=false, % so I can adjust this if I need it
noautoscale=true, % I should scale it myself, right?
scale=1.0, % is this 1.0 by default?
pagecommand={\thispagestyle{plain}}, % I guess this is necessary?
%templatesize={\textwidth}{\textheight}, % not sure this work?
offset={0mm 0mm} % my guess is, that I need to adjust this one?
]{<paper_pdf_filename>}
As I mention above, I would likely need to adjust offset
so that the pages are placed/fitted in the area called "body" on page 10-11 in the memoir manual.
Further elaborations:
I would like the pages of each paper to be part of the surrounding document. The entire thesis will still have material after the inserted papers. It will continue with a global reference section and perhaps even a short index. The inserted pages of each paper should exist as if they are exactly that - inserts - not pages on their own. Which is why I use the pagestyle plain
to include the thesis page number.
If you take a look at memman.pdf on page 10-11, you will see the different page-margins for the memoir-class. I need the logic box of each inserted page to have an offset such that is correct in regards to these margins.
I have tried the following (using the calc-package):
\newcommand{\pdfxoffset}{\marginparsep + \marginparwidth + \trimedge}
\newcommand{\pdfyoffset}{\uppermargin + \trimtop}
With these options for \includepdf
:
pagecommand={\thispagestyle{plain}},
width=\textwidth,
height=\textheight,
offset={\pdfxoffset mm \pdfyoffset mm}
But it does not fit entirely as I want it (but almost). I am also not exactly sure what I am doing here. Can I just add lengths together like this? Not sure I even grasp the programming-language constructs in TeX/LaTeX.
pdfpages
is not affected by the text area is one of its main features IMHO. You can use\includegraphics[page=..,width=\textwidth,height=\textheight,keepaspectratio]{..}
instead for every page. I recently finished my PhD thesis and I did not use the same text area for the papers in the appendix. – Martin Scharrer♦ Jun 14 '12 at 8:42\textwidth
and\textheight
. If the attempts with the margins fail completely I will use this as a method to fall back to. – Ole Thomsen Buus Jun 14 '12 at 11:59\spinemargin
, as described in the other question? The figure there is at 800% magnification, so you might not even notice the remaining gap. Otherwise, just add some manually determined 1.x pt. Or is there anything else you need? – dgs Jun 17 '12 at 15:58