1

One forest in my document produces some weird problems. This is the problematic excerpt:

\documentclass{article}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{forest}

\everymath{\displaystyle}
\begin{document}

\pagenumbering{arabic}

\section{}
\begin{center}
    \begin{forest}
        for tree={circle, draw}
        [+
            [+
                [12]
                [/]
            ]
            [0]
        ]
    \end{forest}
\end{center}

\end{document}

The code will produce this error:

! Dimension too large.
<recently read> \pgf@x 
                       
l.23    \end{forest}

If I remove the circle from for tree={circle, draw} line it will work. If I replace the inner plus sign with something else, it works, too. And if I replace the slash with something else, it works, too.

1
  • Welcome to TeX.SE!
    – Mensch
    Commented Oct 17, 2021 at 20:02

1 Answer 1

0

Is it what You want?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[edges]{forest}

\begin{document}
    \begin{forest}
    for tree={circle, draw, 
        minimum size=1.5em, 
        inner sep=1pt}      
    [+
    [+
    [12]
    [/]]
    [0]]
    \end{forest}
\end{document}

enter image description here

1
  • Yes, thats exactly what I needed. Thank you so much! @WinnieNotThePooh
    – bdkNic21
    Commented Oct 17, 2021 at 20:33

You must log in to answer this question.

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