In my case, there is no trouble with having `\document` and `\enddocument`
explicitly in the document, nor to add commands in preamble, as the
files are automatically generated and should only be run through tex4ht
scripts, never directly through TeX.

OK, in this case you can just add definitions from plain-4ht.tex to your document.

With this in preamble and the use of \document and \enddocument,
the output is as intented, both the insertion of raw html and
the formatting.  Thanks!


That's good to hear!

What would be the equivalent for httexi?  Is it the same?


In httex the tex calls are like

tex  $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname 
tex4ht\endcsname{#1,html}\input tex4ht.sty 
}}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode
 '$2'.a.b.c.\input ' $1

In addition to calling etex, is that needed or should it be
replaced by inlined plain-4ht.tex?

As a side note the tex calls in httexi are not exactly the same as in
httex:

tex  $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname 
tex4ht\endcsname{#1,html}\input tex4ht.sty 
}}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0
 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode 
'$2'.a.b.c.\input ' $1


The only necessary change should be the call to etex, as we use some commands that it defines (I think \ifdefined, \detokenize and maybe others).

Best regards,
Michal

Reply via email to