# Tag Info

2

I guess that you looking for something like this: With your code you can obtain similar result if define edge nodes style as [fill=white, anchor=center] and remove option auto from tikzpicture's options. *Off-topic: I would use quotes library for edge labels, define edge quotes as: every edge quotes/.style = {fill=white, inner sep=2pt, font=\footnotesize, ...

1

If I understood correctly, you want to build a table of square boxes 1 cm wide and separated from each other by 1 cm. You can use nodes with a minimum size of 1cm, with the draw option which by default draws their outline as a rectangle, here a square. \documentclass[tikz,border=5mm]{standalone} \begin{document} \begin{tikzpicture}[font=\tiny] \...

11

You need first to calculate value of the \x+1+5*\y and than use result as content of the node: \documentclass[tikz, margin=3mm]{standalone} \begin{document} \begin{tikzpicture} \foreach \x in {0,...,4} \foreach \y in {0,...,4} \pgfmathtruncatemacro{\xy}{\x+1+5*\y} % macro which calculate value of \x+1+5*\y \draw (\x*8-1,\y*8+1) ...

4

You're overcomplicating a bit, you just need |[draw=red, rectangle]| in the cell. \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{shapes} \begin{document} \begin{figure} \begin{tikzcd}[cells={nodes={draw=black, ellipse,anchor=center,minimum height=2em}}] 0 \arrow[r] & 1 \arrow[r] & |[draw=none]|\dots \arrow[r] &...

Top 50 recent answers are included