# How do I split the text into two lines when using ncangle and ncput?

How do I split text into two lines in an arc?

\documentclass[pstricks,border=10mm]{standalone}
\usepackage{pst-node}
\begin{document}
\begin{pspicture}[showgrid](10,6)
\rput(2,1){\Rnode{r1}{}}
\rput(2,5){\Rnode{r2}{}}
\ncangle[angleA=180, angleB=180, arm=1, linearc=0.5, arrows=->]{r1}{r2}\ncput*{\small test, test2}
\end{pspicture}
\end{document}


I have two rnodes and connect them with an ncangle and with \ncput i put a text in the arc. Here it prints test, test2 but i would like to have two lines, such test is in line 1 and test2 in a second line directly under test.

\documentclass{article}
\usepackage{pst-node}
\begin{document}
\begin{pspicture}[showgrid](4,6)
\pnodes(2,1){r1}(2,5){r2}
\ncangle[angleA=180,angleB=180,arm=1,linearc=0.5,arrows=->]{r1}{r2}
\ncput*{\small\shortstack{t1\\test2}}
\end{pspicture}
\end{document}


Something like this?

\documentclass{article}
\usepackage{pst-node} % Thanks to ArtificialStupidity
\begin{document}
\begin{pspicture}[showgrid](10,6)
\rput(2,1){\Rnode{r1}{}}
\rput(2,5){\Rnode{r2}{}}
\ncangle[angleA=180, angleB=180, arm=1, linearc=0.5,
arrows=->]{r1}{r2}\ncput*{\small\begin{tabular}{c}
test\\ test2
\end{tabular}}
\end{pspicture}
\end{document}


The nice thing about pstricks and other packages like asymptote and tikz is that you can use all the LaTeX commands for annotations and so on.

• You don't need to load all packages, pst-node is enough in this case. – Money Oriented Programmer Dec 11 '17 at 23:35
• @ArtificialStupidity You're right. – user121799 Dec 11 '17 at 23:46