[tex4ht] TeX4ht upgrading: doesn't work

William F Hammond hammond at csc.albany.edu
Mon Apr 1 22:49:10 CEST 2013

Karl Berry writes in part:

> . . .
> LaTeX3 is not going to be any more "formal" in your sense than LaTeX2e
> is.  Also, LaTeX3 has basically nothing in common with LaTeX2e except
> the people who are developing it, and few if any nontrivial LaTeX2e
> documents will work under LaTeX3.  ...

I believe that there should be no issues with correct LaTeX2E
documents.  The potential rub in this, of course, is that there's
no formal definition of what is a correct LaTeX2E document.

We are speaking about user-level documents rather than code for
packages and classes.

One definition is that a document is correct if it runs noiselessly
through latex and the typeset result is nominally correct.  Call this
definition 1.  So, for example, by this definition a document that is
otherwise normative but contains the markup "$f(x$)" is a correct
document inasmuch as only a microscopic examination of the typeset
output will show that the closing parenthesis is misplaced.

Definition 2 is that a document is correct if it meets definition 1
and if (a) it runs through htlatex noiselessly and the resulting html
is valid and (b) likewise for the command mk4ht with argument
xhmlatex.  The example cited above will not be correct for definition
2 because condition (b) will (and should) fail.

The following document based on Knuth's "story.tex" is, I think,
quite dubious as a LaTeX document, but it seems to meet definition 2:

\vskip 1in
\centerline{\bf A SHORT STORY}
\vskip 6pt
\centerline{\sl    by A. U. Thor} % !`?`?! (modified)
\vskip .5cm
Once upon a time, in a distant
  galaxy called \"O\"o\c c,
there lived a computer
named R.~J. Drofnats.

Mr.~Drofnats---or ``R. J.,'' as
he preferred to be called---% error has been fixed!
was happiest when he was at work
typesetting beautiful documents.
\vskip 1in

My understanding is that one can check the survivability
of a current LaTeX document as a Latex3 document by
entering "\usepackage{expl3}" after the \documentclass

The "story" example seems to run fine that way, and, in fact,
since Karl posted his comment I've yet to find an example
that fails with expl3 loaded.  Am I missing something?

All of this said, I do advocate the development of various
formal language definitions for LaTeX, independent of any
typesetting or translation process, based on the notion of
"LaTeX profile",

                                    -- Bill

More information about the tex4ht mailing list