bdtc / lwarp

The LaTeX lwarp package — Convert LaTeX to HTML.
https://ctan.org/pkg/lwarp
31 stars 0 forks source link

Avoid duplicates for named HTML files #5

Closed bdtc closed 6 months ago

bdtc commented 7 months ago

If generating named HTML files, where the names come from the section names, currently these names must be unique to avoid file name clashes.

Add a number to the file name to generate unique HTML files to allow section names to be reused several times in the document. This can be the same sequential number which would be used for numbered files. This would result in files such as Name-35.html, Name-67.html, Name-134.html, etc.

If this sequential number is used, it will shift as new sections are inserted or deleted from the document, leaving a cluttered file space and orphaned files to be cleaned up. Incoming references from outside may break.

The manual method mentioned in the following link has the advantage that broken incoming links may be avoided if care is used not to change the names.

from tex.stackexchange

bdtc commented 6 months ago

v0.916 will allow duplicate section names, and append a unique file number to the resulting file name to avoid duplicate file names. A warning shall be issued when this occurs.

bdtc commented 6 months ago

Done in v0.916.