I tried to convert multiple .tex files, but I'm having problems with it, I tried htlatex, pandoc, latex2html, but none of them have worked. The one who at least show signs of success was using the command "htlatex" on prompt, but after some time it shows

! Undefined control sequence.
\pgfsys@svg@newline ->\Hnewline

l.190   \pgfusepathqfill}


When I try to type something, it shows:

Type <return> to proceed, S to scroll future error messages,
R to run without stopping, Q to run quietly,
I to insert something, E to edit your file,
1 or ... or 9 to ignore the next 1 to 9 tokens of input,
H for help, X to quit.

But I don't know what I should do.

Notes: It's a main file which call the others with de input command and it is full of math formulas and graphs. I'm using Miktex/texStudio. After that conversion I want to convert again to EPUB, AZW3, etc...

Sorry for my english and Thanks for the help


1 Answer 1


If you want to use tex4ht, don't use the htlatex command, use make4ht instead. It has much more features and fixes some common issues.

The issue you got is a known bug in Tikz which is still not patched unfortunately. The fix is to save the following code as pgfsys-tex4ht-alt.def:

\input pgfsys-tex4ht.def

It needs to be requested in the document using the following code in the preamble?:


Another possibility is to use the TikZ externalization, which is bit more complicated, but the resulting images are best. See this post for details.

  • This solution doesn't work with a tikz cd environment within an equation environment such as\begin{equation} \begin{tikzcd} y(U\cap V) \arrow[rd, "f_y"]\\ U\cap V\subseteq M \arrow[r, "f"] \arrow[d,"x"'] \arrow[u,"y"]& \mathbb{R}.\\ x(U\cap V) \arrow[ru,"f_x= f_y\circ y\circ x^{-1}"'] \end{tikzcd} \end{equation} Nov 26, 2018 at 0:35
  • Do you know how to make such a code work? Nov 26, 2018 at 0:36
  • @IvánMauricioBurbano could you please post it as another question with full compilable document? it should be possible, I hope.
    – michal.h21
    Nov 26, 2018 at 7:52

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.