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

FR: Exporting tikz filling options to a tikz library #185

Closed
muzimuzhi opened this issue Jul 9, 2022 · 2 comments
Closed

FR: Exporting tikz filling options to a tikz library #185

muzimuzhi opened this issue Jul 9, 2022 · 2 comments
Assignees

Comments

@muzimuzhi
Copy link
Contributor

Currently tcb library skins provides several useful tikz filling options, which

(These options) can be used in any tikzpicture.

according to the doc, Sec. 13 "TikZ Image and Picture Fill Extensions; Auxiliary Macros".

Hence exporting them to a tikz library would make them more accessible, and enables use cases outside of tcolorbox.


A tikz library is just a file named tikzlibrary<lib-name>.code.tex, that can start with an optional \ProvidesFile{<file-name>}[<release-info>], see pgf-tikz/pgf#1162.

Possible problems when exporting:

  • Loading guard: \tikzuselibrary ensures each library (if loaded by \tikzuselibrary) can be loaded at most once.
  • Portability: A tikz library need not be portable (format independent), for example external library is supported for LaTeX only.
  • Independence:
    • graphicx is loaded by tikz in LaTeX, hence \includegraphics is not a problem.
    • \tcbdimto can be simply simulated if it's not yet defined.
    • About tcolorbox itself, skins lib will (surely) use \tikzuselibrary{filling}.

See v5.1.1...muzimuzhi:tcolorbox:tikz-lib-filling for my attempt. All the docTikzKey envs in tcolorbox.doc.filling.tex are copied to a new file tikzlibraryfilling.test.tex, to test if filling library can be used outside of tcolorbox.

@T-F-S
Copy link
Owner

T-F-S commented Jul 11, 2022

Thank you for your detailed proposal. The idea is not bad to extract these TikZ options into a separate library.

I think there is no hurry to make this, since a normal user will see no difference (if tcolorbox is used), but I put this on my TODO list.

@T-F-S T-F-S self-assigned this Jul 20, 2022
@T-F-S
Copy link
Owner

T-F-S commented Feb 10, 2023

@T-F-S T-F-S closed this as completed Feb 10, 2023
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

2 participants