3

MWE:

\documentclass[12pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T2A]{fontenc}
\usepackage{tikz}
\usetikzlibrary{shapes, positioning, decorations.pathreplacing, calc}
\begin{document}
\begin{tikzpicture}
  \tikzset{
    node/.style={draw, rectangle, rounded corners},
  }
  \node [node] (1) {hotels\_options};

\node [node, right = 4cm of 1] (2) {hotels_groups};

\draw (2.south) to[out=200,in=-20] (1.south);

\end{tikzpicture} \end{document}

Output:

enter image description here

How to add a text below the center of the curvature?

enter image description here

Torbjørn T.
  • 206,688
user4035
  • 5,035
  • 6
  • 40
  • 57
  • https://tex.stackexchange.com/questions/39793/using-midway-to-label-a-curved-path-at-its-centre answers your question I believe. – Torbjørn T. Aug 05 '20 at 10:40

2 Answers2

2

enter image description here

\documentclass[12pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T2A]{fontenc}
\usepackage{tikz}
\usetikzlibrary{shapes, positioning, decorations.pathreplacing, calc}
\begin{document}
\begin{tikzpicture}
  \tikzset{
    node/.style={draw, rectangle, rounded corners},
  }
  \node [node] (1) {hotels\_options};

\node [node, right = 4cm of 1] (2) {hotels_groups};

\draw (2.south) to[out=200,in=-20] nodemidway,below,sloped{relation description}(1.south);

\end{tikzpicture} \end{document}

js bibra
  • 21,280
1

You may like:

\documentclass[tikz, 12pt, margin=3mm]{standalone}
\usetikzlibrary{decorations.text,
                positioning}

\begin{document} \begin{tikzpicture}[ node distance = 0mm and 40mm, box/.style = {draw, rectangle, rounded corners}, ] \node (n1) [box] {hotels_options}; \node (n2) [box, right=of n1] {hotels_groups}; \draw [postaction={decorate}, decoration={text along path, raise=-2ex, text align={center}, text={relation description}} ] (n1.south) to[bend right=30] (n2.south); \end{tikzpicture} \end{document}

enter image description here

Zarko
  • 296,517