#node positioning in tcolorbox

1 messages · Page 1 of 1 (latest)

elfin driftBOT
#

🫶
Compile Error! Click the errors reaction for more information.
(You may edit your message to recompile.)

main remnant
#

Hi @narrow wedge, I think you can try positioning library from TikZ

#
\tcbset{frogbox/.style = {
        enhanced,
        enlarge top by = 3em,
        overlay = {\node[anchor = west, yshift=1.5em] at (frame.north west){\includegraphics[width=3em]{leo.png}};}
    }
}

\begin{tcolorbox}[frogbox]
    Hello, Leo!
\end{tcolorbox}
elfin driftBOT
main remnant
#

and then in your node options use yshift to shift it up

#

I found that the enlarge top by value should equal the size of the image, and the yshift should be half of that value

#

For it to look reasonable