There is a problem with using the standalone output and plotting a simple tree graph with Tikz. The image is neither correctly centralize nor cropped. I added a huge border to show at least something.
See my minimal working example and the output I get with LuaTeX, Version 1.10.0 (TeX Live 2019).
% Preamble
\documentclass[tikz, border=5cm]{standalone}
% Packages
\usepackage{tikz}
\usetikzlibrary{graphdrawing,graphs}
\usegdlibrary{trees}
% definitions of entries here
\def\ItemI{Lorem ipsum\lorem ipsum\lorem ipsum}
\def\ItemII{Lorem ipsum}
\def\ItemIII{Lorem ipsum}
\def\ItemIV{Lorem ipsum}
\def\ItemV{Lorem ipsum}
\def\ItemVI{Lorem ipsum}
\def\ItemVII{Lorem ipsum}
% Document
\begin{document}
\begin{tikzpicture}
\tikz[tree layout,
% specifying the text width in nodes fails
nodes={fill=blue!20, align=center},
% specifying the text width in child node has no effect
% every child node/.style={minimum height=1.8cm,text width=2.5cm}
]
\graph[]{
1[as=\ItemI] -> {
11[as=\ItemII] -> {
111[as=\ItemIII],
112[as=\ItemIV],
},
12[as=\ItemV] -> {
121[as=\ItemVI],
},
13[as=\ItemVII],
},
};
\end{tikzpicture}
\end{document}
I checked multiple comparable issues (e.g. 1, 2, 3) but could not find a solution.
\tikz[tree layout,..... Delete that\tikz– cis Sep 25 '20 at 17:54\tikz[...]is something like a synonym to\begin{tikzpicture}[...]. You use both of them; and you use\tikzinside\begin{tikzpicture}, that's rarely a good idea; and here it is wrong. – cis Sep 30 '20 at 20:00tree layout, ...options do need to be supplied, but should be directly given as optional arguments of thetikzpictureenvironment. You need to supply them as\begin{tikzpicture}[tree layout, ..., the extra\tikzin there is, as cis says, is starting an additional TikZ picture which is messing up something. – Dai Bowen Jun 29 '23 at 13:46