8000 `sidebyside align=top` not aligned due to color whatsit · Issue #302 · T-F-S/tcolorbox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ < 8000 strong itemprop="name" class="mr-2 flex-self-stretch"> tcolorbox Public

sidebyside align=top not aligned due to color whatsit #302

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
mbertucci47 opened this issue Nov 26, 2024 · 4 comments
Closed

sidebyside align=top not aligned due to color whatsit #302

mbertucci47 opened this issue Nov 26, 2024 · 4 comments
Assignees

Comments

@mbertucci47
Copy link
Contributor
mbertucci47 commented Nov 26, 2024

First reported here: https://tex.stackexchange.com/q/722398/208544

The sidebyside align=top option does not align the sides by their baselines if the first lines have different heights. As Ulrike mentions in the comments, this is due to a color whatsit. With luacolor loaded, the issue goes away.

\documentclass{article}
%\usepackage{luacolor} % fixes issue
\usepackage{tcolorbox}

\begin{document}

\begin{tcolorbox}[sidebyside,sidebyside align=top,sidebyside gap=0pt]
A\hrulefill
\tcblower
a\hrulefill\par
a\hrulefill
\end{tcolorbox}

\end{document}

Without luacolor

test-1

With luacolor

test-1

@T-F-S
Copy link
Owner
T-F-S commented Nov 26, 2024

https://github.com/T-F-S/tcolorbox/releases/tag/v6.0.0 changed the color handling. Now, color is now inserted at begin of all internal \boxes. This was a possibly breaking change, but necessary to remove many other problems. Unfortunately, this broke sidebyside align=top which I was not aware of until now.

Again, unfortunately, there is no senseful way to revert back to the old implementation. Your example works for version 5.1.1 (2022-06-24).

As written on stackexchange, adding a \strut at the begin of both box parts may help to circumvent (but not solve) the problem for many cases. The culprit is the color whatsit and I agree that using luacolor is the prime solution for lualatex, but excludes pdflatex users.

I will add a warning and solution clue to the documentation:

grafik

@T-F-S T-F-S self-assigned this Nov 26, 2024
@muzimuzhi
Copy link
Contributor
muzimuzhi commented Nov 26, 2024

Typo in the newly added warning: "This options" -> "This option". Or perhaps use "This value of <alignment>" as the "option" here maybe ambiguous (sidebyside align is itself an option and top is one of its accepted values.)

@T-F-S
Copy link
Owner
T-F-S commented Nov 27, 2024

Typo in the newly added warning: "This options" -> "This option". Or perhaps use "This value of " as the "option" here maybe ambiguous (sidebyside align is itself an option and top is one of its accepted values.)

Yes, thank you. I will correct this.

grafik

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

@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
Projects
None yet
Development

No branches or pull requests

3 participants
0