Friends,
Please have a look at the code below.
The problem is the environment hlcard
is behaving differently when it is inside card
environment, or directly under frame
. I have picked the card environment directly from net, and doesn't have much clue what those long optional argument is doing. Kindly help.
The behaivour directly inside frame
is the expected behaviour
\documentclass[12pt]{beamer}
\usepackage[customcolors,shade]{hf-tikz}
\usetikzlibrary{arrows,shadows,petri,decorations.markings,shapes}
\RequirePackage[many]{tcolorbox}
\definecolor{dcol}{HTML}{3F51B5}
\definecolor{BGgrey03}{RGB}{190,190,190}
\definecolor{BGgrey04}{RGB}{230,230,230}
\usecolortheme[named=dcol]{structure}
\usepackage{biblatex}
\tcbset{%
colback=BGgrey04, colbacktitle=dcol, coltitle=white, coltext=dcol,%
enhanced, sharpish corners=all,%
fuzzy shadow={0mm}{0.9mm}{0.6mm}{0.2mm}{black!20!BGgrey03}, % top
fuzzy shadow={0mm}{-0.6mm}{-0.1mm}{0.2mm}{black!40!BGgrey03}, % bottomSmall
fuzzy shadow={0mm}{-0.2mm}{-0.2mm}{0.2mm}{black!20!BGgrey03}, % bottomBig
left=6mm, right=6mm, top=6mm, bottom=6mm, middle=4mm,%
title filled, boxrule=0mm, %
segmentation code={\path[draw=BGgrey01](segmentation.west) -- (segmentation.east);}%
}
\newenvironment{card}[1][pR23s2OTKY]{%
\ifthenelse{\equal{#1}{pR23s2OTKY}}{%
\begin{tcolorbox}%
}{%
\begin{tcolorbox}[colbacktitle=dcol, coltitle=white, title=#1, left=1mm, right=6mm, top=1mm,
bottom=1mm, middle=4mm, toptitle=1mm, bottomtitle=1mm, ]%
}%
}{%
\end{tcolorbox}%
}
\newenvironment{hlcard}[1][pR23s2OTKY]{%
\begin{tcolorbox}[noparskip, breakable, colback=dcol,%
coltitle=black,coltext=white, fonttitle={\bfseries \scshape}, left=1mm, right=6mm, top=1mm,
bottom=1mm, middle=4mm, toptitle=1mm, bottomtitle=1mm,]%
}{%
\end{tcolorbox}%
}
\begin{document}
\begin{frame}
\begin{card}[Problem]
\begin{hlcard}
Foo
\end{hlcard}
\end{card}
\begin{hlcard}
Bar
\end{hlcard}
\end{frame}
\end{document}
tcolorbox
environments -- so why shouldhlcard
look the same inside or outside of the boxcard
, concerning skipping coming fromcard
? Why are you using\newenvironment
at all when you can use the better suited\newtcolorbox
macro? Also gluing contents from the net together to something what 'might' work is not a very well-designed strategy – user31729 Oct 3 '17 at 13:02\newtcolorbox
is very simple...I was not aware of it. I have moved both the\newenvironment
to\newtcoorbox
. Thanks a lot for this. But, about the main problem: when it is nested, I can't find why in nested env, its getting the dark border at all. Can you kindly help? – BaRud Oct 3 '17 at 13:40\tcbset
, which is the common 'pool' of options for alltcolorboxes
. – user31729 Oct 3 '17 at 13:42