According to tug.org TeX4ht can be used with Plain TeX. I've tried the commands listed in the site above, but nothing works! All I can have is a simple text file, with .html extension, but without any HTML tag.

What is the correct way to convert a Plain TeX file into HTML?

  • Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you.
    – egreg
    Jan 4, 2012 at 10:26
  • Hello @egreg!. Nice to meet you here.
    – Sam Qasbah
    Jan 4, 2012 at 10:30
  • Let's try and see if someone here is able to help.
    – egreg
    Jan 4, 2012 at 10:32
  • Hmm, htlatex is working as expected. Maybe some bug?
    – someonr
    Jan 4, 2012 at 11:04
  • 1
    @someonr: I don't know what htlatex is. As you can read in the link I enclosed, and as I said three times in my message (once in the title), I was speaking about Plain TeX. Thanks for your comment anyway.
    – Sam Qasbah
    Jan 4, 2012 at 11:23

1 Answer 1


edit: I've created simple package for Plain support in tex4ht. Basically it defines commands needed by tex4ht to insert basic document hooks:

% file plain-4ht.tex
\csname tex4ht\endcsname
\def\enddocument{\csname bye\endcsname}

Now you can just use:

\input plain-4ht.tex

Some text.

What is still a issue is support for accented characters.

Original post:

According to CVR's blog, you need to enclose your document with these commands:

\input amstex
 \csname tex4ht\endcsname

 . . . source of your plain TeX document . . .


and compile with

httex file "xhtml,html4.4ht,unicode.4ht,mathml.4ht"

Following sample works for me:

 \input amstex
 \csname tex4ht\endcsname

{\bf What} about the {\it formatting}

The quadratic formula is $-b \pm \sqrt{b^2 - 4ac} \over 2a$

P\v{r}\'ili\v{s} \v{z}lu\v{t}ou\v{c}k\'y ku\v{n} \'up\v{e}l \v{d}\'abelsk\'e \'ody

I am not plain TeX user and don't know what is the plain version of the inputenc, so instead of utf-8 characters I used control sequences for the diacritics.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .