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

Introduce library loading mechanism for pgfkeys #1129

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

hmenke
Copy link
Member

@hmenke hmenke commented Jan 18, 2022

Motivation for this change

This will allow users to write libraries for pgfkeys. Not sure how useful this is.

Checklist

Please signoff your commits to explicitly state your agreement to the Developer Certificate of Origin. If that is not possible you may check the boxes below instead:


\input pgfkeysfiltered.code.tex
\let\pgfkeys@library@filtered@loaded\pgfkeys@empty
\input pgfkeyslibraryfiltered.code.tex
Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to not remove this for now.

Copy link
Member

@muzimuzhi muzimuzhi left a comment

Choose a reason for hiding this comment

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

Only some styling suggestions.

\input pgfkeyslibrary\pgf@temp.code.tex
}{%
\pgfkeys@error{I did not find the pgfkeys library '\pgf@temp'. I looked for the
file named pgfkeyslibrary\pgf@temp.code.tex, but could not find it in in the
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
file named pgfkeyslibrary\pgf@temp.code.tex, but could not find it in in the
file named pgfkeyslibrary\pgf@temp.code.tex, but could not find it in the

Copy link
Member Author

Choose a reason for hiding this comment

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

This is also wrong in \usepgflibrary where I copied it from :D

Comment on lines 1109 to 1110
\index{#1@\protect\texttt{#1} library}%
\index{Libraries!#1@\protect\texttt{#1}}%
Copy link
Member

Choose a reason for hiding this comment

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

Does it need to be distinguished with tikz libraries? If so

Suggested change
\index{#1@\protect\texttt{#1} library}%
\index{Libraries!#1@\protect\texttt{#1}}%
\index{#1@\protect\texttt{#1} \protect\texttt{pgfkeys} library}%
\index{pgfkeys Libraries@\protect\texttt{pgfkeys} Libraries!#1@\protect\texttt{#1}}%

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no distinction between PGF and TikZ libraries already. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

But \pgfuselibrary is never documented nor mentioned in pgfmanual. That means currently all the "xxx library" index entry in pgfmanual is actually a tikz library.

@@ -74,21 +80,21 @@ \subsubsection{Starting With An Example}
%
\noindent and
%
\begin{codeexample}[code only]
\begin{codeexample}[code only,preamble={\usepgfkeyslibrary{filtered}}]
Copy link
Member

Choose a reason for hiding this comment

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

Since filtered is loaded by default, there seems no need to add preamble={\usepgfkeyslibrary{filtered}}?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the future I want to remove the default loading.

Copy link
Member

Choose a reason for hiding this comment

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

Then in a more strict manner preamble={\usepgfkeyslibrary{filtered}} should be added when filtered is not loaded by default. From another aspect, tikz library topaths is loaded by default and all its codeexamples don't have preamble={\usetikzlibrary{topaths}}.

If the removal of default loading will happen soon (which requires a new release of pgfplots), then I'm OK with this temporary redundancy.

Co-authored-by: muzimuzhi <muzimuzhi@gmail.com>
Signed-off-by: Henri Menke <henri@henrimenke.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants