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

% 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
    \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}
      1[as=\ItemI] -> {
        11[as=\ItemII] -> {
        12[as=\ItemV] -> {

graph non-centered and cropped I checked multiple comparable issues (e.g. 1, 2, 3) but could not find a solution.

  • 1
    The problem is, that you say \tikz[tree layout,..... Delete that \tikz – cis Sep 25 '20 at 17:54
  • If I leave that out, then the tree layout of course also vanishes but I would like to keep it. – Porst Sep 29 '20 at 12:18
  • I don't understand: \tikz[...] is something like a synonym to \begin{tikzpicture}[...]. You use both of them; and you use \tikz inside \begin{tikzpicture}, that's rarely a good idea; and here it is wrong. – cis Sep 30 '20 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.