15

You just need to fix a minimum size large enough, but applied to state, not to the tikzpicutre: state/.style={circle, draw, minimum size=2cm} The symmetry can be obtained changing the drawing order: \documentclass{article} \usepackage{tikz} \usetikzlibrary{automata,arrows,calc,positioning} \begin{document} \begin{figure}%[H] \centering \...


15

Each "blob" can be drawn using a technique taken from this answer, but modified to use Hobby package which produces smoother results. In the next example I define a pic which draws one of these "blobs". Being a pic is very easy to rotate, scale and translate the shape, so I draw 35 of them in a regular grid. Instead of a regular grid you can use the random ...


14

You can put the node at pos=1 and then left (or right, depending on where) align it: \documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[every node/.style={draw=red}, ] \draw (0,0) -- (1,0) node[right]{a} ; \draw (1,0.5) --node[pos=1, left]{b} (0,0.5) ; \draw (0,-1) -- node[pos=1, ...


11

Here is a modification of that code where you set the number of hidden layers in a macro, and the rest is done automatically. \documentclass{article} \usepackage{tikz} \begin{document} \pagestyle{empty} \def\layersep{1.5cm} \begin{tikzpicture}[ shorten >=1pt,->, draw=black!50, node distance=\layersep, every pin edge/.style={<-,...


11

One can get somewhat close using the decorations.markings library. The code below makes use of the fact that a markings decoration has an internal coordinate system where the x-axis is parallel to the path, so I made a short path along the y-axis, and placed an auto node along it. It's not perfect, and I can't guarantee that it will always work. For the ...


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) ...


10

Apparently the inner tikz inherits the text width setting. It is visible if you draw the nodes: The line goes from the center of node A to the center of node B, but the nodes are so wide that the text of node B ends up being left of the line. If you reset the text width option, you recover the expected behavior. \documentclass{minimal} \usepackage{tikz} \...


10

\documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning, shapes.multipart} \begin{document} \begin{tikzpicture} \node[rectangle split, rectangle split parts=3, rectangle split horizontal, draw]{\nodepart{two}ReadInput}; \end{tikzpicture} \end{document} Update: Following code shows an improved version of previous code. It shows font and ...


9

As Torbjørn says in the comment, nesting tikzpictures doesn't work well. Here's an alternative using the \subnode command from the tikzmark package (which was designed precisely for this sort of thing). \documentclass{article} %\url{https://tex.stackexchange.com/q/387792/86} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document} \begin{tikzpicture} ...


9

This is what the auto option does. By default it places the nodes on the left side of the line, looking along the path. You can move it to the other side by adding the swap option. \documentclass[border = 2mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ every node/.style={inner sep=0pt} % to make it clearer which line the nodes ...


9

as i mentioned, merging bot tikzpictures in one enable better controlling their elements positions: edit: position of braces are corrected acoording to new explanation in question \documentclass[a4paper]{article} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} % tikz library should be here, in preamble \begin{document} \begin{figure}[htb] ...


8

This solution uses a path picture option to fill part of the circle. It doesn't need backgrounds library. The pienode style is defined with 2 arguments, the first defines circle minimum size and the second is the percentage (0 to 100) to be filled. \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning, calc} \begin{document} \begin{...


8

To the upvoters: please don't upvote this very trivial answer! Use \draw[fill=white, thick] instead of the simple \fill[white]. Moreover, you don't need to write the path of your gray area twice, one to fill and one to draw, you can do it with a unique command (I added very thick only to highlight it). As percusse pointed out in his comment, you can use ...


8

(this is the first time I add another answer --- if it's not the correct thing to do, please tell me; but this is so different from my first one that... should I mark it community wiki?) You can use a transform on a decoration, thanks to the fact that the coordinate system in a decoration is along the path; that will shift the node after the end of the ...


8

It is very simple, if you use the coordinate (nodea -| nodeb) you have the y coordinate of nodea and the x coordinate of nodeb. Off-topic: see also Should \tikzset or \tikzstyle be used to define TikZ styles?. \documentclass[tikz]{standalone} \usepackage{mathtools} \usetikzlibrary{shapes,arrows.meta} % Define block styles \tikzset{ ...


8

\documentclass[border = 5pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{positioning} \usetikzlibrary{shadows.blur} \begin{document} \begin{tikzpicture}[ reserv/.style = { draw = #1, fill = #1!50, text = white, rounded corners = 5pt, minimum width = 6cm, minimum height = 1cm, inner sep = 1pt, drop shadow }, ...


7

There is a paragraph indentation. The white space is gone with \noindent: \documentclass[oneside]{scrartcl} \usepackage{tikz} \usepackage[margin=0cm]{geometry} \begin{document} \noindent \tikz \fill[red] (current page.north west) rectangle (current page.south east); \end{document}


7

you can use minimum size=6em \documentclass{article} \usepackage{tikz} \usetikzlibrary{automata,arrows,calc,positioning} \begin{document} \tikzset{bignode/.style={red, draw=blue, fill=yellow!20, minimum size=6em,}} { \centering \begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=2.5cm,scale=1, transform shape,align=center,...


7

The problem is that TikZ uses . to access an anchor of a node, for example a.west. So when you have a node called 2.5g2y, and use that in a \draw, TikZ thinks that is a node called 2, and the anchor would be 5g2y. I don't know if it's possible to use periods in node names, but a workaround is to add a count to your loop, and use that value instead. ...


7

I would make a separate command that scales down oversized inputs. \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric,positioning} \newcommand\MyTextScale[2][20mm]{% \sbox0{#2}% \ifdim\wd0>#1 \resizebox{#1}{!}{#2}% \else #2% \fi} \begin{document} \begin{tikzpicture}[ MyTriangle/.style={% ...


7

i would set table on different way ... use standard tabularx table environment for vertical dashed lines use tikzmark library align cells content on top use raged2e package for nicer align text in cells use booktabs for horizontal rules, from whic i would use only three use makecell for column headers and "labels" at bottom of table considering above the ...


7

in year 2010 Mark Wibrow suggested me (for the similar problem) the hack which enable correct dropping show at custom fill of multi part node shape. using it in your (now really) mwe is: \documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{positioning, shadows, shapes.multipart} \pgfdeclarelayer{foreground} \...


7

Maybe the contour package is a solution for you (See also this answer)? \documentclass[tikz, border=2mm]{standalone} \usepackage[outline]{contour} \contourlength{2pt} % increase the white space \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \draw [step=.25] (-2,-.5) grid (2,.5); \node[] at (0,0) {\contour{white}{$|z|^{1/3}e^{i(\theta+2\...


7

The problem is minimum width which has the value 1pt (the documentation seems to be wrong here). Probably tikzmark should better set it to 0pt in the \tikzmarknode, make a bug report. \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \tikzset{every tikzmarknode/.style={minimum width=0pt}} \begin{document} \pgfkeysvalueof{/pgf/minimum ...


7

Combining minimum width with single arrow head extend seems buggy. Use inner sep instead to define the inner width: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.arrows} \begin{document} \begin{tikzpicture} \node [single arrow,draw,inner sep=1cm,minimum height=4cm, single arrow head extend=0.8cm,anchor=west] (a) {}; \draw[|<-...


6

Not exactly the same syntax, but you could potentially use a label instead of the node itself. Whether this is a viable method depends on your actual use though. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} %\usepackage[german]{babel} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node at (0,0) [draw,minimum height=1cm,minimum ...


6

You can use xshift: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[mybox/.style={rectangle, draw, minimum width=10mm, minimum height=10mm}] \foreach \addr/\val [count=\x] in {$0$,$1$/$28$,$6$/$\infty$,$6$/$\infty$,$6$/$25$,$0$,$6$/$\infty$} { \node (node\x) [mybox] at (\x,0) {\addr}; \node[above=5mm] ...


Only top voted, non community-wiki answers of a minimum length are eligible