-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Make sbox robust and scantokens of its content #2
Conversation
speaking personally but I think this is by design. I don't think it is like The choice to make the |
Thanks. My experience of A much bigger problem is that if a package (say, |
The |
Concerning LaTeX's fagile commands, we may wish at some point to have another go over the sources to clear out some of the remaining one when there is no harm in that. As to Also, as you can see even your simple change has caused to fail the test suite and that was not because it was wrong input in that test (and who knows how many others would have failed). The code in the kernel is subtle and a huge amount of different documents with different requirements depend on it. We haven't explicitly said (so far) that we will not accept pull requests, but as Joseph hinted in the CONRIBUTING.md draft (this repository isn't acutally live yet) the likelyhood that we can and will accept code is low. So don't be disappointed if we turn this down. |
Even though I do not agree with the fact that |
As always with LaTeX, any change has a risk but making remaining fragile commands robust is probably one that might work out. The long-term desire for a fixed set of actives remains: it would be best if |
@hmenke Thanks for the PR: setting up the GitHub repo, we did discuss how to handle these, as @FrankMittelbach suggests. |
* first draft of default unit code in picture mode * latexrelease guards * fix includeinrelease guards * update for default units * too much macrocode * correction to dashbox change * update for default units rollback * undefine internal space command from robust versions in rollback code * update for default units rollback * picture mode commands in ltboxes * different length registers for vertical and horizontal * picture mode test * update for default units rollback * update for default units rollback * updated filehook-006 test mostly from lthooks2 branch * updated filehook-006 test mostly from lthooks2 branch * #2 not #1 in picture box update * spurious < in rollback code * documentation * [ci skip] ltnews entry for picture extensions * [ci skip] change log entry for picture extensions * document using advance with defaultunitsset * wording clarification as suggested in review of PR * Move comment back to matching place in the code (accidentally moved while adding latexrelease guards) * old syntax version of test 01 * correct 7mm value
The
\sbox
macro is flawed in two ways.It performs an assignment but is not protected.
It scans the box content as an argument which fixes catcodes and makes it impossible to box, e.g. tabular material. Compare with this question on TeX.SX: How can a matrix of nodes be saved into a box?
This PR attempts to fix this behaviour while maintaining backwards compatibility (i.e. every code which relied on the old, faulty implementation was probably not behaving correctly anyway).