Add/ensure ToC includes abstract, acknowledgements, bibliography#2746
Add/ensure ToC includes abstract, acknowledgements, bibliography#2746dginev wants to merge 5 commits intobrucemiller:masterfrom
Conversation
|
Update: I have returned |
|
Wow, there's a lot of diff noise here. Of course, if abstract is going be a valid target, it's going to need an However, if we're going to have the navigation TOC include more or different elements than the standard LaTeX TOC, then I guess we're stuck doing one of two things: We could modify |
|
My memory is:
$self->registerHandler('ltx:acknowledgements' => \&ack_handler);I don't really have an appetite for a larger refactor right now, and this code has already been deployed on our end, so this can idle until we have a path forward. |
|
* we agreed to back off the changes to |\tableofcontents| so that the
original LaTeX behavior is undisturbed
Good. Except that the PR as it stand *is* disturbing the latex behavior.
|
|
Which LaTeX behavior ? |
|
Now |
|
This ought to be easy, and almost everything is there to do it, except for a "clean" design hook. We should not be adding |
|
If you could name the mechanisms you think are capable of achieving this simply, I could try and verify the suggestion. |
|
It's kinda speculative, ATM, without some experimentation. I'm thinking we should rely more on schema data than explicit lists of elements. Something like all the elements in |
…rmaltoctypes instead
|
I have tried to remove the newly added |
lib/LaTeXML/Post/CrossRef.pm
Outdated
| # To make it more extensible, it really should be integrated into the database? | ||
| # Eg. "sectional" things might mark their entries specially? | ||
| my $normaltoctypes = { map { ($_ => 1) } # CONSTANT | ||
| qw (ltx:document ltx:abstract ltx:part ltx:chapter |
There was a problem hiding this comment.
adding ltx:document here includes the document title. So I either need a separate $contexttoctypes for --navtoc=context, or I can exclude it here. I suspect it is used somewhere else, just not sure where...
|
In the call today we agreed this can wait for mainline support and can be approached differently, with a potentially larger refactor that also includes dynamic navtoc element selection based on the schema. |
A working concept for resolving #2316 .
This PR attempts consistency with the current handlers in CrossRef and Scan post-processors, trying to ensure
inlist="toc"is set onltx:abstract,ltx:acknowledgements,ltx:bibliography. And that those elements are included and used in the TOC filling algorithms (also requiring a setxml:id).Tag()technique.To my surprise this leads to a schema change as well, allowing
Labelled.attributes.What is less surprising is that such a change leads to a very large diff in the tests. If nothing else, that change is very uniform.
Feedback most welcome.