-
Notifications
You must be signed in to change notification settings - Fork 104
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
Conversation
|
||
\input pgfkeysfiltered.code.tex | ||
\let\pgfkeys@library@filtered@loaded\pgfkeys@empty | ||
\input pgfkeyslibraryfiltered.code.tex |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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
\index{#1@\protect\texttt{#1} library}% | ||
\index{Libraries!#1@\protect\texttt{#1}}% |
There was a problem hiding this comment.
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
\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}}% |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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}}] |
There was a problem hiding this comment.
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}}
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
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: