6

I am trying to define a variable with an asterisk in its value but keep getting errors. I have tried \def, \let and \newcommand but neither worked. A minimal example:

\documentclass{article}
\usepackage{enumitem}
\def\cLists{leftmargin=*}
\setlist{\cLists}
\begin{document}
\begin{itemize}
\item a
\end{itemize}
\end{document}

Any help, please?

lockstep
  • 250,273
Kamil S.
  • 348

1 Answers1

10

To appropriately use a control sequence \cLists as arguments to \setlist, use

\expandafter\setlist\expandafter{\cLists}

This expands \cLists first, before passing it to \setlist.

Werner
  • 603,163