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

Add default rule color setting #172

Open
krlmlr opened this issue Jan 2, 2022 · 5 comments
Open

Add default rule color setting #172

krlmlr opened this issue Jan 2, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@krlmlr
Copy link
Contributor

krlmlr commented Jan 2, 2022

Would you support changing the default color of all rules in a document via \arrayrulecolor{} ? I appreciate the ability to change the color with { hline = ... }, getting the default color automatically increases compatibility with existing documents.

@lvjr
Copy link
Owner

lvjr commented Jan 2, 2022

Yes, there will be a rulecolor option in the future.

@lvjr lvjr added the enhancement New feature or request label Jan 2, 2022
@krlmlr
Copy link
Contributor Author

krlmlr commented Jan 2, 2022 via email

@lvjr
Copy link
Owner

lvjr commented Jan 2, 2022

You need to load etoolbox package in the preamble of the document first for the following workaround:

\definecolor{defaultrulecolor}{rgb}{0.3,0.7,0.9}

\ExplSyntaxOn
\pretocmd \tblr_set_hline:nnn {
  \tl_if_empty:NT \l__tblr_hline_fg_tl {
    \tl_set:Nn \l__tblr_hline_fg_tl {defaultrulecolor}
  }
}{}{}
\ExplSyntaxOff

@krlmlr
Copy link
Contributor Author

krlmlr commented Jan 2, 2022

Awesome, thanks! Works for me.

@lvjr
Copy link
Owner

lvjr commented Aug 22, 2022

Maybe the interface could be

rules = {fg=brown, wd=1pt}

See also issue #102.

@lvjr lvjr changed the title Default color of rules in tblr/booktabs Add default rule color setting Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants