Linked Questions

15
votes
5answers
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 ...
8
votes
4answers
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. ...
16
votes
1answer
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{...
7
votes
3answers
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 ...
4
votes
5answers
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, ...
6
votes
3answers
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, ...
4
votes
2answers
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 ...
3
votes
2answers
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....
1
vote
2answers
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 ...
1
vote
1answer
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, ...
3
votes
1answer
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. \...
0
votes
1answer
128 views

Matrix node inside foreach loop give error when multiple columns

This question is different from \foreach inside \matrix questions 1 and 2. I was trying to do this question 3dmatrix. The \matrix command, when put inside \foreach gives the following error when ...
1
vote
1answer
76 views

TikZ-matrix: Generating a table from two nested foreach loops

For the following MWE, I would like to know how I can reduce the code by having two nested for loops. \documentclass[border=10mm]{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{...