5

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

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

2 Answers 2

10

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}
5
  • Thank you very much for your answer, which works perfectly too. I simply chose the fastest one. Feb 4, 2017 at 10:35
  • 1
    Since \@ifundefined macro changed in latest kernel, what about update your answer accordingly?
    – Z.H.
    Jul 6, 2018 at 12:00
  • @Z.H. oops:-) will fix thanks, done Jul 6, 2018 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, 2018 at 12:31
  • @Z.H. I suspect so. Jul 6, 2018 at 13:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .