Skip to main content

Timeline for Define a variable in TikZ

Current License: CC BY-SA 2.5

6 events
when toggle format what by license comment
Feb 16, 2022 at 21:36 comment added Atcold How do we avoid overwriting existing LaTeX macros? I'm afraid I'm going to blow up my entire book if this happens.
Feb 11, 2013 at 15:24 comment added Habi @Rasoul Yes, exactly. I'm using it like \x+78+\shadow in the fifth line from bottom. Dividing works too. Try changing said line to \draw[|-|,white,thick] (\x/2,\y) -- (\x/2+78,\y) node [midway,above] {\SI{500}{\micro\meter}}; and you see that the white scalebar moves...
Feb 10, 2013 at 19:00 comment added Rasoul Then, how we can use the defined variable somewhere else where we need to divide it by, for example, 2? \varname/2? \varname*0.5?
Oct 26, 2012 at 6:50 comment added Habi You're of course right that the answer could be written much shorter, but I wanted to show a full example on how I use \dev\varname{initialValue}.
Oct 25, 2012 at 17:49 comment added bobobobo Yes, so to be clear your answer is \def\varname{initialValue}. I think your example is far too complicated to show use of a simple variable.
Mar 7, 2011 at 17:14 history answered Habi CC BY-SA 2.5