# Tag Info

9

You can use \@tfor. I provide also a better redefinition of the dot under according to your wish: \documentclass{article} \usepackage{graphicx} \let\d\relax \DeclareRobustCommand{\d}[1]{% \oalign{#1\cr\hidewidth\scalebox{0.5}{\textbullet}\hidewidth\cr}% } \makeatletter \newcommand{\ds}[1]{% \@tfor\next:=#1\do{\d{\next}}% } \makeatother ...

4

This solution allows word wrap and handles spaces between words. In addition, the [w] option allows the task to be performed on each word, rather than each character.' In the MWE, I demonstrate with variously defined tasks: overstrike each character (2 different settings) place a dot under each character place a semicolon under each word apply extra ...

3

With some debug output: \documentclass[12pt,titlepage]{article} \usepackage{pgffor} \setlength\parindent{0pt} \def\mydata{ {1,2}, {3,4} } \begin{document} \foreach \x in \mydata { now starting new entry [\texttt{\detokenize\expandafter{\x}}]\\ \foreach \y in \x { \y \\ } } \end{document} As can be seen, the parsing of the comma ...

2

You have spurious spaces \documentclass[12pt,titlepage]{article} \usepackage{pgffor} \setlength\parindent{0pt} \def\mydata{{1,2},{3,4}} \begin{document} \foreach \x in \mydata { now starting new entry....\\ \foreach \y in \x { \y \\ } } \end{document}

1

This is not a direct answer, but I want just to mention that there are other solutions, for example xintFor from xinttools library. \documentclass[preview, border=7mm]{standalone} \usepackage{xinttools} % spaces before and after commas are deleted \def\mydata{ {1,2}, {3,4} } \begin{document} \xintFor #1 in {\mydata} \do { now starting new ...

Only top voted, non community-wiki answers of a minimum length are eligible