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

feat: add option to style hyperref #19

Merged
merged 7 commits into from
Jan 28, 2025
Merged

feat: add option to style hyperref #19

merged 7 commits into from
Jan 28, 2025

Conversation

atticus-sullivan
Copy link
Collaborator

Refer to #18

@atticus-sullivan atticus-sullivan self-assigned this Jan 23, 2025
% Style hyerref according to the styleguide\footnote{\url{https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md\#typography}} if the user wants it
% \begin{macrocode}
\ifcatppuccinpalette@hyperref%
\PassOptionsToPackage{linkcolor=CtpBlue,citecolor=CtpGreen,filecolor=CtpSky,menucolor=CtpBlue,runcolor=CtpSky,urlcolor=CtpBlue}{hyperref}%
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about all the colors here.

As far as I can see, https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md#typography only defines Links and Urls. What about Cite, Run, Menu (not sure what this even is) and File?

As far as I remember I tried to choose colors similar than in default hyperref (thus Green for cites).

Any opinions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently the option description for Menu is "Color for Acrobat menu items." Had to search a little far and wide for this, but apparently it opens an Acrobat menu item? Usage appears to be \href{menu:GoTo}{Go to a menu item}. 😆

I think since the style guide does not have specific rules for these cases, I think choosing similar colors to the hyperref defaults works, as long as they're still legible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran though the changes locally and all the colors look good / legible to me!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Looks like there is also anchorcolor but probably this is not too relevant if it's ignored by most drivers.

For reference (with catppuccin):
image

For reference (default colors):
image

Not sure if url and link should get different colors. And if the citation color should be more highlighting. But then I don't want to violate the style-guide by making manual adjustments here (Cite is not defined, but I think there is no real (green) highlighting color in catppuccin and url/link is the same thing in the style-guide)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the green here works! And I also think it's fine that URL and link colors are the same; if anything, I think the uniformity makes it more clear that they're links haha.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I'm just thinking links refering to the web (opening a browser) should probably be somhow be visible as such. So I'm thinking of using another blue tone (probably Lavender or maybe Sapphire, also they are not allocated in the typography section of the style guide until now). What do you think?

Copy link
Member

@walshyb walshyb Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that sounds good! I'm leaning more towards the Lavendar since it has a connection to links, used for followed links, in the style guide. (and because I like it more 🤭)

but honestly either can work

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, but fair point the color(-scheme)'s purpose is that you like it 😄

Hm for me either would be fine. I'm just a bit unsure if the difference between Blue and Lavender is big enough (especially when zooming out) 🤔 So I'm leaning a bit towards Sapphire. Though you have a point with the Style guide regarding followed links

With Sapphire:
image

With Lavender:
image

Anyhow I'd keep this PR open just for another few days in order to give people on discord a chance to respond regarding following the style guide.

@atticus-sullivan atticus-sullivan linked an issue Jan 23, 2025 that may be closed by this pull request
@atticus-sullivan atticus-sullivan added enhancement New feature or request help wanted Extra attention is needed labels Jan 23, 2025
% Style hyerref according to the styleguide\footnote{\url{https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md\#typography}} if the user wants it
% \begin{macrocode}
\ifcatppuccinpalette@hyperref%
\PassOptionsToPackage{linkcolor=CtpBlue,citecolor=CtpGreen,filecolor=CtpSky,menucolor=CtpBlue,runcolor=CtpSky,urlcolor=CtpBlue}{hyperref}%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently the option description for Menu is "Color for Acrobat menu items." Had to search a little far and wide for this, but apparently it opens an Acrobat menu item? Usage appears to be \href{menu:GoTo}{Go to a menu item}. 😆

I think since the style guide does not have specific rules for these cases, I think choosing similar colors to the hyperref defaults works, as long as they're still legible.

% Style hyerref according to the styleguide\footnote{\url{https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md\#typography}} if the user wants it
% \begin{macrocode}
\ifcatppuccinpalette@hyperref%
\PassOptionsToPackage{linkcolor=CtpBlue,citecolor=CtpGreen,filecolor=CtpSky,menucolor=CtpBlue,runcolor=CtpSky,urlcolor=CtpBlue}{hyperref}%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran though the changes locally and all the colors look good / legible to me!

Copy link
Member

@walshyb walshyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have one note about passing colorlinks=true along with the other hyperref options.

Other than that, looks good!

Copy link
Member

@walshyb walshyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless there's anything else you can think of, this looks good to me! 😊🚀

@atticus-sullivan
Copy link
Collaborator Author

Merging in 24 h (with sapphire as url color) if no objections are raised.

@atticus-sullivan atticus-sullivan merged commit 6730743 into main Jan 28, 2025
2 checks passed
@atticus-sullivan atticus-sullivan deleted the feat-hyperref branch January 28, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hyperref support
2 participants