[tex4ht] [bug #435] tex4ht: Creates invalid html document when using \AtBeginDocument

Michal Hoftich michal.h21 at gmail.com
Wed Aug 14 10:06:40 CEST 2019

Follow-up Comment #1, bug #435 (project tex4ht):

The `\AtBeginDocument` command is usually used to redefine macros and
initialize stuff. This use works. What is the issue in this case is that it
includes a text in the document. As tex4ht outputs the HTML header at this
moment as well, it happens that the text goes  before HTML.

I don't think we can fix that easily, as we want the code usually executed in
`\AtBeginDocument` to be executed before any output is written. In this
particular case, I would advice to edit the document:



\title{Minimal example}
Test body.

The `\outputbegin` command can then be redefined for tex4ht in a custom config


The redefinition uses the `\Configure{@BODY}` command that will output the
text after the `<body>` tag.


Reply to this item at:


  Message sent via/by Puszcza

More information about the tex4ht mailing list