-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Set template keys docu #1614
base: develop
Are you sure you want to change the base?
Set template keys docu #1614
Conversation
more exactly there is one usage in |
|
Maybe it should be called |
I thought that the fact this says 'template keys' suggested it would only handle known ones - but again no objection to a change. |
why would it? It could be a wrapper for |
I don't quite like |
Nothing really tells that it should only be used in the template code and it would be hard to get that into the name (which is why that is explicitly documented now) but using "Known" helps when reading code where it is in the right place, then you immediately see why it could get keys that do not fit for that particular template without ding harm and it fits with the underlying command which is |
yes how unknown keys are handled is certainly a question that would come to my mind, and it would fit better the definition as the underlying command is |
It would be nice, but rather hard, if even possible, to implement. For example, the key/vals to |
I have now updated and extended the documentation as well as moved the empty test inside the command, so I think it is ready for another review. What remains open is the csname. Are we good with |
I didn't mean a general tracking. |
ok, back to the drawing board then. what about this?
It would be for sure a breaking change, but I guess not a bad one. |
one would have to check the block code and adapt the uses there but beside this this looks fine imho. |
sure, the block code is already adapted as part of the PR (but it needs a corresponding change then) |
@FrankMittelbach I've already removed the usage in keytheorems and use |
ah, so much the better, then there is no usage of the current command other than in latex-lab, makes life easy. Btw, what to you think of the new docs and the suggested change/extension? |
I like the documentation changes. I'm not sure I fully understand the discussion about known/unknown keys, but I'm not a fan of the lack of error when an unknown key is passed to, say, |
The problem is that as @FrankMittelbach has indicated, you might need several templates for a complex case like this. So how do you decide where to issue a warning? We really don't want users to have to work out which template is which for setting keys - we looked at prefixing all keys, and it doesn't make a good interface. |
Not that I have much to say about this, but if this should only be used inside template code how about something like |
…keys (checking) --- WIP
I have now a first implementation for checkingg all user-supplied keys to block environments. a) it can be handled (but not yet cleanly, I'm missing some support interfaces) |
@FrankMittelbach @josephwright |
Internal housekeeping
Status of pull request
Checklist of required changes before merge will be approved
\changes
entries in source includedchanges.txt
updatedltnewsX.tex
(and/orlatexchanges.tex
) updatedOne thing to consider: change name from
\SetTemplateKeys
to\OverwriteTemplateKeys
, which seems to me sits better with\AssignTemplateKeys
(as it is theny clear what the order would be). It is not used in texmf (other than in latex-lab) so that could be a breaking change without problems.