Is it possible to explicitly set the backgroundcolor
option in mdframed
package, so that the background stays transparent (or, let's say "empty")?
It could be
\begin{mdframed}[backgrouncolor = ***]
Test
\end{mdframed}
with ***
= no color
, empty
, {}
but none of those work.
Is it possible to explicitly set the color to transparent/nothing in the options of mdframed?
edit
To say it more explicitly, is there a value ***
such that
\begin{mdframed}[backgrouncolor = ***]
Test
\end{mdframed}
and
% assuming no global options have been set
\begin{mdframed}
Test
\end{mdframed}
are equivalent?
Best Answer
I am not sure I understand the question, so I present three possible answers:
First option:
You can use
\mdfsetup
to define global settings:Second option:
By default, in the initial configurations,
mdframed
sets the background color towhite
, soand
are equivalent; notice that the default background color isn't really transparent, it is white and there's no predefined key to set the opacity for the background color (for a solution to the transparency issue using
tcolorbox
see third option below).An example:
are equivalent.
Third option:
I don't recall
mdframed
offers a way to set the background opacity (but I might be wrong). Withtcolorbox
you can control the background and/ot frame opacity usingopacityframe=<value>
,opacityback=<value>
(0
means completely transparent,1
means opaque); A little example (\pagecolor{cyan!10}
was used only to make the opcity effect visible):