Menu

#403 First line of centered node left aligned with \newline

v1.0 (example)
open
nobody
None
5
2016-10-02
2016-10-02
Torbjorn
No

I don't know if this can be counted as a bug, because I don't know if it's supposed to work in the first place.

Anyway, consider the code below. In the first case both the a and b are centered, whereas in the second case, with \newline, the a is left aligned.

(Up to date TeX Live 2016.)

\documentclass[border=4mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node [align=center,text width=3cm,draw] {a \\ b};
\node [align=center,text width=3cm,draw] at (0,-1) {a \newline b};
\end{tikzpicture}

\end{document}
1 Attachments

Discussion