-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
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 |
@FrankMittelbach @josephwright |
Using "This" in the name would help with identifying where it should be, but assuming it is in the right place, the important info for somebody reading the code is whether it only deals with known, keys (and ignores the rest) or whether it handles everything in its argument (and complains if it finds some unknown ones). and putting in "Known" as well makes the name really horrible in my eyes. Thus I think it is better to find a name that it good for somebody reading the code and document where to put it for those writing the code, hence my current names. |
… be a good choice compared to \SetKnownTemplateKeys
# Conflicts: # base/changes.txt
I think it is ready enough for your review (otherwise you might find it got merged) The only open question for me is whether or not top fully dop |
I think we could probably drop |
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.
Quite a lot here by now.
Thanks for waiting! |
Not sure what was meant here: whether or not top fully dop \SetTemplateKeys Maybe it should read : |
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.
Having both \SetKnownTemplateKeys
and \SetTemplateKeys
is a little awkward but as discussion in this PR shows the use cases aren't totally clear until more experience with using these in the wild emerges. Keeping both seems wise for now. approving with no change
# Conflicts: # base/changes.txt
@car222222 I think I address them all (with one or the other question) |
One could call it \SetAllTemplateKeys perhaps but I think the distinction is basically clear: one sets what it understands the other tries all and complains of it doesn't understand some keys |
I have not yet looked at the latest version: do you want me to check the most recent changes? |
In a new example in the tagging project I came across this example:
This compiles in main and develop, compared to the original the numbers are not in bold but the layout and the tagging looks ok). In this branch this now errors:
|
well, paralist overwrites enumerate, thus even privously it only worked by chance (tagging because evenually it called the list environment I guess). And according to the compatibility table paralist is incompatible (and now this shows a bit clearer). Besides: I don't think that putting multicols in the middle can beconsidered correct syntax, but that isn't the problem here. |
Yes, but should it already be an error? Or should we only warn at the current state that these keys have not been processed?
It's creepy ;-) But it seems to work as intended. |
Ok, now I have found the "8 commits 7 days ago". |
I added some replies: I can still,see many problems with the explanations, in both linguistic details and more fundamentally. But since the code is now as agreed, next to release this now. I anyway need to look again at how this whole area has evolved, in the light of the complexities of current usages. . . . one day! |
aus Falschem folgt Beliebiges |
I only wanted to point out that there have been commits. One of them is bringing the banch up to speed with unrelated development already in the -dev branch, so if you look at the individual commits you will see a lot more. |
sorry don't see any new replies from you (and I also got no email notices, which I normally get)
well, one day look at the whole thing, it seems that on the level of review of snippets that is just not workable (as you then do not see the explanations that are nearby (which may or may not be sufficient, but that can't be assest from then bits that have changed.). |
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.