Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

htlatex and MacTeX

51 views
Skip to first unread message

t...@tsdye.com

unread,
Apr 9, 2008, 8:37:00 PM4/9/08
to
Aloha all,

Apologies for a newbie question. I have a MacTeX installation
(TeXLive 2007). Running htlatex test.tex on a simple test file fails
like this:

...
Output written on test.pdf (26 pages, 76552 bytes).
Transcript written on test.log.
----------------------------
tex4ht.c (2006-09-13-14:27 kpathsea)
tex4ht dirchar
test.tex
-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/
--- warning --- Problem with command line
--- error --- Can't find/open file `test.dvi'
----------------------------
t4ht.c (2007-01-05-03:17 kpathsea)
t4ht dirchar
test.tex
(/usr/local/texlive/2007/texmf-dist/tex4ht/base/unix/tex4ht.env)
--- warning --- Can't find/open file `test.lg'

I know that tex4ht extracts magic from the dvi file, but one isn't
created by the call to htlatex, apparently.

Any help much appreciated.

Tom

vvvv

unread,
Apr 9, 2008, 9:48:09 PM4/9/08
to
You compiled the document using pdflatex instead of plain latex. Use
the program called "latex" not "pdflatex".

If you use the hyperref package, be sure to add the tex4ht option:
\usepackage[tex4ht]{hyperref}

If you still have problems. Post the file that you are trying to
compile in addition to the messages that you posted above.

td

unread,
Apr 9, 2008, 10:39:43 PM4/9/08
to

It appears that htlatex called one of the latex programs so that it
produced pdf instead of dvi. From what I've read, pdftex is able to
produce pdf and dvi, so perhaps htlatex is calling this program in the
wrong way? My MacTeX installation is brand new, so I doubt I've
tinkered with anything that would have broken how htlatex works.

vvvv

unread,
Apr 9, 2008, 11:36:55 PM4/9/08
to
First you create a .dvi file using the latex program (not the pdflatex
program). Yes, these program link to the pdftex program, but when you
call it by different names it invokes different run-time options.
After you have a .dvi file, then you run something like:

htlatex generic "xhtml,oofice" -cmozhtf -coo

I then copy the css and html to the web SERVER and view from the
server so that the css is used (maybe there are also ways to view it
as a file, but it didn't work for me).

Ulrike Fischer

unread,
Apr 10, 2008, 2:52:19 AM4/10/08
to

Perhaps your document is at fault:
It is possible to change the output from dvi to pdf in a document by
changing the value of \pdfoutput. A faulty \ifpdf-test e.g. can do it
inadvertendly.

Try htlatex with a small document:
\documentclass{article}
\begin{document}
hello word
\end{document}

If this work, check your document.

--
Ulrike Fischer

vvvv

unread,
Apr 10, 2008, 8:21:44 AM4/10/08
to

> After you have a .dvi file, then you run something like:
>
> htlatex generic "xhtml,oofice" -cmozhtf -coo
>

where "generic" is the name of the document. These are the options
that I have been using, I don't even remember what they mean, but my
documents compile properly into a .css (cascading style sheet) file
and an .html file.

td

unread,
Apr 10, 2008, 4:23:04 PM4/10/08
to

Yes, this was the problem. The small hello world document with a
standard article class generated html and css, as advertised.

Now, I need to figure out where in my class style file, based on
memoir, the pdf output is being triggered. Unfortunately, I know too
little TeX to make much headway.

I do check in a couple of places for pdf output, like this:

\ifx\pdftexversion\undefined
\RequirePackage[dvips]{graphicx}
\else
\RequirePackage[pdftex]{graphicx}
\pdfimageresolution=600
\pdfcompresslevel=9
\fi

Any pointers you might give me will be much appreciated. I'd like to
end up with a class style file that produces the fine pdf output I've
come to expect (including microtype justification) and html.

All the best,
Tom

Ulrike Fischer

unread,
Apr 10, 2008, 4:52:20 PM4/10/08
to
Am Thu, 10 Apr 2008 13:23:04 -0700 (PDT) schrieb td:

> I do check in a couple of places for pdf output, like this:
>
> \ifx\pdftexversion\undefined
> \RequirePackage[dvips]{graphicx}
> \else
> \RequirePackage[pdftex]{graphicx}
> \pdfimageresolution=600
> \pdfcompresslevel=9
> \fi

Use the ifpdf-package instead of this tests.


--
Ulrike Fischer

td

unread,
Apr 10, 2008, 5:16:49 PM4/10/08
to

Many thanks for your expert help in this matter. I'm looking at an
html version of my test.tex document and feeling pleased.

All the best,
Tom

td

unread,
Apr 11, 2008, 12:02:40 AM4/11/08
to
On Apr 9, 3:48 pm, vvvv <vnes...@gmail.com> wrote:

Thank you for the advice on the hyperref package. I've put it in my
style file and all is well.

All the best,
Tom

0 new messages