I'm creating a tikz style to do some complicated linear transformation on the coordinates, computed in terms of variables. To give an idea, here's what the style declaration looks like now:
\tikzset{foo/.style={cm={\cosLgP,
\sinLgP * (-\sinEl),
\cosLa * \cosLg,
\sinLa * \cosEl - \cosLa * \sinLg * \sinEl,
(0,0)}}}
...where \cosLgP &co are some previously defined macros (that should evaluate to various sines and cosines, if all goes well).
There's a bug and the coordinate transformation appears to be incorrect. How do I debug? Specifically, how do I print the (numerical) contents of the transformation matrix of foo, to see what it ended up containing?
Thanks!
foo/.styleadd/utils/exec={\show\cosLgP}(mind the initial forward slash) as the last item. If those values are dimen registers then use\showtheinstead – percusse Dec 20 '17 at 14:00/utils/exec={\show\cosLgP\show\sinLa}and it works as expected. Only drawback I guess is that it interrupts the LaTeXing process, instead of "dumping" the values somewhere for later inspection. – Labrador Dec 21 '17 at 08:39\typeout{\cosLgP}(instead of\show\cosLgP) to show the value in your.logfile without interruption... – Paul Gaborit Feb 03 '18 at 11:38