TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How make paragraph in TikZ. I use \parbox with \node

\node {\parbox[5cm]{text}};

but i need more options, alignment center or left or right, similar to text box. All in TikZ.


share|improve this question
up vote 7 down vote accepted

There are some differences between TikZ versions.

  • With TikZ/pgf 2.10 use the alignment options given by Torbjorn: align=left etc. as options to \node. This doesn't work with TikZ 2.00. Example:

    \node[text width=3cm,align=right] {your text};
  • With TikZ/pgf 2.00 or below use text options to \node such as text centered, text ragged or text badly ragged. Example:

    \tikz \draw (0,0) node[text width=3cm,text ragged] {your text}
  • You may always use the vertical alignment options of \parbox and horizontal alignment declarations within the box.

    Syntax: \parbox[position][height][inner-pos]{width}{text}

    Example: \node{\parbox[t][6cm][c][5cm]{\centering your text}};

share|improve this answer
Thanks! And justify in TikZ/PGF 2.00? And break line with \\? – Regis da Silva Dec 29 '10 at 14:46
@Regis da Silva: option text justified, and just use \\. Example: \node[text width=2cm,text justified] {Test\\text and more text}; – Stefan Kottwitz Dec 29 '10 at 15:12

See section 16.4 in the TikZ manual. For example:

\usepackage{lipsum} % for creating dummy text
  \node [text width=5cm,align=left] {\lipsum[1]};

Other alignment options are center and right (naturally), as well as flush left, flush center and flush right, in which no hyphenation will occur, and justify.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.