13 questions linked to/from Tikz foreach inside matrix
5k views

### How do I go about typesetting a Genkou Youshi page?

I wanted to create a simple sort of template, for printing and then using by hand. The one I want to create is called Genkō yōshi (原稿用紙, "manuscript paper"), which is nothing more than those squares ...
458 views

### Is there any efficient way to add cell identifier to each cell in TikZ?

I made a grid with TikZ. I would like to add the cell number in each cell (in the middle of each cell), I used this command \draw (-4,2.5) node[below] {$Z_1$}; But this solution is time consuming. ...
2k views

### Foreach inside a TikZ matrix

Consider this MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix [matrix of nodes] { a \\ b \\ c \\ }; \end{tikzpicture} \end{...
4k views

### TiKZ matrix of objects

I am drawing diagrams which consist of grids, some cells of which are filled with circles, like this: I created this picture with \begin{tikzpicture}[scale=0.6] \draw[shift={(0.5,0.5)}] (0,0) grid ...
616 views

### Matrix and counters out of the matrix in TikZ

Code: \begin{tikzpicture} \matrix[matrix of math nodes, anchor=south west, nodes={ draw=red, align=center, inner sep=0pt, text width=1cm - \pgflinewidth, ...
283 views

### How to “demux” several aspects from a \foreach variable with \ifstrequal?

How can I "demux" several features from a mode specification given in a \foreach? I would like to use a \foreach to draw several nodes in a TikZ picture. The loop will specify a mode for each node, ...
406 views

### Generating adjacency matrices from isomorphic graphs

Here are some isomorphic graphs and their corresponding adjacency matrices. I can draw the graphs with tikz. But I'm not sure the best way to draw the matrices. Is it possible to generate one from ...
628 views

### tikz square box array side by side alignment

I wish to draw square box array side by side, but my code below still has gap between square box. My math is wrong? \documentclass[border=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes....
255 views

### Automated matrix padding in tikz

I encounter an error with the following code : \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning,shapes.multipart, fit,backgrounds,calc} \begin{document} \node[matrix, column ...
82 views

### Populating a tikz matrix with complex content

I am trying to populate a tikz matrix dynamically using foreach to loop over a list-argument and breaking it further apart using xstring operations. I am hitting an issue where, as far as I can tell, ...
170 views

### Go through a list of numbers in an argument of a macro

I would like to write a macro background which takes 2 arguments and each argument can contain a list of numbers separated by ,, such that the following code draws two boxes with borders inside. \...