1

I would like to split a long string (as in the example below) when this string is in a variable:

\documentclass[a4paper]{article}
\def\parametre{0azertyuiopqsdfghjklmwxcvbn1azertyuiopqsdfghjklmwxcvbn2azertyuiopqsdfghjklmwxcvbn3azertyuiopqsdfghjklmwxcvbn}
\usepackage{seqsplit}

\begin{document}

\begin{minipage}{10cm}
\seqsplit{\parametre} %not correct
\end{minipage}

\begin{minipage}{10cm}
\seqsplit{0azertyuiopqsdfghjklmwxcvbn1azertyuiopqsdfghjklmwxcvbn2azertyuiopqsdfghjklmwxcvbn3azertyuiopqsdfghjklmwxcvbn}
%correct
\end{minipage}

\end{document}
  • Welcome to TeX.SX! Doing \expandafter\seqsplit\expandafter{\parametre} will do. – egreg Jul 3 '15 at 16:33

Browse other questions tagged or ask your own question.