This code
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[text width = 3cm]{
a a a a a a a a a a a a a a a a a a a a\\
\tikz{\draw (0,0) node {A} -- (1,0) node {B};}\hspace*{10cm}\\
a a a a a a a a a a a a a a a a a a a a
};
\end{tikzpicture}
\end{document}
gives this result:
It places the line between A and B on the right of B and not between A and B. Somehow specifying text width in the outer node confuses TikZ when it places the inner line. How can I make it act normally such that the line is between A and B where it should be?




tikzpictures won't always work, so in general it would be better to avoid it if possible. And an unrelated comment: Why should the minimal class be avoided? – Torbjørn T. Aug 23 '17 at 12:51