TransWikia.com

Making x-saved tikz pictures less color blind

TeX - LaTeX Asked by user238301 on May 6, 2021

xsavebox has the ability to color saved boxes according to the ambient text. tikzpictures have the same ability. However, the combination of these does not seem to have this ability.

documentclass{article}
usepackage{tikz}
usepackage{xsavebox}
begin{xlrbox*}{SavedPar}%
boxed paragraph 
end{xlrbox*}
newcommandTestTikZ{begin{tikzpicture}
draw circle[radius=1cm];
end{tikzpicture}}
begin{xlrbox*}{SavedTikZ}%
TestTikZ
end{xlrbox*}

begin{document}
test, theSavedPar, TestTikZ, theSavedTikZ

vskip1cm
textcolor{red}{test, theSavedPar, TestTikZ, theSavedTikZ}
end{document}

enter image description here

As you can see, the circle on the bottom left is not colored even though the tikzpicture from the macro and the saved text box are.

The question is whether one can make the saved tikzpicture also become color sensitive.

P.S. I experimented with this thread, but could not make this work either.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP