Skip to content

\forestmathsetlength looses sign if length starts with a zero #8

@u-fischer

Description

@u-fischer

In the following example, -0.5mm gives a positive length. If one force forest to use the pgf commands with \forestmathsetlength \blub {-0.5mm+0cm} then the value is correct again.

\documentclass{article}
\usepackage{forest}
\begin{document}
\newlength\blub
\forestmathsetlength \blub {-5mm} 
\showthe\blub %negative

\forestmathsetlength \blub {-0.5mm} 
\showthe\blub %positive
\end{document}
> -14.22636pt.
l.226 \showthe\blub
                    %negative
? 
> 1.42262pt.
l.230 \showthe\blub
                    %positive

The problem is imho that forest is storing the integer part in a count, and if the value is zero the sign is lost (-1.5mm would work fine).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions