I need to convert a series of latex documents to a single html file. I would like to know how to install the htlatex program on fedora 31. I tried to install the tex4ht package without being able to. The latex2html program is not compatible with my latex codes.
[Tex/LaTex] install htlatex
htlatexhtmltex4ht
Related Solutions
Following code will help you to grab the width and height dimensions of the graphic provided with your \includegraphics
command:
\makeatletter
\Configure{graphics}
{\bgroup
\Configure{IMG}
{\HCode{<img src="}}
{\HCode{" alt="}}
{" }
{\HCode{" }}
{}%
\Picture+[PIC]{}}
{\EndPicture
\HCode{ width="\expandafter\the\csname Gin@req@width\endcsname"
height="\expandafter\the\csname Gin@req@height\endcsname"
/>}%
\egroup}
\makeatother
I had success at opening your document with Word 2010. First of all, I converted document to odt
format. Because you don't have mk4ht
command available, you need to use following htlatex
call:
htlatex test.tex "xhtml,ooffice" "ooffice/! -cmozhtf" "-cooxtpipes -coo"
all these parameters are necessary, they are used in postprocessing of the xml
file with document.
When I tried to open resulting document with Word 2010
, only crossed gray boxes were shown in the place of math. Then I tried to open and then save test.odt
with OpenOffice
(3.2) and LibreOffice
(3.6). In both cases, saved file was much almost twice as big. Document saved in OpenOffice
was opened without problems in Word
, document saved in LibreOffice
reported incorrect content, but then Word
asked if I want to repair it and then opened it correctly as well.
I took a look at odt
files saved from Open/LibreOfficess
and it seems that math was extracted from the main document and it each math fragment was saved in standalone file with some additional metadata. While Open/LibreOffice
is fine with odt
files produced by tex4ht
, word obviously isn't and its odt
support needs to have math in particular format. I don't know whether this behaviour shows also current Word
version and it is probably a bug in odt
support in Word
, but I don't know odt
standard well enough to judge that. If your Word
doesn't support math in odt
files produced by tex4ht
try to open and save it with OpenOffice
.
Best Answer
I use Fedora myself, but I don't use TeX Live provided by Fedora packaging. I use vanilla TeX Live from the TUG website, as it always gets the updates. Anyway, I can see that there are following packages in Fedora repositories:
I am sure you will need also other packages from TeX Live, especially for LuaTeX. They should be installed as dependencies hopefully.
I am also sure you don't want to use
htlatex
, this command is obsolete. Usemake4ht
instead. Here is the documentation with reasons why you should use it.