1

The following code fails to compile:

\documentclass{beamer}
\usepackage{csvsimple}
\usepackage{etextools}
\begin{document}
Hello!
\end{document}

The error message is

! LaTeX Error: Command \csvloop already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.920 \DeclareCmdListParser\csvloop{,}

What is the appropriate way to solve this? The only way I can currently think of is to call \def\csvloop\@undefined in between loading the packages, but this seems a little radical to me.

Is this incompatibility known? Is one of the packages deprecated and/or can be replaced by something else that provides similar capabilities but does not exhibit this behavior?

carsten
  • 2,966

1 Answers1

2

If you need some of the commands in etextools, you may load the package scrlfile from the KOMA-script bundle. This package controls the loading of packages, classes and files and their behaviour. It also has functions in a safe way to save macros to helper macros, and restore them after loading problematic packages. You may then:

  1. Load csvsimple
  2. Save the csvsimple-macro csvloop
  3. Load the etextoolspackages
  4. In a controlled manner restore the csvloop from csvsimple

Have a look at page 263 and onwards in the manual, where the different commands are described in detail with examples of their use.

Sveinung
  • 20,355