5

I am using tcolorbox tcbline and it looks like dashed horizontal line. The color of this line can be set using colframe option:

enter image description here

But I need to cutomize the line itself (for example change the color, make it solid etc.) How to do so?

Code I am using to create tcolorbox environment:

\newtcolorbox{results}[1][]{%
    enhanced,breakable,
    colframe=topBlue,
    colback=white,
    arc=1mm,
    outer arc=1mm,
    attach boxed title to top center={yshift=-4mm},
    boxed title style={size=small,colback=topBlue!10!white,boxsep=2.4mm,left=0mm,right=0mm},
    coltitle=topBlue!70!black,
    fonttitle=\bfseries\large,
    boxsep=5mm,
    left=0mm,
    right=0mm,
    before={\noindent},title=#1%
}

This is how I use it:

\documentclass{article}
\usepackage[many]{tcolorbox}

\begin{document}
\begin{results}[Box title]
some text
\tcbline
more text
\tcbline
even more text
\end{results}
\end{document}

For example, it would be nice to have this tcbline:

enter image description here

5

Just define the segmentation style that you need as is explained under tcbline definition in tcolorbox documentation.

\documentclass{article}
\usepackage[many]{tcolorbox}

\newtcolorbox{results}[1][]{%
    enhanced,breakable,
    colframe=blue,
    colback=white,
    arc=1mm,
    outer arc=1mm,
    attach boxed title to top center={yshift=-4mm},
    boxed title style={size=small,colback=blue!10!white,boxsep=2.4mm,left=0mm,right=0mm},
    coltitle=blue!70!black,
    fonttitle=\bfseries\large,    
    boxsep=5mm,
    left=0mm,
    right=0mm,
    before={\noindent},
    segmentation style={solid, red!30},
    title=#1%
}

\begin{document}
\begin{results}[Box title]
some text
\tcbline
more text
\tcbline
even more text
\end{results}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.