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?

  • 3
    The etextools package is buggy and its author abandoned it. – egreg Nov 21 '14 at 14:43
  • 1
    What do you use etextools for? – egreg Nov 21 '14 at 15:11
  • Mostly \iftoggle, \newtoggle, \toggletrue, \togglefalse etc. – carsten Nov 21 '14 at 15:17
  • 2
    Those are in etoolbox, no need of etextools for them. – egreg Nov 21 '14 at 15:22
  • Oh, I was unaware of that. Swapping etextools for etoolbox works for me, so that solves it, I guess. – carsten Nov 21 '14 at 15:29
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.

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.