How do I get the text does not break the line? I have

\node[align=left,text width=3cm] {Contemplando a contemporaneidade};

enter image description here

but i need

enter image description here

  • 3
    Is there a reason why you can't just increase the text width? (By the way, your example code does not break the line if I put it into a article or minimal document. Do you set anything that influences the font size?)
    – Jake
    Commented Mar 25, 2011 at 22:41

4 Answers 4


Or don't specify the text width at all, just add a line break at the appropriate position.

\node[align=left] {Contemplando a\\contemporaneidade};

Instead of using align=left, you can use align=flush left. This seems to do exactly the same as align=left, but without the hyphenation.

\node[align=flush left,text width=3cm] {Contemplando a contemporaneidade};

I found this trick here: Manual/automatic line breaks and text alignment in TikZ nodes

  • Also works with align=flush center and align=flush right
    – David M.
    Commented Mar 2, 2021 at 21:48

Increase the value for text width conveniently.


We could use \hyphenchar\font as a global switcher; =1 turning on hyphenation, =-1 preventing hyphenation.

\node[align=left,text width=2cm,draw] {Contemplando a contemporaneidade};
\node[align=left,text width=2cm,draw] {%
  \hyphenchar\font=-1 % 1 or -1
  Contemplando a contemporaneidade
\hyphenchar\font=1 % 1 or -1
Regular document. Regular document. Regular document. Regular document. Regular document. Regular document. Regular document. 


  • Is the \hyphenchar\font=1 necessary to restore hyphenation, or is the \hyphenchar\font=1 actually localized? I ask because you called it a global switcher. At first glance, it seems to me that it would be a change valid only within the tikzpicture's scope. Commented Jan 14, 2016 at 14:36
  • @macmadness86 I am not 100% sure, but I think that I tried % \hyphenchar\font=1 and it wasn't working well. I am not TeXing these days, so I cannot try more experiments, I am sorry about that.
    – Malipivo
    Commented Jan 21, 2016 at 21:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .