<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello, everyone!</p>
    <p>I am trying to convert some .tex files to .html files (I am
      hoping to automate this process over the next view days as part of
      a pipeline), and I ran into a couple of problems doing so. The
      documentation I found assumes that these problems don't happen,
      and everything I found so far wasn't able to solve these problems,
      so I decided I'd just ask for it here directly.</p>
    <p>The tex file I am trying to convert can be found here
(<a class="moz-txt-link-freetext" href="https://raw.githubusercontent.com/phseiff/gender-render/main/docs/spec.tex">https://raw.githubusercontent.com/phseiff/gender-render/main/docs/spec.tex</a>),
      and the command I am using to convert it is `htlatex spec`.</p>
    <ul>
      <li>Running `pdflatex spec.tex` works fine, so the files validity
        as a LaTeX file is probably not the issue, but `htlatex` chokes
        on it several times (fails with a `?` and reruns again once I
        enter `q` and press enter, for a total of 3 runs).</li>
    </ul>
    <ul>
      <li>The process ends with `System call: rungs -q -dNOPAUSE -dBATCH
        -sDEVICE=pngalpha -r300  -sOutputFile='images/title-black-.png'
        images/title-black.pdf`. This is apparently because I embed a
        .pdf-file into the tex file via `\includegraphics`, which
        htlatex attempts to convert to png using a tool called rungs,
        but googling `rungs` yields no results except some posts of
        people who ran into the same problem I did, like this
        (<a class="moz-txt-link-freetext" href="https://github.com/michal-h21/tex4ebook/issues/50">https://github.com/michal-h21/tex4ebook/issues/50</a>), but neither
        am I using xelatex, nor did the fix suggested in this thread fix
        my problem. Could it be I am using an old version of htlatex, or
        that it doesn't work as intended on Ubuntu 18.04? I can probably
        work around this issue, though, by extracting the error message
        and running imagemagick on the image in question.</li>
    </ul>
    <ul>
      <li>The resulting html file does not have any table of contents.
        The tex file uses the `\tableofcontents`-command, which,
        according to the documentation I found, is supported by htlatex,
        yet nothing but the "Content"-heading is created for it. I found
        some posts on tex.stackexchange.com suggesting that it is
        because I used `\setcounter{tocdepth}` and/or
        `\usepackage{titlesec}`, but nothing more specific than that or
        how to fix it.</li>
    </ul>
    <ul>
      <li>`\multicolumn`s don't appear to work, and their content
        appears on top of the tale rather than within it. This is the
        same issue documented here
        (<a class="moz-txt-link-freetext" href="https://comp.text.tex.narkive.com/QYwBaL9w/tex4ht-multicolumn">https://comp.text.tex.narkive.com/QYwBaL9w/tex4ht-multicolumn</a>),
        but compiling multiple times like the post suggests doesn't fix
        it for me.</li>
    </ul>
    <p>I would be very happy if you could help me out with at least some
      of these problems, or tell me how to solve them on my own.<br>
    </p>
  </body>
</html>