1

I want to publish the authors version of scientific research papers with additional copyright annotations. I have a multi-page pdf file paper.pdf which was created using the IEEEtran template for IEEE proceedings. Now I want to add a a header box and a footer box above and below the included pdf, using the white space for additional legal information. I ended up with the following code:

\documentclass[12pt]{scrartcl}
\renewcommand{\familydefault}{cmss}
\usepackage{pdfpages}
\begin{document}
\newcommand{\headernote}{
\centering
\vspace*{-2cm}
\fboxrule=0.4pt \fboxsep=3pt
\fbox{\begin{minipage}{1.05\linewidth} % header box
This is the author's version of an article that has been published in the ICMA 2020 proceedings.\\
Changes were made to this version by the publisher prior to publication. \\
The final version of record is available at http://dx.doi.org/10.1109/ICMA49215.2020.9233709
\end{minipage}}
\fbox{\begin{minipage}{1.05\linewidth} % footer box
Copyright (c) 2020 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.
\end{minipage}}
}
\includepdf[pages=-,pagecommand={\thispagestyle{empty}\headernote}]{paper.pdf}
\end{document}

Using \thispagestyle{empty} is for removing the page numbers. The header box is placed as I want. But I can not bring the footer box below the included pdf. Using vspace between the minipages was not successful and adding an additional empty minipage was neither. I can separate the boxes, but not enough, or I can bring the footer box to the next page. I guess I am missing something basic here.

0

Defining a new page style as shown in other posts is definitely a good idea. Another possible and very flexible way is to use option picturecommand:

\includepdf[
  pages=-,
  picturecommand={%
    \put(50,800){top: lorem ipsum}%
    \put(50,100){bottom: lorem ipsum}}
]{dummy.pdf}
1
  • fancyhdr, scrlayer and picturecommand all work well, but I would take this as a solution, since the tex code is the most simple. Thanks. I used picturecommand={\put(50,790){\headernote}\put(50,70){\footernote}}
    – schapplm
    Jan 31 '21 at 9:32
0

Using fancyhdr and enlarging the size of the pages will do the trick. (from letter to A4).

scale=0.98 downsizes the source a little (needs graphicx).

offset=8pt -20pt helps to center it on the page.

You can play around with these setting, and also withtop and bottom to find a layout of your liking.

g3

\documentclass[12pt, a4paper]{article}   
\usepackage[top=1.5in, left=0.8in, right=1in, bottom=0.9in]{geometry} % added

% letter 8.5x11.0 in
% A4 8.3x11.7 in
    
\renewcommand{\familydefault}{cmss}
\usepackage{pdfpages}

\usepackage{graphicx} % added   
\usepackage{fancyhdr} % added
\fancyhead{}
\fancyfoot{}
\fancyhead[C]{\headernote}
\fancyfoot[C]{\footernote}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}  

\begin{document}
    
\newcommand{\headernote}{%
\vspace*{-2cm}
\fboxrule=0.4pt \fboxsep=3pt \fbox{\begin{minipage}{1.05\linewidth} % header box
This is the author's version of an article that has been published in the ICMA 2020  proceedings.\\
Changes were made to this version by the publisher prior to publication. \\
The final version of record is available at http://dx.doi.org/10.1109/ICMA49215.2020.9233709
\end{minipage}}
}

\newcommand{\footernote}{%
 \fboxrule=0.4pt \fboxsep=3pt\fbox{\begin{minipage}{1.05\linewidth} % footer box
\centering      
Copyright (c) 2020 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.
\end{minipage}}
}
\includepdf[pages=-,pagecommand={\thispagestyle{fancy}},scale=0.98,offset=8pt -20pt]{IEEEtran_HOWTO.pdf}
\end{document}

As source I used the file IEEEtran_HOWTO.pdf which is part of ieetran distribution. It has a 8.5 x 11.0 in (letter) page size.

0

You could load package scrlayer (part of the KOMA-Script bundle) and declare a new layer page style:

\documentclass[12pt]{scrartcl}
\renewcommand{\familydefault}{cmss}
\usepackage{pdfpages}

\usepackage{scrlayer}

\DeclareNewLayer[
  background,
  head,
  addhoffset=-.06\textwidth,% horizontal shift
  width=1.12\textwidth,% maximal width
  addvoffset=.5\baselineskip,% vertical shift
  contents=\headernote
]{headerbox}
\newcommand\headernote{}

\DeclareNewLayer[
  background,
  foot,
  addhoffset=-.06\textwidth,% horizontal shift
  addwidth=.12\textwidth,% maximal width
  addvoffset=2\baselineskip,% vertical shift
  contents=\footernote
]{footerbox}
\newcommand\footernote{}

\DeclareNewPageStyleByLayers{boxes}{headerbox,footerbox}

\newcommand\copyrightbox[2][1.1\textwidth]{% syntax: \pagestylebox[<width of minipage>]{<content>}
  \setlength{\fboxrule}{0.4pt}%
  \setlength{\fboxsep}{3pt}%
  \centering
  \fbox{\begin{minipage}{#1}#2\end{minipage}}%
}

\begin{document}

\renewcommand\headernote{\copyrightbox{%
  This is the author's version of an article that has been published in the ICMA 2020 proceedings.\\
  Changes were made to this version by the publisher prior to publication. \\
  The final version of record is available at http://dx.doi.org/10.1109/ICMA49215.2020.9233709
}}
\renewcommand\footernote{\copyrightbox{%
  Copyright (c) 2020 IEEE. Personal use is permitted.
  For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.
}}
\includepdf[pages=-,pagecommand={\thispagestyle{boxes}}]{IEEEtran_HOWTO.pdf}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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