Skip to content
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

scoped \href arguments to avoid leaking color #2433

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dginev
Copy link
Collaborator

@dginev dginev commented Oct 24, 2024

I stumbled onto a simple color leakage arxiv report yesterday and found a quick fix.

But I am also a little unsatisfied by how specific the fix is - it only contains one macro, rather than all possible cases where this containment may be needed. But I am not sure which cases those are.

So for now I'm offering the quick fix for consideration. And adding a test.

Minimal example reproducing the issue:

\documentclass{article}
\usepackage{hyperref}
\usepackage{xcolor}
\begin{document}
A link: \href{https://example.com}{\color{blue}here}.

\section{Color should not leak into this heading}
This text should be black.

\end{document}

@dginev dginev marked this pull request as draft October 24, 2024 14:45
@dginev dginev marked this pull request as ready for review October 24, 2024 14:48
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

Successfully merging this pull request may close these issues.

1 participant