{"id":115,"date":"2010-08-21T16:08:54","date_gmt":"2010-08-21T10:38:54","guid":{"rendered":"http:\/\/www.cvr.cc\/?p=115"},"modified":"2010-08-21T16:08:54","modified_gmt":"2010-08-21T10:38:54","slug":"plain-tex-and-tex4ht","status":"publish","type":"post","link":"http:\/\/cvr.cc\/?p=115","title":{"rendered":"Plain TeX and TeX4ht"},"content":{"rendered":"<p>\nIf you try to generate <code class=verbatim>html<\/code> version of your plain T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X document using a combination of pdfT<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X and T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X4ht, you will find terrible mismatches and <code class=verbatim>html<\/code> version will not be generated. <!--more--> The reason for the problem is T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X4ht needs a <code class=verbatim>dvi<\/code> output from which it extracts the html while pdfT<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X generates a <code class=verbatim>pdf<\/code> by default. Therefore, T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X4ht post-processor will cry that there is no <code class=verbatim>jobname.dvi<\/code>. However,\n<\/p>\n<pre> ht 'pdftex -output-format=dvi' bk7.tex\n<\/pre>\n<p>\nwill work. But the <code class=verbatim>html<\/code> file will have only the <small>A<\/small><small>S<\/small><small>C<\/small><small>I<\/small><small>I<\/small> characters of your document and will not be valid <code class=verbatim>html<\/code>. To make a valid <code class=verbatim>html<\/code> from a plain T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X file, you have to do the following trick.<\/p>\n<p>\nYou need to wrap up your T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X source file with following code:\n<\/p>\n<pre>\n \\input amstex  \n \\documentstyle{amsppt}\n \\csname tex4ht\\endcsname\n \\document\n\n . . . source of your plain TeX document . . .\n\n \\enddocument<\/pre>\n<p>\nThe following command might be handy to generate <code class=verbatim>file.html<\/code> assuming your input file name is <code class=verbatim>file.tex<\/code>:\n<\/p>\n<pre> httex file &quot;xhtml,html4.4ht,unicode.4ht,mathml.4ht&quot;\n<\/pre>\n<p>\nPlain T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X users might miss this trick when they happen to use T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X4ht which is supposed to work out of box in the case of L<span style=\"position: relative; bottom: 0.3ex; margin-left: -0.36em; margin-right: -0.15em; text-transform: uppercase\"><small>a<\/small><\/span>T<span style=\"position: relative; top: 0.5ex; margin-left: -0.1667em; margin-right: -0.125em; text-transform: uppercase\">e<\/span>X documents.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you try to generate html version of your plain TeX document using a combination of pdfTeX and TeX4ht, you will find terrible mismatches and html version will not be generated.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,16],"tags":[],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-tex","category-tex4ht"],"_links":{"self":[{"href":"http:\/\/cvr.cc\/index.php?rest_route=\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cvr.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cvr.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cvr.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cvr.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=115"}],"version-history":[{"count":0,"href":"http:\/\/cvr.cc\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions"}],"wp:attachment":[{"href":"http:\/\/cvr.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cvr.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cvr.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}