# Incompatibility between pagesel and pgfgantt

The following code

\documentclass{scrartcl}
\usepackage[-6,nonofiles]{pagesel}
\usepackage{lipsum}
%\usepackage{pgfgantt}
\begin{document}
\lipsum[1-100]
\end{document}


works fine, but if you comment out the fourth line the PDF produced includes a blank page for each discarded page. Any solution/explanation to this problem?

A fix is to place \usepackage{pgfgantt} before \usepackage[-6,nonofiles]{pagesel}, but still some explanation would be welcome.

Just change the loading order and you'll get the expected output:

\documentclass{scrartcl}
\usepackage{pgfgantt}
\usepackage[-6,nonofiles]{pagesel}
\usepackage{lipsum}
\begin{document}
\lipsum[1-100]
\end{document}

• I'll have to dig through pgfgantt to find any incompatibility. – Werner May 30 '14 at 13:52
• Thank you for the answer. I had also found the fix as mentioned in the second part of my question. but I suppose you were writing the answer while I was editing the question. – Pierre May 30 '14 at 13:59
• @Pierre: pgfgantt loads tikz (of PGF). And I know PGF has the ability to overlay elements onto the page - something that is done during the shipout routine. My guess is pagesel's use of everyshi should be inserted before tikz gets a change to modify this output routine, causing the incompatibility. – Werner May 30 '14 at 16:08