I created some style files for standalone pictures. However, I get unwanted horizontal space.
Here is my first MWE1:
\documentclass[convert={true,convertexe={magick.exe},
command=\unexpanded{{\convertexe\space -density \density\space \infile\space \ifx\size\empty\else -resize \size\fi\space \outfile}}}]{standalone}
\RequirePackage{forest}
\begin{document}
\begin{forest}
[ 2 [1] [3]]
\end{forest}
\end{document}
The result is:
However, I want to change my transparent background. Here is MWE2:
\documentclass[convert={true,convertexe={magick.exe},
command=\unexpanded{{\convertexe\space -density \density\space \infile\space \ifx\size\empty\else -resize \size\fi\space -transparent white'rgb(100,200,100)' \outfile}}}]{standalone}
\RequirePackage{forest}
\RequirePackage{xcolor}
\begin{document}
\definecolor{tr}{RGB}{100,200,100}
\pagecolor{tr}
\begin{forest}
[ 2 [1] [3]]
\end{forest}
\end{document}
The result is:
Notice the extra horizontal space before the tree. This is just a MWE, so it is not a lot. However, with bigger trees, the space gets bigger:
Does anyone have an idea to get rid of this?
\definecolor{tr}{RGB}{100,200,100}%
and\pagecolor{tr}%
. You may also just move\begin{document}
after\pagecolor{tr}
.\documentclass{article} \usepackage{forest} \begin{document} \begin{forest} for tree={circle,draw} [1[2[3][4]][5]] \end{forest} \end{document}
? Do you get an error?dimension too large
.