TransWikia.com

In powerdot changed colors are always active and do not take the iacolor when they are inactive

TeX - LaTeX Asked by virgil on May 9, 2021

In the following example you see a listing with itemize type 1. The changed color in the text (red) and the changed color of the items (orange) do not take the iacolor when they are inactive.

How can I give to the inactive changed colors also the color of iacolor when they are not active?

documentclass{powerdot}
usepackage[utf8]{inputenc}

renewcommand{labelitemi}{color{orange}ensuremathbullet}
renewcommand{labelitemii}{color{orange}ensuremathbullet}
renewcommand{labelitemiii}{color{orange}ensuremathbullet}
renewcommand{labelitemiv}{color{orange}ensuremathbullet}

begin{document}
begin{slide}{titletxt}
begin{itemize}[type=1]
item<1-> txt A
item<2-> txt B1 {color{red}{txt B2}} txt B3
item<3-> txt C {color{red}{txt C2}} txt B3
item<4-> txt D
end{itemize}
end{slide}
end{document}

One Answer

A possible solution is to define a command to switch the color only on the specified overlay, print the text on every overlay, and switch the color back on the specified overlay.

MWE:

documentclass{powerdot}
renewcommand{labelitemi}{color{orange}ensuremathbullet}

newcommand{clactive}[3]{%
onslide*{#1}{color{#2}}%
#3 %
onslide*{#1}{color{pdcolor1}}%
}

begin{document}
begin{slide}{titletxt}
begin{itemize}[type=1]
item<1-> txt A
item<2-> txt B1 clactive{2-}{red}{txt B2} txt B3
item<3-> txt C clactive{3-}{red}{txt C2} txt C3
item<4-> txt D
end{itemize}
end{slide}
end{document}

Result:

enter image description here

Answered by Marijn on May 9, 2021

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