I used the @egreg's answer in beamer, but it doesn't work. How to handle it?
1 Answers
You need the fragile frame option if your frame contains something fragile like a lstlisting.
(and don't forget to compile with shell-escape enabled)
% !TeX program = txs:///arara
% arara: pdflatex: {synctex: on, interaction: nonstopmode, shell: yes}
\documentclass{beamer}
\usepackage[all]{tcolorbox}
\setbeamertemplate{background canvas}{\includegraphics[height=\paperheight]{example-image-duck}}
\tcbset{
boxrule=0pt,
opacityfill=0,
listing engine=minted,
docexample/.add style={}{
fontlower=\normalsize,
minted language=latex, % <--------
documentation minted options={
autogobble=true,
fontsize=\small,
style=bw, % <-------
}
}
}
\begin{document}
\begin{frame}[fragile]
\begin{dispExample}
\begin{equation}
\int_{-\infty}^{\infty} \exp (-x^2) , dx = \sqrt{\pi}
\end{equation}
\end{dispExample}
\end{frame}
\end{document}
- 158,329
-
Yes, that's correct. However, I want to add boxrule=0pt and opacityfill=0 options. – kalakay Aug 13 '22 at 16:03
-
@kalakay Yes? Both options work without problem – samcarter_is_at_topanswers.xyz Aug 13 '22 at 16:08
-
(although I'd be a bit careful with changing the opacity, this can sometimes cause unexpected problems. Unless you are using a background image, I'd just set the fill colour to be the same as the background canvas) – samcarter_is_at_topanswers.xyz Aug 13 '22 at 16:09
-
Well, it is. I use a background image. With the opacityfill=0 option, the result is not visible. – kalakay Aug 13 '22 at 16:14
-
@kalakay I just updated my answer, works fine for me. Can you test with this code? – samcarter_is_at_topanswers.xyz Aug 13 '22 at 16:16
-
I use a black background. It's still not working. – kalakay Aug 13 '22 at 16:22
-
@kalakay Can you make a minimal working example so that I can reproduce your problem? – samcarter_is_at_topanswers.xyz Aug 13 '22 at 16:30
-
1(just checking: you did change the text colour to something non-black, didn't you?) – samcarter_is_at_topanswers.xyz Aug 13 '22 at 16:30
-
No. Look, I've edited it. – kalakay Aug 13 '22 at 16:38
-
@kalakay Can you add your code as text to your question, not as image? – samcarter_is_at_topanswers.xyz Aug 13 '22 at 16:45
-
Solved! I used text colour for the right side. The options are boxrule=0pt,frame hidden,lower separated=false,opacityfill=0,coltext=white. Thank you, @samcarter. – kalakay Aug 14 '22 at 03:00

