4
votes
0answers
56 views

Variable Input/Output node using a new command

How can I create a variable input/output node using a new command as in the following picture Say for example, I know that the node will have n inputs and m outputs, which I enter the name as an ...
4
votes
1answer
124 views

tikz def node name (or reference) for nodes create using the def

I have the following definition in order to create a node with cylinder shape \def\dnc[#1,#2,#3,#4]#5{ \node[draw, cylinder, alias=cyl, shape border rotate=90, aspect=1.6, % minimum height=25, ...
5
votes
1answer
147 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} ...
9
votes
1answer
1k 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
260 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
1k 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
366 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} ...
9
votes
2answers
572 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
519 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};}, ...
2
votes
3answers
764 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
263 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, ...
6
votes
3answers
3k 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 ...