ds26gte / tex2page

Other
29 stars 2 forks source link

Feature request: generate LC_ALL=C sortable links #5

Open ghost opened 4 years ago

ghost commented 4 years ago

A the moment, tex2page generates subpages that are numbered like this:

 index-Z-H-1.html
 index-Z-H-10.html
 index-Z-H-11.html
 index-Z-H-2.html
 index-Z-H-3.html
 index-Z-H-4.html
 index-Z-H-5.html
 index-Z-H-6.html
 index-Z-H-7.html
 index-Z-H-8.html
 index-Z-H-9.html

Would it be possible to generate sortable links/files?

 index-Z-H-01.html
 index-Z-H-02.html
 index-Z-H-03.html
 index-Z-H-04.html
 index-Z-H-05.html
 index-Z-H-06.html
 index-Z-H-07.html
 index-Z-H-08.html
 index-Z-H-09.html
 index-Z-H-10.html
 index-Z-H-11.html
ds26gte commented 4 years ago

While this would be nice, some folks may already be hardwiring the URLs of the chapters in other web pages, so changing it now would cause info misdirection.

ghost commented 4 years ago

But it wouldn't affect any already generated documents, would it? I think it is very hard to maintain links before recompilation any way, as recompilation happens after editing, i.e. when new sections, so the links change any way.

lassik commented 1 year ago

But it wouldn't affect any already generated documents, would it?

It would affect regenerated copies of the same documents. Backward compatibility is important.

I think it is very hard to maintain links before recompilation any way, as recompilation happens after editing, i.e. when new sections, so the links change any way.

Depends on where the document is split. By default the splitting seems to be "one file per chapter", which is nice.

I agree that the filenames could be nicer (perhaps customizable for new documents that don't require backward compat).

It would be great if the current r7rs-Z-H-5.html#TAG:__tex2page_sec_3.2 could be e.g. r7rs/chapter3.html#disjointness-of-types. I don't know how easy it is to infer the chapter boundaries and extract the headings from TeX. If it's real messy, probably not worth the effort.