I'm trying to generate a svg image of a reaction mechanism. However I keep receiving the error:
! Undefined control sequence.
\pgfsys@svg@newline ->\Hnewline
when running the command make4ht -u "Bromothymol_blue".tex
where Bromothymol_blue
is the name of the latex document. Here is the code:
\documentclass{article}
\thispagestyle{empty}
\usepackage{chemfig}
\usepackage{mol2chemfig}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mhchem}
\usepackage{tex4ht}
\begin{document}
\schemestart
\chemname{\tiny\chemfig{-[:160]-[:100](-[:40]Br)(-[:220,,,,draw=none]\mcfcringle{1.3})-[:160](-[:100,,,1]OH)-[:220](-[:160](-[:100])-[:220])-[:280]-[:340](-[:40])-[:280]@{C}(-[:204]-[:274](-[:154,,,,draw=none]\mcfcringle{1.3})-[:214](-[:274](-[:214])-[:334])-[:154](-[:214,,,2]HO)-[:94](-[:154]Br)-[:34](-[:94])-[:334])-[:288]-[:240](-[:0,,,,draw=none]\mcfcringle{1.3})-[:300]--[:60]-[:120](-[:180])-[:72]S(=[:336]O)(=[:60]O)-[:144]O(-[:216])}}{Yellow}
\begin{tikzpicture}[overlay,remember picture]
\draw[red](C) circle (0.1) +(120:0.1) ..controls +(120:0.5) and +(0:0.5).. +(155:2) node[left,align=right] {Conjugation\\stops\\here};
\end{tikzpicture}
\arrow{<=>[\small\ce{+OH-}][\small\ce{H+},\;\ce{H2O}]}
\chemname{\tiny\chemfig{
% 15
-[:300]% 14
(
-[::60]% 16
)
-[::300]% 12
-[::300]% 11
(
-[::300]\mcfright{O}{^{\mcfminus}}% 17
)
-[::60]% 10
(
-[::300]Br% 18
)
-[::60]% 9
(
-[::300]% 19
)
-[::60]% 8
(
-[::60]% 13
-[::60]% -> 12
)
(
-[::120,,,,draw=none]\mcfcringle{1.3}% (o)
)
-[::300]% 7
(
-[::70]% 20
-[::320]% 21
(
-[::310]S% 26
(
-[::110]\mcfright{O}{^{\mcfminus}}% 28
)
(
=[::50]O% 29
)
=[::350]O% 27
)
(
-[::120,,,,draw=none]\mcfcringle{1.3}% (o)
)
-[::60]% 22
-[::60]% 23
-[::60]% 24
-[::60]% 25
-[::60]% -> 20
)
=[::300]% 6
-[::60]% 1
(
-[::60]% 35
)
-[::300,,,,drh]% 2
(
-[::60]Br% 34
)
-[::300]% 3
(
=[::60]O% 33
)
-[::300]% 4
(
-[::300,,,,drh]% 5
-[::300]% -> 6
)
-[::60]% 30
(
-[::300]% 31
)
-[::60]% 32
}}{Blue}
\schemestop
\end{document}
I tried to follow the solution from Latex to HTML conversion (basic explanation). I use TeXstudio and used the user command make4ht -u %.tex
Please note that I know the code works with pdftlatex and that is not what I am trying to do. I am trying to generate a html output with an svg using tex4ht. Also I am quite new to this so please try and explain as much as possible in your answer. Thanks!