4

It seems that the media9 package and the tcolorbox package are not compatible in the sense that there is an affect on the text color in the pdf file. If I use the media package, then the color of the text in the box is changed significantly. Once I stop using the media package, then the color of the text in the box is back to normal. Below is the codes for your testing. Please replace DRS2.mp4 in the code by any mp4 file of your choice. Any help to overcome this technical difficulty is appreciated.


\documentclass{beamer}
\usepackage{tcolorbox}
\usepackage{media9}% to embed video
\usepackage{tikz}%to embed video

\begin{document}

\begin{frame}
\includemedia[
width=1\linewidth,
totalheight=0.82\linewidth,
activate=pageopen,
passcontext,  %show VPlayer's right-click menu
addresource=DRS2.mp4,
flashvars={
    %important: same path as in `addresource'
    source=DRS2.mp4
}
]{}{VPlayer.swf}

\end{frame}

\begin{frame}
\begin{tcolorbox}[colback=green!5,colframe=green!40!black,flush left,title=    ]
    Let $X$ be a random variable with geometric distribution. We have
    \begin{itemize}
        \item[$\bullet$]    $\textcolor[rgb]{0.00,0.00,1.00}{f(x)=p(1-p)^{x-1}},\ x=1,\ 2,\ 3,\ldots$
        \item[$\bullet$] $\textcolor[rgb]{0.00,0.00,1.00}{M( t)}=E(e^{tX})=
        \textcolor[rgb]{0.00,0.00,1.00}{\frac{pe^t}{1-(1-p)e^{t}}}$,
        given $(1-p)e^t<1$

        \item[$\bullet$] $\textcolor[rgb]{0.00,0.00,1.00}{\mu=E(X)=\frac{1}{p}}$

        \item[$\bullet$] $\textcolor[rgb]{0.00,0.00,1.00}{\sigma^2=\frac{(1-p)}{p^2}=\frac{q}{p^2}}$
        \item[$\bullet$] $\textcolor[rgb]{0.00,0.00,1.00}{P(X>k)=\textcolor[rgb]{1.00,0.00,1.00}{q}^k}$
        \item[$\bullet$] $\textcolor[rgb]{0.00,0.00,1.00}{P(X\leq k)=1-\textcolor[rgb]{0.00,0.00,1.00}{P(X>k)}=1-\textcolor[rgb]{1.00,0.00,1.00}{q}^k}$
    \end{itemize}
\end{tcolorbox}
\end{frame}

\end{document}
  • This seems to be a PDF viewer issue. In AR XI the blue text looks ok (full blue, zero red and green components). – AlexG Sep 29 '17 at 14:08
6

media9 uses TikZ to draw a play-button overlay with transparency. This seems to have side effects. As a workaround, add one of

playbutton=plain

or

playbutton=none

options to \includemedia or as a package option.

  • 1
    Thank a lot, @AlexG. The unintended effect is still seen with the option playbutton=plain although it does improve the color a bit. The problem seems to be gone with the option playbutton=none. Really appreciate quick your help. – hochoi Sep 26 '17 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.