I have a longer work and in that I want include a pdf-file and also I have customize enumerate-items with package enumitem. With inculded package pdfpages I get errors.

Is it possible to include pdfpages and to keep my customization with enumitem? Minimal working example below.



% um PDF-Dateien einbinden zu können ---------------------------------------------------------------

% Tabellen -----------------------------------------------------------------------------------------
\usepackage{booktabs}                   % horizontale Linien in Tabellen
\usepackage{longtable}                  % lange Tabellen
\usepackage{ragged2e,array}             % für Ausrichtung der Tabellen(-spalten/-zellen)

% Programmierung der Auflistung der Interviewitems -------------------------------------------------








\begin{longtable}[l]{>{\RaggedRight}p{5.75cm}>{\RaggedRight}p{10.25cm}} \toprule

Inhalt & Frage \\ \midrule
\bfseries \begin{enumerate}[label=\KategoriePlus] \item Allgemeine Daten \end{enumerate} \end{minipage}} \\
Soziodemografische Daten der Versuchsperson &
\begin{minipage}[t]{10cm} \begin{enumerate}[label=\Alph{Kategorie}.\FragePlus]
\item Alter
\item Geschlecht
\item Schulabschluss
\end{enumerate} \end{minipage} \\ \bottomrule



Package pdfpages loads package calc that makes \setcounter and \addtocounter more fragile, especially if they are used inside option label of package enumitem's redefined environment enumerate.

The best solution would be to avoid the counter assignments in label. because this option is intended for formatting the label and nothing else. If a later version of enumitem would call the code of \label twice per \item, then it would also disturb the counter assignments.

Thus the following is only a crude hack, using robust counter assignments, but not curing the underlying problem:

  % \stepcounter{Kategorie}%
  \global\advance\value{Kategorie} by 1\relax
  % \setcounter{Frage}{1}%

  % \stepcounter{Frage}%
  \global\advance\value{Frage} by 1\relax

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.