[Tex/LaTex] the text after \onslide is transparent after setting \setbeamercovered{transparent}

beamertransparent

I am learning \onslide. I copied the example from the beameruserguide. The last text "Shown on all slides" is transparent after setting \setbeamercovered{transparent}. I don't know why. Could anyone answer this question for me? Thank you.

\documentclass{beamer}
\setbeamercovered{transparent}
\begin{document}
\begin{frame}
Shown on first slide.
\onslide<2-3>
Shown on second and third slide.
\begin{itemize}
\item
Still shown on the second and third slide.
\onslide+<4->
\item
Shown from slide 4 on.
\end{itemize}
Shown from slide 4 on.
\onslide
Shown on all slides.
\end{frame}

\end{document}

1st slide
2nd slide
3rd slide
4th slide
I think the text "Shown on all slides" should not be transparent on all slides. If I comment \setbeamercovered{transparent} out, it is not transparent any more. Can anynone tell me the reason.

Best Answer

beamer redefines in beamerbasecolor the \reset@color command to allow some color setting to survive grouping. Most importantly it inserts the line

 \pgfsys@color@unstacked{beamer@tempcolor}%

In pdflatex \pgfsys@color@unstacked is defined (in the pgf driver pgfsys-pdftex.def) as

\def\pgfsys@color@unstacked#1{%
    \pdfliteral{\csname\string\color@#1\endcsname}%
}

In the xetex driver of pgf it not defined, so the empty fallback definition is used.

This command is responsable to reset the color after a group:

\documentclass{beamer}
\setbeamercovered{transparent}
\setbeamertemplate{navigation symbols}{}
\makeatletter
% \pgfsys@color@unstacked definition in pdflatex: 
% \pdfliteral {\csname \string \color@ #1\endcsname }
% in xelatex: {}
\def\pgfsys@color@unstacked#1{} %now it fails with pdflatex too

\begin{document}
\begin{frame}[plain]
1A
\onslide<1>
\begingroup
1B
\onslide<2>
2C
\endgroup
2D
\onslide
1-2E
\end{frame}

\end{document}