Questions tagged [tikz-node]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
679 views

Problem with node shape (diamond)

I am drawing a flow chart. Diamond-shaped nodes don't come out right. My minimal working example is below. There are no problems with ShareLaTeX, but it doesn't work on my computer. \usepackage{tikz} ...
0
votes
2answers
447 views

TIKZ: Layering Text over Text

I'd like to create a box in tikz that contains regular text, and underneath that text, another layer of text. I can create the first layer of regular text, but I'm stumped on how to put the lower ...
6
votes
1answer
371 views

Adding nodes through a TikZ style, using double dash lines ``--``

I'm basically asking this question, because the answer there is not working for the case with -- lines. Say you have a line like so: \draw (0,0) -- (3,3) node[sloped, midway,above]{Hey!}; Then is ...
0
votes
2answers
408 views

TikZ Arrow ignores rotation

I want to illustrate several arrows, each pointing to the previous arrow, except at some point, two arrows should point to the previous arrow and therefore their angle should be +/-45°. Now the ...
1
vote
1answer
194 views

Position a node in line does inside a xshift scope

I would like to position a node at a certain position of a line I drawn. Such line is drawn inside a scope environment with an xshift, that does not affect nodes! A work around is to use the option ...
5
votes
2answers
550 views

Rotate text in TikZ

How do one rotate text inside a diagram as shown below. Below is my MWE modified from here \documentclass[tikz,12pt]{standalone} \usetikzlibrary{calc,positioning,backgrounds,arrows.meta} \usepackage{...
1
vote
2answers
563 views

Two hidden layers with different neoron numbers each layer in neural network diagram with tikz

I am trying with following code. I want to replace Hidden layer 2 with 9 nodes. And want to add text1, text2, and text3 like the following figure. And Finally, I want to replace Input #1 to Input #9 ...
5
votes
1answer
154 views

tikz node does not fit as expected when yscale used in geometry

I am trying to make a rectangular node fit around two other nodes. This works fine as long as I do not set xslantand yscale in the enclosing scope. In the example below, the enclosing node does not ...
1
vote
1answer
87 views

About some tikz styles

I have the following code \documentclass{article} \usepackage[left=0in,top=2in]{geometry} \usepackage{tikz,amsmath} \usetikzlibrary{arrows,shapes} \newcommand{\tikzmarkC}[1]{\tikz[overlay,remember ...
4
votes
2answers
221 views

Tikz Figure with Adjusted Bounding Box Does Not have Correct Spacing

The \DrawBoundingBox macro draws bounding box around a figure with a 1pt border. In the first figure, produced with \MyNode\MyNode, no tweaks are done to tikz's bounding box. Due to the control points ...
6
votes
1answer
293 views

Anchor at the baseline of the last line for a tikz node

I'd like to place a node with multi-line text using as anchor the eastmost point at the baseline of the last line, without having to manually break the lines. Specifying the node text width breaks ...
4
votes
2answers
290 views

Tikz - how can I remove the short vertical lines in a tree

I have the following codes. \documentclass[12pt]{article} \usepackage{qtree} \setlength\parindent{0pt} \usepackage{tikz} \usepackage{tikz-qtree} \usepackage[bottom]{footmisc} \usepackage{times} \...
7
votes
1answer
1k views

Tikz: Placing node midway right or left relative to path

I'd like to place a node at some position along a path, e.g. \tikz (a)node[pos=0.5,left]{x}{b}; But instead of shifting it 'left', 'right', 'above' or 'below' in absolute coordinates, I would like ...
14
votes
4answers
3k views

Placing node right after end of path in Tikz

I'd like to place a label (most of the times a single letter) right after the end of a line. That is, the node should be moved into the direction of the line from its endpoint, just as far that is ...
1
vote
0answers
40 views

Possible bug when using tikz to position node using pos command in curves [duplicate]

Runing this simple code: \documentclass{report} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[-latex] (0,0) to[out=40, in= 140] (5,0) node [pos=0.5] {en}; \end{...
5
votes
1answer
244 views

Adding a circle boundary in a TikZ matrix

I almost figured out how to draw what I want by piecing together two answers here (@Ignasi for TiKZ matrix of objects and @alexraasch for L shaped boxes in tikz matrix). \documentclass{article} \...
1
vote
3answers
857 views

Changing the distance to my node label

\begin{tikzpicture} \draw[<-] (0,0) -- (1.5,0) node[anchor=south] {3N} -- (3,0) node [anchor=330, node distance=10cm] {$\theta$}; \draw[->] (0,0) -- (0,2) node[anchor=west] {4N} -- (0,4); \...
4
votes
2answers
1k views

Tikz positioning

How do you position a node more precisely than left of, right of? \node[above =3 cm of node1,node distance=3.5cm] (node2){}; For example, how do you say that I want 3mm to the left and 4 mm above a ...
2
votes
1answer
81 views

TikZ, node and expression do not coincide

In this code, related to a previous question, \documentclass[border=2mm,tikz]{standalone} \usetikzlibrary{arrows.meta,calc} \begin{document} \begin{tikzpicture} \draw[->] (-3,0,0) -- (3,0,0) ...
2
votes
1answer
70 views

Tikz Four Groups

I am aiming to make a flow diagram as drawn however I have not been able to add the four boxes and include the top box centered. Also note the top box should be a full box. Please assist if you could! ...
7
votes
5answers
603 views

TikZ: How to position a node relatively to it's edge?

I'm struggling to find a way to position a rectangle A above another one B (e.g., by 2cm) while vertically aligning it's right-end with the center of B. Thanks in advance for your answers. NS
3
votes
4answers
1k views

how to draw multiple pictures in a node

I'm trying to draw a diagram with pictures with TikZ. I know that people can direct use \includegraphics within a node so that the picture will be placed there. My question is, how do I generate a ...
3
votes
2answers
206 views

Using conditionals in tikzset

EDIT Through carelessness, I misrepresented the error that I was getting. I have corrected the example code and my comments. I'd like to be able to setup 1 TikZ node .style altered by conditionals. ...
2
votes
1answer
128 views

Tikz: Failing to create node from coordinates

I'm building a tree graph and started from creating vertices \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \...
3
votes
2answers
193 views

Auto position node to line

I have a problem with moving nodes of my timeline. I want the node to be positioned always like the first one in my example no matter how long the text is. How can I do that? I'm very new to LaTeX so ...
4
votes
1answer
231 views

Apply line spacing to matrix of math nodes in Tikz

I want to make a matrix of math nodes using Tikz. Some entries in the matrix are very long and I want to introduce line spacing to align them in the same row as the following inputs. However, when I ...
3
votes
3answers
334 views

tikz: Labeled line aligned with node position

I am not sure how to create a axis with a labeling and some text above the line, aligned to my nodes. (for details see desired result below). Desired result: (Ignore colors and size of nodes) ...
1
vote
2answers
468 views

TikZ: put caption into a node

I would like to put the caption of my figure into my node, something like \usepackage{tikz} \usepackage{subcaption} \begin{figure} \begin{subfigure}[t]{\textwidth} \begin{tikzpicture} ...
3
votes
1answer
337 views

Why does this arrow render back to front?

MWE: % !TEX program = xelatex \documentclass{book} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{calc} \pgfdeclarelayer{bg} \pgfsetlayers{bg,main} \begin{document} \begin{...
2
votes
1answer
74 views

Routing node connectors with rounded corners

Is there a sensible way to achieve node connectors that look like this: I can achieve the first part of the curve as follows: % !TEX program = xelatex \documentclass{book} \usepackage{tikz} \...
3
votes
1answer
43 views

Right-aligning TikZ nodes - bug?

I've just wasted over an hour trying to figure out why vertically-stacked nodes weren't right-aligning as I'd expect. Turns out, simply changing the order of the anchor and below attributes is enough ...
0
votes
0answers
32 views

Accurately right-aligning text of wildly varying font sizes [duplicate]

I'm trying to right-align pieces of text in separate TikZ nodes. One piece of text is alphabetical and the other is numerical. The numerical text is much larger than the alphabetical text, and I'm ...
1
vote
3answers
224 views

Why isn't my node aligning to page text area correctly?

Here is a MWE: \documentclass[fontsize=11pt,pagesize=auto,hidelinks,cleardoublepage=empty,parskip]{scrbook} \usepackage[paperheight=10in,paperwidth=8in,margin=2cm,heightrounded,bindingoffset=5mm,...
1
vote
2answers
65 views

Drawing outside footer area

I've been working on a footer that renders the page number inside a tikz node. A MWE is: \documentclass[fontsize=11pt,pagesize=auto,hidelinks,cleardoublepage=empty,parskip]{scrbook} \usepackage[...
8
votes
1answer
1k views

Move an inline tikz node vertically to align with baseline of surrounding text

I'm trying to incorporate tikz nodes within running text, but have them align nicely with the text surrounding them. My MWE is: % !TEX program = xelatex \documentclass{scrbook} \usepackage{tikz} \...
5
votes
3answers
557 views

Matrix of nodes - adjusting the lines

After read some examples of matrix of nodes, i wrote this MWE: \documentclass{article} \usepackage{tikz}\usetikzlibrary{matrix} \usepackage{booktabs} \begin{document} See the Table \ref{fig:cen2}....
3
votes
1answer
380 views

Pure braid generators with vertical strands

I've been using the braids package (https://www.ctan.org/pkg/braids) to draw braids. In general, it works fine for me, but when it comes to braid combing and other uses of pure braids, I would like to ...
0
votes
1answer
169 views

How can I put text in column form inside node of a Tree using TikZ Picture

Hi pretend make a simple tree with TikZ, where each node has a simple math text with several lines, in columns. Here my LaTex but I don't know why each line of the text doesn't put one under the ...
0
votes
0answers
238 views

How to align arrows with the center of nodes in tikz? [duplicate]

I have the following tikz picture in my tex document: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,arrows.meta,shapes.misc} \usepackage{xifthen} \begin{document} \begin{center} \...
1
vote
3answers
2k views

Text on arrow: sloped text on arrow with corner

Total beginner here, and trying to figure out tikz. When I have a construct like this: \draw [arrow] (node1) node[sloped] {Some text} |- (node2); I end up with something line this (Sorry for the ...
1
vote
3answers
129 views

TikZ node too tall

I want to be able to "gray" out sections of my beamer lectures (based on some expiration time predicate). With some very useful help from this forum I'm almost there. My solution is to define a new "...
2
votes
1answer
551 views

How to increase the canvas of a tikzpicture without scaling plot?

This is my first post, sorry for any mistake :D. I have this code using TeXnicCenter program, and LaTeX-> PS-> PDF mode: \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis}[...
4
votes
1answer
210 views

TikZ Calendar - lines under day nodes

I have modified code given by cfr in the answer to this question about current day nodes. I want different colored (green and red) lines at the bottom and left of each day. However, for the single ...
2
votes
1answer
3k views

Using RGB or HTML color model in Tikz nodes

In PGF manual almost in all examples red!50!white this type of syntax is used, however I find it very difficult to write it in this syntax to get desired color. Tikz uses xcolor package for coloring ...
2
votes
2answers
433 views

Flip node without flipping text

I am trying to flip a node without flipping text inside. I tried using \rotatebox, but it won't help in flipping. Is there any way to do so? I have attached minimal code example below. \begin{...
1
vote
2answers
757 views

The simplest way to fill a matrix of nodes?

Code: \tikzstyle{matrici}=[ matrix of math nodes, nodes in empty cells, column sep=-\pgflinewidth, % to avoid double borders in contiguous cells nodes={ ...
1
vote
3answers
258 views

Tikz node text misplaced

I am trying to create a box of fixed size with some text in the center using tikz, but I am having some problems positioning text. I compile the following code: \begin{tikzpicture} \draw (0,0) ...
2
votes
3answers
643 views

Matrix draw with tikzpicture

I have this code \tikzstyle{matrici}=[ matrix of math nodes, nodes in empty cells, nodes={draw=gray, align=center, inner sep=0pt, text width=1cm, minimum height=1cm}] \begin{tikzpicture} \...
0
votes
1answer
438 views

Tikz - Dynamic Node Naming

I need to dynamically create the ids of the nodes in TiKz with a counter, so that I can position the new nodes in terms of the previous ones. The counter is created as follows and gets increased for ...
3
votes
1answer
671 views

Aligning of nodes in tikz

The second, third and fourth formulæ should be on the right side of the point like the formula in the first line. MWE \documentclass{scrartcl} \usepackage{amsmath} \usepackage{tikz} \begin{document}...

1
3 4
5
6 7