chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
29 stars 4 forks source link

PDF URLs for extracted sections of a document go wrong after the first part #204

Closed christianp closed 8 months ago

christianp commented 9 months ago

I have a large document with lots of parts, split at the section level. The PDF URLs for the extracted section items are incorrect - they seem to use the PDFs from the first part, no matter which part they're really in.

I guess that this is a Python scope problem.

christianp commented 9 months ago

I was wrong! The thing that parses the TOC from pdflatex just doesn't think about parts.

christianp commented 9 months ago

I was wrong twice! The problem is that plasTeX resets the chapter counter when there's a new part.

christianp commented 9 months ago

This was fixed in 2020: https://github.com/plastex/plastex/commit/9aa0aece794b690cfb52e796f3a45b6e73c8aa83.

At the moment chirun depends on plasTeX 2.1, which was tagged in 2019. The next tagged release is 3.0, which has some breaking changes but we should really start using. For now, I wonder if we can get away with using that exact commit.

christianp commented 8 months ago

Chirun now uses plasTeX 3, and this is fixed.