Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2099 (using the feedback from #2216). This PR:
ltx:ERROR
fromMeta.class
toMisc.class
in the schema, as errors are typically visible in the final formats, which fits better with the purpose of Misc.ltx:biblist
is never allowed to auto-open, this change will have limited impact, as bibitem is only allowed in a biblist, and bibblock is only allowed in its respective item.This approach has the nice side-effect that it will group together any trailing content from an unknown macro as in
\myitem{Some content}
will now produce a self-contained:Lastly, I think it is worthwhile to quickly open the diff for
LaTeXML.model
here and check the implied cases where ERROR (dis)appeared, as the change from Meta to Misc led to some interesting differences. As just one example -ltx:chapter
used to allow error, but now doesn't, so it auto-opens anltx:para
to host the error instead (for latex such as\chapter{Test}\badmacro
).Here is this PRs visual HTML behavior on the test from #2216 :
Aside: I also tried investigating the
Document::makeError
method that Bruce mentioned in our recent meeting, but it looks like theTAG_PROPERTIES
are consulted quite early - already incomputeIndirectModel
, which gets cached after it is computed once. That seems a little tricky to interfere with and make exceptions forltx:ERROR
? Could be possible of course, but this solution did the trick as well.