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

Output normalization hook #349

Open
muzimuzhi opened this issue Feb 27, 2024 · 4 comments
Open

Output normalization hook #349

muzimuzhi opened this issue Feb 27, 2024 · 4 comments

Comments

@muzimuzhi
Copy link
Contributor

To apply additional normalization, after built-in output normalization is done. Could be named normalize_hook().

Use case: to simplify specific test output, for example the log-based m3plain002.lvt test in latex3, added in latex3/latex3#1467

latex3/latex3#1467 (comment):

Commit 6f301f1 adds a plainTeX test that loads expl3-generic.tex in a group with \tracingrestores turned on. I think it dumps too many lines hence am considering dropping it in final state.

Is there a way to track lines containing =undefined} only? If so, I'm willing to keep m3plain002.lvt.

@cfr42
Copy link

cfr42 commented Jul 11, 2024

This would be useful for testing font packages because it would let me remove glue/box lines. (I could post-process the output with something like sed or perl, much as @davidcarlisle suggested, but that means abandoning cross-platform/cross-distribution compatibility.) As far as I know there's no tracing option for pdfTeX/TeX which will give me (all) the font lines I want without the lines I don't. Right now the only cross-platform options appear to be to rewriting the normalisation function or tolerating the 'noise'.

@josephwright
Copy link
Member

I think before doing this we maybe should refactor the normalisation code anyway. We used to worry about long lines, but the 'plan' has changes so we run with a very large line length and avoid that. So perhaps we should make the latter a requirement, simplify the normalisation, then look at this?

@muzimuzhi
Copy link
Contributor Author

muzimuzhi commented Sep 25, 2024

We used to worry about long lines, but the 'plan' has changes so we run with a very large line length and avoid that.

But that's configurable and I've seen cases where package maintainers chose to set the old value of maxprintline, for example tuna/thuthesis@45c0b37. So maybe existing normalisation code for wrapped long lines should be kept. Or it can be turned off if maxprintline ~= 9999.

@josephwright
Copy link
Member

We used to worry about long lines, but the 'plan' has changes so we run with a very large line length and avoid that.

But that's configurable and I've seen cases where package maintainers chose to set the old value of maxprintline, for example tuna/thuthesis@45c0b37. So maybe existing normalisation code for wrapped long lines should be kept.

Indeed - that's why I said about making it a requirement - we can't simplify the normalisation unless we also force the line length. That's a breaking change but over time we have made those where it makes sense - it's not hard to update .tlg files when one knows the only change is in l3build. But that is likely a separate discussion to the question of a normalisation hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants