Tagged Questions
1
vote
0answers
37 views
Define tikz node based on pagenodes
I want to define a tikz node called current grid area based on the nodes defined by the tikzpagenodes package. This node is a rectangle that contains the 4 nodes defined in the package; current page ...
4
votes
1answer
80 views
Creating a strikeout command
I am trying to create a command that works in mathmode which simulates a strikeout diagonally while leaving the math display intact.
\documentclass{article}
\usepackage{amsmath,amssymb}
...
6
votes
1answer
218 views
Difference between \newcommand and \pgfmathsetmacro used in TikZ \coordinate
Consider the following code:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\newcommand{\MA}{4}
\pgfmathsetmacro{\MB}{4};
\coordinate (V11) at (0,0);
...
3
votes
1answer
132 views
tikz - Multiple nodes with same content
I would like to know how to place multiple nodes with same content in TikZ.
I've made a macro for it, but I think that it could have a different approach.
\usepackage{tikz}
\usepackage{bm}
...
10
votes
1answer
511 views
macro for empty nodes in tikz-qtree
I'm trying to define a macro for writing empty nodes in a binary tree using tikz-qtree.
Referring to the code below, I want the string \missing in my code to be replaced by \edge[draw=none]; {} as-is ...
3
votes
1answer
218 views
newcommand with argument produces unwanted extra space within tikzpicture
I am creating some pictures I want to use within nodes. When I use a \newcommand with an argument, extra space is added and I can't get rid of it.
\documentclass{article}
\usepackage{tikz}
...
8
votes
2answers
339 views
Is it possible to use a macro to name a TikZ node?
Is it possible to use a macro to name and reference TikZ nodes.
For example:
\begin{tikzpicture}
\node (0) at (0,0) {X};
\node (\mymacro{2}{3}) at (1,2) {Y};
\draw (\mymacro{2}{3}) -- ...
3
votes
1answer
431 views
Placing a list of nodes in TikZ
I would like to define a macro, which would take a list of node definitions, like this
\mymacro[boxes={{\node[rectangle] {foo};},
{\node[rectangle] {bar};},
...
1
vote
3answers
351 views
pgf macro that returns a node
How can I write a macro that returns a coordinate (or a node). The node must be usable within a tikzpicture environment and preferably inside a path declaration.
I need something like the following ...
4
votes
1answer
210 views
How can I pass the body of a TikZ node to a font-changing macro?
After looking around at some other answers on this site, I'm trying to typeset a tree using the tikz-qtree package. It works great, but by design it does not let you use macros in the tree nodes, ...
4
votes
3answers
2k views
How to create custom Tikz nodes?
I don't want to change style only.
I want to create node that takes 3 numbers and display them with appropriate decorations.
For instance:
\mynode{5,6,7}
Should display node with "a=5", "b=6" and ...