[tex4ht] How to get PDF's page numbers in html output? (Accessibility issue)

William F Hammond hammond at csc.albany.edu
Tue Dec 27 00:15:32 CET 2011


> ...
> So, the best option is to keep paragraph numbers instead of page
> numbers as the basis for reference.
>
>> The counter doesn't need to be the pdf page number, but that's an
>> already-existing counter that makes sense.  Whatever counter is
>> used, it must be present in all versions.
> ...

Page numbers are only useful in connection with a specific rigid
printing.  Page numbers change between letter and A4 paper.  They even
changed for given paper size about a decade ago when new pdftex
typesetting algorithms were made part of standard LaTeX.

In a document with sufficiently granular sectioning, section numbers,
which make sense across different formats, should suffice.  For many
documents the numbering of all paragraphs introduces ugliness in print
formattings.

Another approach is for the author to attach symbolic keys -- like
LaTeX \label keys -- to various locations.  For online versions with
suitably intelligent reading software such locations can be accessed
by citing the keys, much as one finds for the questions in the HTML
version of Robin Fairbairns' "UK TUG FAQ".  With non-traditional print
formatting the keys can be made visible at their locations, and with
a pass through something like regular LaTeX or texinfo, it should be
possible to make a paged index of keys.

With a sensible document source language an author should be able to
make satisfactory cross-format arrangements.  (The considerations in
my talk at TUG 2010 on 'LaTeX profiles' are of some relevance here.)

                                    -- Bill



More information about the tex4ht mailing list