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

Provide dummy defs for \conditionally@traceon/off in the kernel #164

Closed
FrankMittelbach opened this issue Jul 31, 2019 · 9 comments
Closed

Comments

@FrankMittelbach
Copy link
Member

At the moment these are defined only by trace.sty. Better have an empty definition already in the kernel so that packages can use them without having to worry whether or not the trace package is loaded. (Currently an issue for xparse)

@josephwright
Copy link
Member

Better in l3kernel? Something like \trace_conditional_begin:? For the present this can be set equal to the LaTeX2e one if available?

@FrankMittelbach
Copy link
Member Author

I'm ok with the l3kernel offering an l3 interface to the concept, but I I think the function should be provided in in 2e kernel with its 2e name so that trace.sty can interact with other 2e package that may want to reduce the trace footprint.

@josephwright
Copy link
Member

Couldn't we just add all of trace to the kernel?

@FrankMittelbach
Copy link
Member Author

@josephwright we could but then that could would be always executing and it is done in places that are fairly often called, which is why I'm not sure we should. I tend to think that just adding the dummy ones is better.

@FrankMittelbach FrankMittelbach added this to Pool (unscheduled issues) in upcoming LaTeX2e releases via automation Aug 16, 2019
@josephwright
Copy link
Member

@FrankMittelbach I don't follow: without \traceon aren't the conditional macros no-ops? I just meant that is there a need to not pre-load trace in its entirety, so one can \traceon without \usepackage{trace}?

@wspr
Copy link
Contributor

wspr commented Aug 22, 2019 via email

@FrankMittelbach
Copy link
Member Author

@josephwright if the code from trace is in the kernel, then yes, the conditionals are noops but they are nevertheless executed so you have possibly several thousands of macros executed as "do nothing" but still expanded. But it might be preferable over having certain commands change their definition depending on whether or not the package is loaded. I guess I'm still somewhat tied into believing execution cycles needed to be saved when possible, but in this case it is probably a bad idea and better to fold the whole of trace.sty into the kernel directly.

@FrankMittelbach
Copy link
Member Author

Basically any font change would trigger the no-ops but that probably amounts to less than 100 per page typically so it is indeed not really worth preserving these days.

@FrankMittelbach FrankMittelbach moved this from Pool (unscheduled issues) to To do in upcoming LaTeX2e releases Aug 26, 2019
@FrankMittelbach FrankMittelbach moved this from To do to In progress in upcoming LaTeX2e releases Aug 30, 2019
@FrankMittelbach
Copy link
Member Author

I decided to go for providing just the two function needed in external packages for now. At a later stage we might consider moving the whole of trace as well. Once this is live it can be used in xparse and the like.

upcoming LaTeX2e releases automation moved this from In progress to Done Aug 30, 2019
@FrankMittelbach FrankMittelbach added this to the release 2019 fall milestone Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants