框架颜色环境未在 htlatex 中转换

框架颜色环境未在 htlatex 中转换

我使用pdflatexhtlatex转换 html 中的带框颜色框。在 中成功转换pdflatex,但在 中未转换htlatex。请参阅以下 MWE:

\documentclass{article}
\usepackage{xcolor,listings,caption}

\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{%
\parbox{\textwidth}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}\vskip-4pt}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}
\lstset{frame=lrb,xleftmargin=\fboxsep,xrightmargin=-\fboxsep}

\begin{document}


\lstset{backgroundcolor=\color{gray}}
\begin{lstlisting}[frame=single,framerule=2pt]
    for i:=maxint to 0 do
    begin
    j:=square(root(i));
    end;
\end{lstlisting}

\begin{lstlisting}[label=some-code,caption=Program Code Here]
public void here() {
    goes().the().code()
}
\end{lstlisting}

\end{document}

相关内容