[texhax] handling of dot and space in a string
Goebel, Juergen
juergen.goebel at cassidian.com
Thu Aug 15 14:15:25 CEST 2013
Hi,
The structure in the example works fine, but only if there
is nor a dot neither a space in the string (dot: output is
interrupted, space: will be ignored).
What do I have to change to set also dot and spaces correctly?
TIA
Jürgen
\documentclass{scrartcl}
\usepackage{tikz}
\makeatletter
\newlength{\jgTikZ <at> xcoord}%
\newlength{\jgTikZ <at> ycoord}%
\setlength{\jgTikZ <at> xcoord}{0cm}%
\setlength{\jgTikZ <at> ycoord}{0cm}%
\newcommand\TikZsetcharacters[1]{%
\begingroup\jgTikZ <at> WORD#1.\endgroup%
}%
\def\jgTikZ <at> WORD#1{%
\ifx#1.\let\next\relax\else\jgTikZ <at> Word{#1}\let\next=\jgTikZ <at> WORD\fi%
\next%
}%
\newcommand\jgTikZ <at> Word[1]{%
\node at (\jgTikZ <at> xcoord,\jgTikZ <at> ycoord) {#1};%
\addtolength{\jgTikZ <at> xcoord}{1cm}%
}%
\makeatother
\begin{document}
\begin{tikzpicture}
\TikZsetcharacters{Test}
\end{tikzpicture}
\newcommand{\test}{Test}
\begin{tikzpicture}
\TikZsetcharacters{\test}
\end{tikzpicture}
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20130815/a6c85c22/attachment.html>
More information about the texhax
mailing list