8000 Support for Both Solid and Dashed Lines in tcolorbox · Issue #306 · T-F-S/tcolorbox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support for Both Solid and Dashed Lines in tcolorbox #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
luca4protection opened this issue Jan 11, 2025 · 3 comments
Closed

Support for Both Solid and Dashed Lines in tcolorbox #306

luca4protection opened this issue Jan 11, 2025 · 3 comments

Comments

@luca4protection
Copy link

Description:
Currently, tcolorbox only supports dashed lines for the box borders. It would be great to have the flexibility to toggle between solid and dashed lines dynamically.

Expected Behavior:
Allow users to define the line style as either:

Solid
Dashed (default behavior)
box-dashed

@luca4protection
Copy link
Author

The Dashed Line is set in the tcolorbox.sty file

here is the snippit:

% draw segmentation line
\def\tcb@drawlower@standard{%
\begin{pgfscope}%
\pgfsetdash{{1mm}{1mm}}{0.5mm}% % <-- This sets the dashed pattern
\iftcb@sidebyside%
\tcbdimto\tcb@seg@pos{\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper+\tcb@w@upper+\kvtcb@sbs@gap/2}%
\pgfpathmoveto{\pgfqpoint{\tcb@seg@pos}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}%
\pgfpathlineto{\pgfqpoint{\tcb@seg@pos}{\kvtcb@bottom@rule}}%
\else%
\tcbdimto\tcb@seg@pos{\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@middle+\kvtcb@bottom+\tcb@height@lower}%
\pgfpathmoveto{\pgfqpoint{\kvtcb@left@rule}{\tcb@seg@pos}}%
\pgfpathlineto{\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\tcb@seg@pos}}%
\fi%
\pgfsetcolor{tcbcolframe}%
\pgfsetstrokeopacity{\kvtcb@opacityframe}%
\pgfusepath{stroke}%
\end{pgfscope}%
}

Would be very good if you could decide for dashed or solid

@T-F-S
Copy link
Owner
T-F-S commented Jan 14, 2025

The skins library contains an option segmentation style which allows the customize the line style:

grafik

To switch to a solid line use segmentation style=solid. Don't forget enhanced (see example).

@T-F-S
Copy link
Owner
T-F-S commented May 20, 2025

I think you commented 'Tolles Paket, jedoch ist es leider nicht möglich, anstatt der gestrichelten Linie eine durchgezogene, solide Linie in der Box zu verwenden, wäre super, wenn sich das einstellen könnte.' on https://www.ctan.org/pkg/tcolorbox at 2025-01-11

Would be nice, if you could remove/update this comment since solid lines can be used as shown in my post above. If you still have problems to achieve such a line, let me know.

@T-F-S T-F-S closed this as completed May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0