# Can I put a line break in \pgftext?

Simple question: I'm making a picture with PGF (basic layer, not TikZ) and I would like to add some text using \pgftext. The problem is that any \\ or \newline line breaks within the text are apparently ignored. Is there some way I can force a line break to appear?

\documentclass{minimal}
\usepackage{pgf}

\begin{document}
\begin{pgfpicture}
\pgftext{can haz line \\ break plz?}
\pgftext[y = -20pt]{i made u a line \newline break but tex eated it}
\end{pgfpicture}
\end{document}


This is not mentioned in the manual at all, and the only other discussion I can find is this post from comp.tex.pgf.user which doesn't actually include a solution, only the workaround of using a TikZ node with [align=...]. But, mostly for curiosity's sake, suppose using TikZ is off the table. Is it still possible to do line breaks? (I would think so, since TikZ itself must do it somehow)

-
could you put it in a tabular environment? something like \begin{tabular}{c}i made u a line \\ break but tex eated it\end{tabular}... –  cmhughes Apr 29 '12 at 9:03
Or you could just wrap it in \shortstack{...} if it's not too complex. TikZ itself used a minipage, I think. –  Jake Apr 29 '12 at 9:05

egreg's solution or perhaps a minipage

\pgftext[y=-20pt]{\begin{minipage}{5cm}can haz line \\ break plz?\end{minipage}}

-

Just a guess: \pgftext works with \hbox. So the answer might be

\pgftext{\vbox{\hbox{can haz line}\hbox{break plz?}}}


but probably

\pgftext{\begin{tabular}{@{}l@{}}can haz line\\break plz?\end{tabular}}


is handier (and can be wrapped up in a macro).

-