1

When I us PDFLaTeX it's compiling fine. I would like to convert LaTeX to HTML using Make4ht but it's showing an error.

My MWE is:

\providecommand{\pgfsyspdfmark}[3]{}
\documentclass{acm-book}

\usepackage{showframe}
\usepackage{balance}
\usepackage{amsmath}
\usepackage{booktabs,hyperref,listings,xcolor,colortbl}
\usepackage[inactive]{fancytooltips}
\usepackage{wrapfig}
\usepackage{afterpage}
\usepackage{makeidx}

\hypersetup{
pdftitle={A Technical History},
pdfauthor={W. Trcy -- Rose-Hulman, IN, USA},
pdfkeywords={Morgan \& Claypool},%
}

\newcommand\BookSeries[1]{#1}
\newcommand\BookAffil[1]{#1}
\newcommand\HalfTitle[1]{#1}
\newcommand\Author[1]{#1}
\newcommand\Affiliation[1]{#1}
\definecolor{titlecolor}{cmyk}{0, 0.7808, 0.4429, 0.1412}

\makeindex
\begin{document}

\chapter*{Preface}

Furthermore, legacy software systems are notoriously difficult to replace. As noted experienced by this author as a chief information officer, legacy systems take considerable effort and money to replace and tend to be built upon, rather than replaced. So, those working on systems for complex organizations are likely to have to deal with these existing software systems. US Social Security Administration still dependencies on legacy software further entrenches its use. Other systems used by the US government have software sub-systems.

\begin{quote}
But we [historians] remain largely ignorant about the origins and development of the dynamic processes running on those devices [computers], but primarily they will be histories of software.
\end{quote}

In the last couple of decades, software has gotten attention as a distinct topic from computer history. In particular there are wide-scoping works on the software industry. There's also been work on the evolved.

Software\index{Software|(} is a relatively recent technology, really only beginning in its own right in the 1950s. In the time since then, it's taken many forms, evolved immensely in the tools used, and in the purposes to which it has been put. Interestingly, software has become so varied and so complex that many current students of technology do not have a basic knowledge of the history of software. As a result, students and practitioners are sometimes repeating mistakes of the past and often relearning how to build successful systems. Additionally, some areas of software require a working knowledge of previously deployed software systems and their design decisions, such as software security\index{Software!security}. When reusing existing software, it is wise to evaluate the relevance of the techniques and assumptions that were used in building that original software. This book focuses on software as a technology and how it has evolved over time. We will look at the trends, important innovations, and events, as well as the ever-broadening world of software.

\printindex

\end{document}

EDIT1:

I have updated as per michal answered, but it's still showing error. MakeIndex Showing Error Image is:

Make4ht Screenshot Error

3
  • TeX4ht will works for standard class files like book, article, etc. Used acm-book was a customized one, so you have to write the .4ht for acm-book.cls
    – MadyYuvi
    Jun 16 at 3:57
  • so is the question about makeindex, or about acm-book? it is better to make a real MWE, that doesn't show unrelated issues. if you have multiple issues, make multiple questions. this way is much harder for me to answer.
    – michal.h21
    Jun 16 at 7:52
  • @michal.h21: This question is about only makeindex need to work in acm-book latex template. How to do it?
    – Balaji
    Jun 16 at 7:53

1 Answer 1

2

TeX4ht needs extra command in make4ht build file to support indexing. See the documentation. The basic build file with indexing support can look like this:

if mode=="draft" then
  Make:htlatex {}
else
  Make:htlatex {}
  Make:makeindex {}
  Make:htlatex{}
  Make:htlatex{}
end
  

You can then compile your file using

make4ht -e build.lua filename.tex

There are also other options in place of Make:makeindex{}, for instance Make:xindex{}, which uses Xindex, modern replacement for Makeindex.

Regarding your error, it was fixed in TeX4ht sources. The fixed latex.4ht file is too large to get posted here, but you can update your TeX Live distro, and it should work then.

This is the result:

enter image description here

13
  • I have modified as per your instruction and still it's showing error. I have updated the Screenshot Picture . Please check and advise.
    – Balaji
    Jun 16 at 19:12
  • @Balaji I cannot reproduce your error. try to put this version of latex.4ht to the directory with your document, to see if it helps.
    – michal.h21
    Jun 16 at 20:29
  • Thanks, now its working fine.
    – Balaji
    Jun 17 at 5:28
  • When I have used \index in the figure captions \caption it's showing error. For Example: \begin{figure}[!h] {\includegraphics{Figure_19.pdf}} \caption{\label{fig:1.19}The Atanasoff--Berry Computer (ABC) with a drum memory\index{Atanasoff--Berry Computer (ABC)!drum memory@with drum memory} (circa 1942). (Source: Iowa State Univ. Library Special Collections and Univ. Archives.)} \end{figure}. How to rectify this? Thanks for your support...
    – Balaji
    Jun 19 at 12:14
  • @balaji sorry for my previous comment, I thought that your comment was under the JATS post. I was quite tired yesterday. I will look at this issue.
    – michal.h21
    Jun 21 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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