5

Minimal example: enter image description here

\documentclass[]{report}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\newtcbtheorem[number within=chapter]{thm}{Theorem}
{theorem style=change apart,enhanced,arc=0mm,outer arc=0mm,
boxrule=0pt,toprule=1pt,bottomrule=1pt,left=0.2cm,right=0.2cm,
titlerule=0.5em,toptitle=0.1cm,bottomtitle=-0.1cm,top=0.2cm,
colframe=white!25!black,colback=white,coltitle=white,
title style={white!25!black},
fonttitle=\bfseries,fontupper=\normalsize}{thm}
\begin{document}

\begin{thm}{Stokes}{stokes}
Let $D$ be a regular domain in an oriented $n$-dimensional manifold $M$, 
and let $\omega$ be a smooth $(n-1)$ form of compact support. Then
\[\int_D d\omega = \int_{\partial D} \omega.\]
\end{thm}

\end{document}

I would like to completely eliminate the frames on the side, while keeping the one on bottom.

2 Answers 2

7

First, let me say, your settings are correct, but what you see are previewer artifacts. It depends on the previewer if you see the small lines or not.

I have two solutions how to get rid of these artifacts.

The first one changes your code just sligtly. Mainly, enhanced is replaced by enhanced jigsaw. The jigsaw variant uses another code to draw the frame which can be used for transparent boxes. Also, zero width lines are not displayed by many previewers:

\documentclass[]{report}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\newtcbtheorem[number within=chapter]{thm}{Theorem}{
  theorem style=change apart,
  enhanced jigsaw,% <--- jigsaw
  sharp corners,
  boxrule=0pt,
  toprule=1pt,bottomrule=1pt,
  left=0.2cm,right=0.2cm,top=0.2cm,
  titlerule=0.5em,
  toptitle=0.1cm,
  bottomtitle=-0.1cm,
  colframe=white!25!black,colback=white,coltitle=white,
  %title style={white!25!black},   & <---- remove
  fonttitle=\bfseries,fontupper=\normalsize}{thm}
\begin{document}

\begin{thm}{Stokes}{stokes}
Let $D$ be a regular domain in an oriented $n$-dimensional manifold $M$,
and let $\omega$ be a smooth $(n-1)$ form of compact support. Then
\[\int_D d\omega = \int_{\partial D} \omega.\]
\end{thm}

\end{document}

This gives the expected result with Adobe Reader and SumatraPDF on Windows:

enter image description here

You may have a previewer which still shows left and right lines. In this case, I have a second solution. Here, I do not expect any artifacts because there is simply nothing drawn at all. The bottom rule is made by a borderline south option:

\documentclass[]{report}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\newtcbtheorem[number within=chapter]{thm}{Theorem}{
  theorem style=change apart,
  enhanced,
  frame hidden,interior hidden,
  sharp corners,
  boxrule=0pt,
  left=0.2cm,right=0.2cm,top=0.2cm,
  toptitle=0.1cm+1pt,%        <-- I used your values here
  bottomtitle=-0.1cm+0.5em,%  <-- I used your values here
  colframe=white!25!black,colback=white,coltitle=white,
  title style=white!25!black,
  bottomrule=1pt,%  <-- reserve space
  borderline south={1pt}{0pt}{white!25!black},%---- draw line
  fonttitle=\bfseries,fontupper=\normalsize}{thm}
\begin{document}

\begin{thm}{Stokes}{stokes}
Let $D$ be a regular domain in an oriented $n$-dimensional manifold $M$,
and let $\omega$ be a smooth $(n-1)$ form of compact support. Then
\[\int_D d\omega = \int_{\partial D} \omega.\]
\end{thm}

\end{document}
1
  • I ended up having to use the second one, because preview still wouldn't cooperate. Thanks for your help. Jun 4, 2015 at 17:22
2

The individual rules can be set with leftrule=0pt, rightrule=0pt, etc. in the option argument of the \newtcbtheorem definition

\documentclass[]{report}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\newtcbtheorem[number within=chapter]{thm}{Theorem}
{theorem style=change apart,enhanced,arc=0mm,outer arc=0mm,
boxrule=0pt,toprule=1pt,leftrule=0pt,bottomrule=1pt, rightrule=0pt,left=0.2cm,right=0.2cm,
titlerule=0.5em,toptitle=0.1cm,bottomtitle=-0.1cm,top=0.2cm,
colframe=white!25!black,colback=white,coltitle=white,
title style={white!25!black},
fonttitle=\bfseries,fontupper=\normalsize}{thm}
\begin{document}

\begin{thm}{Stokes}{stokes}
Let $D$ be a regular domain in an oriented $n$-dimensional manifold $M$, 
and let $\omega$ be a smooth $(n-1)$ form of compact support. Then
\[\int_D d\omega = \int_{\partial D} \omega.\]
\end{thm}

\end{document}

enter image description here

9
  • I tried that, but it still looks the same as my picture. Is there a way to add the horizontal line separately, i.e., so there is no frame? May 27, 2015 at 13:50
  • @RandyRanderson: Do you have the latest tcolorbox release? I've used 3.50 (before texlive was freezed some weeks ago, but CTAN has 3.60 already). As far as I know, the leftrule=0pt must be specified after boxrule=....
    – user31729
    May 27, 2015 at 13:52
  • I reinstalled MacTeX recently so I think so. I copied and pasted what you wrote but it looked the same, very thin vertical lines instead of none. May 27, 2015 at 13:57
  • I test your answer, however on pdf picture seeing in Sumatra the left and right margins are still visible. If I look the MWE of OP in Adobe Reader, this borders disappear. So I suspect, that OP observe this lines since he doesn't use Reader ...
    – Zarko
    May 27, 2015 at 13:59
  • @Zarko: Yes, I am using the Adobe Reader. There are no lines. They are visible in evince however too.
    – user31729
    May 27, 2015 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .