# How to indent a paragraph inside a TikZ node?

How do I get paragraphs inside a node to indent?

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[draw,text width=9cm] {
indent in paragraph long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text.

indent in paragraph long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text.
};
\end{tikzpicture}
\end{document}

-

The easiest way is to put a minipage environment within the node, and to set \parindent to whatever indent width you want:

\begin{tikzpicture}
\node[draw,text width=9cm] {
\begin{minipage}{9cm}
\parindent=3em
indent in paragraph long text long text long text...

indent in paragraph long text long text long text ...
\end{minipage}
};
\end{tikzpicture}


If you leave out the minipage, then your first paragraph will not be indented. You could force the indent by saying \indent before the first line:

\node[draw,text width=9cm] {
\parindent=3em
\indent indent in paragraph long text long text long text...
};


which would also work. The second way is probably more efficient for TeX (one fewer minipage to compute), but the first may be somewhat more robust.

-
Or a more latex-y way: \setlength{\parindent}{3em}. In the second solution, only the first paragraph needs the \indent command. – Alan Munn Jul 9 '11 at 3:31
thank you for all. – Regis da Silva Jul 9 '11 at 3:54