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

I am drawing a diagram with tikzpicture. The main idea is to draw several boxes of texts framed, and link them with lines...

What I know is using \filldraw to draw boxes, \node to write one line of text, and \draw to make a line. But I have to adjust every coordinator of every element... So my question is:

1) Is it possible to write a text of several lines?

2) Is it possible to frame a text of serveral lines?

Could anyone help? Thank you very much!

share|improve this question
up vote 4 down vote accepted

A \node can contain several lines of text; you can use the align= key and manually change lines with \\, or you can specify a width for the text:



  \node[draw,align=center] (A) at (0,0) {some\\ text \\ spanning \\ several \\ lines};
  \node[draw,align=center,text width=1.5cm] at (3,0) {some text spanning several lines};


enter image description here

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.