[Tex/LaTex] How to remove the shadow

tcolorbox

I am trying to get a very specific border going. Using \tcolorbox, I'm now close, but have some problems. Specifically:

  • There is a shadow that I want to remove
  • For some reason the text is gray, not black

Reading through the manual I know there is a "no shadow" option, but lacking any example I am unable to put it to use. In the MWE below I have tried adding "no shadow" to the list of options but I get this error:

! Package pgfkeys Error: I do not know the key /tcb/noshadow and I
am going to ignore it. Perhaps you misspelled it.

Just to clarify, I do NOT want a border/shadow on the bottom or right hand side. I do want a (very wide) border on the left and a normal border on the top.

Here is the MWE:

\documentclass{article}
\usepackage{tcolorbox}
\usepackage{lipsum}

\newtcolorbox{topbot}[1][]{leftrule=5pt, toprule=.5pt, rightrule=0pt, bottomrule=0pt, colback=white, notitle, sharp corners, #1}

\begin{document}

\begin{topbot}
\subsection*{This is the title}
\end{topbot}
\lipsum[2]

\end{document}

Here is a zoomed in screenshot that shows the color problem and the shadow at the bottom of the box:

zoomed in image

Here is another screenshot of the solution proposed by AboAmmar:

still a shadow

Best Answer

I don't see any phantom rules, but this could be an alternative solution. It uses an empty skin which doesn't draw any frame or background but keeps all margins. After that two borderlines can be used to draw the desired frame.

\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\newtcolorbox{topbot}[1][]{empty, notitle, sharp corners, borderline north={1pt}{0pt}{black},
borderline west={5pt}{0pt}{black},
#1}

\begin{document}

\begin{topbot}
\subsection*{This is the title}
\lipsum[2]
\end{topbot}
\lipsum[2]

\end{document}

enter image description here

Related Question