在 Centos 中无法将 tex 文件转换为 html

在 Centos 中无法将 tex 文件转换为 html

我有这个 tex 文件:test.tex

\documentclass{report}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}
\draw(0,0)--(1,0)--(0.5,2)--(0,0);
\draw(0,0)circle(1.2);
\end{tikzpicture}
\end{center}
\end{document}

我需要生成html,因此在 Windows 中执行:htlatex test.tex并且它可以工作。现在我想在 Centos 机器上执行同样的事情。

我尝试了几个命令。我试过:

htlatex test.tex

但失败了:

(/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65
.sty
! Undefined control sequence.
\pgfsys@svg@newline ->\Hnewline

l.190   \pgfusepathqfill}

我试过:

mk4ht test.tex "html"

它失败:

mk4ht (Version 1.1)
improper command: test.tex
 option1:  mk4ht #1 "#2" "#3" "#4" "#5"

    #1: htlatex, xhlatex, mzlatex, oolatex, dblatex, dbmlatex,
        jhlatex, eslatex, teilatex, teimlatex, uxhlatex,
        wlatex, xhmlatex

        also 'tex', 'texi', 'context', 'xetex', and 'xelatex'
        instead of 'latex'

我试过:

tex4ht test.tex test.html

它失败:

----------------------------
tex4ht.c (2012-07-25-19:36 kpathsea)
tex4ht test.tex
  test.html
--- warning --- Can't find/open file `test.dvi'
--- error --- Can't find/open file `test.dvi'

我做错了什么?

相关内容