1

I have using TeXLive 2023 Windows and when running make4ht -ux -m draft -a debug filename.tex make4ht is not working and system is hanging. My MWE is:

\documentclass[utf8]{FrontiersinHarvard} 
\usepackage{url,hyperref,lineno,microtype,subcaption,algorithmic,algorithm}
\usepackage[onehalfspacing]{setspace}
\DeclareMathOperator*{\argmax}{argmax}
\DeclareMathOperator*{\argmin}{argmin}
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem} 
\newtheorem{lemma}{Lemma}
\renewcommand{\algorithmiccomment}[1]{\bgroup\hfill~#1\egroup}
\newcommand\scalemath[2]{\scalebox{#1}{\mbox{\ensuremath{\displaystyle #2}}}}
\def\keyFont{\fontsize{9}{11}\helveticabold }
\def\firstAuthorLast{} %use et al only if is more than 1 author
\def\Authors{Yu Zhu\,$^{*}$ and Santiago Segarra}
\def\Address{Department of Electrical and Computer Engineering, Rice University, Houston, TX, United States}
\def\corrAuthor{Yu Zhu}
\def\corrEmail{[email protected]}
\begin{document}
\onecolumn
\firstpage{1}
\title[Hypergraphs with Vertex Weights]{Hypergraphs with Vertex Weights: $p$-Laplacians Clustering} 
\author[\firstAuthorLast ]{\Authors} %This field will be automatically populated
\address{} %This field will be automatically populated
\correspondance{} %This field will be automatically populated
\extraAuth{}
\maketitle

\begin{abstract}
We study world data demonstrate the effectiveness of combining spectral clustering based on the $1$-Laplacian and EDVW.

\keyFont{ \textbf{Keywords:} hypergraphs, $p$-Laplacian, clustering, edge-dependent weights}
\end{abstract}

\section{Introduction}\label{s1:intro}
Spectral clustering makes use of eigenvalues and eigenvectors of graph Laplacians to group vertices in a graph.

\end{document}

LaTeX Template is available https://www.frontiersin.org/design/zip/Frontiers_LaTeX_Templates.zip

2
  • 1
    having \section{Keywords:} inside a {} group inside an abstract environment is very unusual markup, it's not surprising if some convertors have difficulty with that. Apr 23, 2023 at 17:11
  • @DavidCarlisle: I have modified the question.
    – Balaji
    Apr 24, 2023 at 12:30

1 Answer 1

1

The problem here is with the custom class, which doesn't load any standard class, but defines sections, titles, and all other elements manually. Custom classes usually load Article or Book internally, and redefine only elements related to the document design. In this way, TeX4ht can still insert basic HTML tags even if it doesn't support the custom class itself.

Fortunately, I've found that you can still load TeX4ht definitions for Article to get the basic tags. You only need to redefine some commands that cause problems. Here is the FrontiersinHarvard.4ht file:

\ifdefined\listoffigures\else\def\listoffigures{\relax}\fi
\ifdefined\listoftables\else\def\listoftables{\relax}\fi

\def\section{%
  \@startsection{section}{1}{\z@}
  {-10\p@ plus -3\p@}{3\p@}
  {\reset@font\raggedright\helveticabold\fontsize{13}{13}\color{black}\selectfont}}
\renewenvironment{subfigure}{\ifsub@@figure\global\sub@@figurefalse\stepcounter{figure}\fi%
 \@float{subfigure}}{\end@float}
\renewenvironment{subfigure*}{\ifsub@@figure\global\sub@@figurefalse\stepcounter{figure}\fi%
 \@float{subfigure}}{\end@float}

\input article.4ht

I had to fix several problems: \listoftables and \listoffigures are not defined by FrontiersinHarvard.cls but redefined in article.4ht, so we need to declare a dummy version of this command to prevent runtime error. I also had to fix the \section command because the version from the class caused an infinite loop. I also had to add the subfigure and subfigure* environments; these caused errors too.

With this file, you can compile your file:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .