Linked Questions

225 votes
5 answers
74k views

I'm quite happy hacking TeX macros and cobbling together bits and pieces from different style files to suit my own ends, but I have a suspicion that my resulting hacks are not quite as elegant as they ...
Andrew Stacey's user avatar
17 votes
2 answers
864 views

According to chapter 20 of the TeXbook, a macro that is defined as "long" (by saying \long just before \def\<macroname>) allows arguments with \par tokens (i.e., paragraphs). Suppose I encounter ...
lockstep's user avatar
  • 257k
14 votes
1 answer
11k views

I need to increment/decrement variables in TikZ, i.e., I have \def\a{0} and then I need to perform \a=\a-1.5; The code compiles, but it does not change the value of the variable \a. How do I do ...
user avatar
6 votes
2 answers
542 views

I'm trying to write a Tex command that automatically prints out attribution information for images I use in my document. I created 2 different commands. The first one is \nounattr (with 3 parameters) ...
Pieter Verschaffelt's user avatar
2 votes
2 answers
341 views

I want to retrieve a member of a non-numeric array passed to a TikZ pic as an argument, to use it as a node label. \foreach easily does it while iterating over the array, but I cannot do it for the ...
Utkan Gezer's user avatar
4 votes
0 answers
772 views

I'd like to understand how to properly use variables in TikZ. I've read a large number of Q&A's and, so far, I've encountered \{g,x,e,}def, \newcommand, \pgfmathsetmacro, and \let. The objective ...
Atcold's user avatar
  • 1,909
4 votes
1 answer
173 views

I have defined a \newcommand {atest} to draw a line composed with a snowflake, as in the figure 1. To adjust the length of the composition to the right margin of the page I use two parameters and I ...
Jesús Álvarez Lobo's user avatar
2 votes
2 answers
177 views

\documentclass{article} \usepackage{tikz} \begin{document} \newcommand\routine[1] { \pgfmathsetmacro\temp{0} \foreach[parse=true][remember=\temp] \i in {1,...,#1} { \pgfmathsetmacro\...
acter2932's user avatar
0 votes
1 answer
147 views

My current code generates a result as shown in the image below. My problem is: how to cumulate the "Car" durations?. When the line 95 % \global\let\routeCarTotalDuration\tempd% is uncommented, I ...
Joseph Marie's user avatar
0 votes
1 answer
199 views

I'm using TeXShop 5.0.4 and encountering a cryptic error ! Incomplete \iffalse; all text was ignored after line 15. <inserted text> \fi where my code contains no explicit "...
David Fink's user avatar