-
-
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
enhance mark extraction to account for forced breaks within the material #1177
Conversation
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.
Changes.txt entry?
sure, but too early for that in my opinion. That's why it says under development and nothing is checkmarked above (I'm one of those folks who are really using Will's checkmark list :-) ). So right now all I'm really interested in is whether the logical seems to be right. |
Obviously we view this a bit differently: I thought the |
@josephwright I agree that doing this in parallel is useful most of the time. However, in this case I expect many more changes (and possibly alternative implementation), so I'm going lightweight on programmer-level docs and do them when things are a bit more settled. |
Use it to also provide \__mark_get_marks_for_reinsertion:nNN for use in multicols (and elsewhere) eventually
I altered and extended the implementation in anticipation what is necessary for multicols and/or in general for extracting marks out of box material to reinsert them afterwards. This is now closer to what I think is needed so change entries will come up soon @josephwright :-) |
To reduce the ambiguity, perhaps a new item can be added to section "Status of pull request", in pull request template, to indicate that the PR author is aware of the missing For example,
|
sorry don't get it. Of course, I'm aware (and so should everybody else) since I didn't checkmark those item nor did I put n/a (not applicable) into the checkmark box. So it is all there at the very top. Why should a different string from
plus the checkmark list, provide any additional info? It is more that often people do not use the checkmark list, but that is not helped I think by asking for providing a different status string. |
base/ltmarks.dtx
Outdated
% executes \verb/#1{#3}/ to do something with the marks, e.g., to | ||
% update the mark structure for the region. | ||
% | ||
% If it finds infinite negative glue it generates an error message |
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.
could you get any other tex error at this point, since the material is already a vlist?If not I suppose you could consider setting interactionmode and restoring it to suppress this error?
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.
Interesting thought, but I don't think there is a way to detect then that the error has happened and it is an error, ie the user is losing the marks and so I think they should learn that this is the case. But perhaps if it is enough if that is something you can find in the .log? It would certainly has the advantage that then the processing doesn't stop if they can't avoid the infinite negative glue. Maybe.
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.
hmm, back to the drawing board perhaps. If we run with \interactionmode 0, the error only appears in the log and we actually get to the marks even if there is real infinite negative glue (because TeX makes it finite).
In other words, if we accept that we may see
! Infinite glue shrinkage found in box being split.
\__box_dim_eval:n ...box_dim_eval:w #1\scan_stop:
l. ... }
The box you are \vsplitting contains some infinitely
shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'.
Such glue doesn't belong there; but you can safely proceed,
since the offensive shrinkability has been made finite.
! Infinite glue shrinkage found in box being split.
in the log then we can get at the marks in all cases, which seems better then issuing an error or a warning that it doesn't work.
If we want to we could additionally do
\wlog{Any immediately following 'Infinite glue shrinkage' error is harmless and can be ignored}
but I'm not sure this is better, because most of the time there will be none and we only end up with these extra lines. Thoughts?
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.
yes wlog would be confusing I think, for the reason you say.
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.
You could use \ignore_infinite_shrinkage_error
defined as \let\ignore_infinite_shrinkage_error\__box_dim_eval:n
perhaps....
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.
??? not sure I understand the suggestion, could you perhaps simply implement it? the branch is up to date and I don't intend to alter it right now
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.
\expandafter\def\csname Ignore any infinite glue shrinkage error on this line\endcsname{
\setbox0\vbox{aaa \vss bbb}%
\setbox2=\vsplit0 to \maxdimen
}
\expandafter\def\expandafter\foo\expandafter{%
\csname Ignore any infinite glue shrinkage error on this line\endcsname}
{
\interactionmode=0
\foo
}
makes a log
! Infinite glue shrinkage found in box being split.
\Ignore any infinite glue shrinkage error on this line ...
l.13 \foo
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.
I could probably try adding something like this later this evening
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.
Lots of commas (and a few "uncommas"), etc.
typos and corrections
code can be simplified if we go this way.
I pushed a change change the glue shrink message
The test file |
documentation not yet updated and old code still mostly inside commented out
…an be triggered from ltmarks.dtx?
I like the idea and it makes the code much simpler --- and we get correct results even if there is shrinkage in the material which is great. I altered the txt a bit (not sure if it is for the better). Right now the test suite fails in a very strange way though and I don't understand why. |
yes lots of newlines in the raw log before the
On the terminal it looks like
so the extra newlines are only going to the log |
neither can I but I really would like to understand before I update hundreds of test files |
@FrankMittelbach turns out possibly from
but my web is a bit rusty:-) |
produces
but since the test suite uses \scrollmode anyway an alternative plan to avoid changing the tests and adding newlines to end user log files would be to skip saving and reseting \interactionmode unless its current value is 3 (errorstopmode) I think any of the values 0,1,2 would work for this so we don't need to switch? |
I guess I'm more for fixing the tlgs instead of doing something tailored to our test suite. But I have another issue. When I locally run l3build check it seems too loop after processing (or while?) github-0094 and I don't find what happens there. When I run 0094 by itself (or the one that I think comes after it all seems fine |
If I run
It stops in error stop mode at the terminal with
|
and the same happens for l3build check tltc001 with xetex (as if the interaction mode it not properly restored), now why is that? |
well why is it using luatex back end syntax with xetex |
me> well why is it using luatex back end syntax with xetex because it's defined that way in the test file, this ought to be in a pdftex-luatex config, probably |
All true but why is it not running scrollmode? |
After the test suite issues have been identified and corrected, I think this is now ready to be merged. Open questions
|
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.
looks good to me, I don't think it needs rollback, I made a couple of minor tweaks to the news text. Error text is OK, I played around in my initial draft but getting the text just to appear in the right place doesn't leave a lot of room, as you noted Your version is fine.
# Conflicts: # base/changes.txt # base/doc/ltnews39.tex # base/ltmarks.dtx
…ial (latex3#1177) * enhance mark extraction to account for forced breaks within the material (WIP) * Generalize mark extraction code; Use it to also provide \__mark_get_marks_for_reinsertion:nNN for use in multicols (and elsewhere) eventually * added change entries typos and corrections * first attempt using \interactionmode (WIP) code can be simplified if we go this way. * improve infinite glue shrinkage log message * some documentation of David's idea * hmm * much simpler this way now (and the marks always correct) documentation not yet updated and old code still mostly inside commented out * the ways of TeX are mysterious --- anybody any idea how this change can be triggered from ltmarks.dtx? * more of those ... strange * and another one * some cleanup and many more test files showing extra lines in the log * too much removed from the doc * and a few more tests ... * even more test files * added ltnews entry * minor wording adjustments * a bit more docu cleanup * tlg updates * correct date --------- Co-authored-by: David Carlisle <[email protected]>
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
) updated