tikz add tag
J...S
I got a tikz picture made using the automata library like this:

![n4-orig.png](/image?hash=9b4a6134081da1056f21c6830b88b357b5a59d2e4fda0f4cc733c76c091caa65)

There is a arrow from node `A` to node `B`.

Is there a way to make the arrow go 'upwards' a bit more and then come
back?

The above example was made with this snippet:


```tex
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{positioning}
\begin{document}

\begin{tikzpicture}

  \node[initial, state] (a) {A};
  \node[accepting, state, right=of a] (b) {B};

  \draw (a) [out=90,in=70] edge[bend left, looseness=1.2] node[below] {$\varepsilon$} (b);

\end{tikzpicture}

\end{document}
```

I wanted to make this something like:

![n4-mod.png](/image?hash=a8097973480a202a706a129b8de159ff8402fcc600e8dd9986cd3aa9a883ebae)

I tried

```
\draw (a) [out=90,in=70] edge[bend left, looseness=1.2] node[below] {$\varepsilon$} (b);
```

but the arrow still wasn't going 'upwards'.
Top Answer
samcarter
Instead of going out radially, you could start at a specific position on the node rim and define the direction of your line from there:


```
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{positioning}
\begin{document}

\begin{tikzpicture}

  \node[initial, state] (a) {A};
  \node[accepting, state, right=of a] (b) {B};

  \draw (a.50) edge [out=70,in=110,looseness=2] node[below] {$\varepsilon$} (b.130);

\end{tikzpicture}

\end{document}
```

![Screenshot 2025-01-22 at 13.55.34.png](/image?hash=cf7a356f8a8822f38a461f473f4394f67f23b9fa767ead3159dda8117704ad0b)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.