4

I'm not able to make even this minimal piece of code work when trying to include a pdf file in an IEEEtran document:

\documentclass{IEEEtran}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{pdfpages}

\begin{document}
\includepdf[pages=-]{file.pdf}
\end{document}

What I get is the following error:

! Undefined control sequence.
\@outputdblcol ...}}\@combinedblfloats \@setmarks
\@outputpage \begingroup \...

If I try to replace the document class with a standard one instead (e.g. article) the PDF file is produced with no errors.

Can you help me figure out what I'm doing wrong?

Thank you in advance

  • Try to add some text (or \null) before \includepdf : your issue seems to be caused by \includepdf right after \begin{document} – ebosi Feb 4 '17 at 10:27
6

This issue seems to be caused by calling \includepdf right after \begin{document}. You can either add some text, or use \null to put 'something' without any effect before including your pdf:

\documentclass{IEEEtran}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[english]{babel}
    \usepackage{pdfpages}

\begin{document}
    \null%
    \includepdf[pages=-]{file.pdf}
\end{document}
4

It seems to work if you define the offending command if it isn't already defined:

\documentclass{IEEEtran}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{pdfpages}
\makeatletter
\@ifundefined{@setmarks}{\let\@setmarks\relax}{}
\makeatother
\begin{document}
\includepdf[pages=-]{file.pdf}
\end{document}
  • Thank you very much for your answer, which works perfectly too. I simply chose the fastest one. – Renato Arino Feb 4 '17 at 10:35
  • 1
    Since \@ifundefined macro changed in latest kernel, what about update your answer accordingly? – Z.H. Jul 6 '18 at 12:00
  • @Z.H. oops:-) will fix thanks, done – David Carlisle Jul 6 '18 at 12:15
  • By the way, is it a bug of pdfpages? It is OK when I tried pdfpages in an old TeX distribution. And I could not find \@setmarks macro in pdfpages.sty. – Z.H. Jul 6 '18 at 12:31
  • @Z.H. I suspect so. – David Carlisle Jul 6 '18 at 13:22

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.