Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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 '12 at 10:26
    
Hello @egreg!. Nice to meet you here. –  Sam Qasbah Jan 4 '12 at 10:30
    
Let's try and see if someone here is able to help. –  egreg Jan 4 '12 at 10:32
    
Hmm, htlatex is working as expected. Maybe some bug? –  someonr Jan 4 '12 at 11:04
    
@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 '12 at 11:23
show 1 more comment

1 Answer

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

\input amstex
 \documentstyle{amsppt}
 \csname tex4ht\endcsname
 \document

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

 \enddocument

and compile with

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

Following sample works for me:

 \input amstex
 \documentstyle{amsppt}
 \csname tex4ht\endcsname
 \document

{\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
 \enddocument\bye

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.