这是由 hlatex 生成的 HTML。当我使用 Mathjax 时,其中没有数学的 HTML 显示完全不同。MathJax 在 HTML 正文中的文本周围添加一个框架。
当我删除 MathJax 时,框架消失了。
这是HTML
<!DOCTYPE html>
<html>
<head> <title></title>
<meta charset="UTF-8" />
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
     this is verbatim
 <br />    \begin{foo}
 <br />         test
 <br />    \end{foo}
 <br />  
</body>
</html>
这是Firefox上的屏幕输出:
现在,当我从 HTML 头中删除 MathJax 时,输出如下:
<!DOCTYPE html>
<html>
<head> <title></title>
<meta charset="UTF-8" />
</head>
<body>
     this is verbatim
 <br />    \begin{foo}
 <br />         test
 <br />    \end{foo}
 <br />  
</body>
</html>
HTML看起来像
foo.tex
仅供参考,用于生成上述 HTML的原始乳胶文件是
\documentclass[]{article}
\begin{document}
\begin{verbatim}
this is verbatim
\begin{foo}
test
\end{foo}
\end{verbatim}
\end{document}
使用命令编译
htlatex foo.tex "t.cfg"
t.cfg
在哪里
\Preamble{}
\Configure{VERSION}{}
\Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
\Configure{@HEAD}{}
\Configure{@HEAD}{\HCode{<meta charset="UTF-8" />\Hnewline}}
\Configure{@HEAD}{\HCode{<link rel="stylesheet" type="text/css" href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}
\Configure{@HEAD}{\HCode{<script type="text/javascript"\Hnewline
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"\Hnewline
></script>\Hnewline}}
\Configure{@HEAD}{\HCode{<style type="text/css">\Hnewline
.MathJax_MathML {text-indent: 0;}\Hnewline
</style>\Hnewline}
}
\begin{document}
\EndPreamble
问题是 为什么加载 Mathjax 会导致显示的文本周围出现一个框架并将其置于页面中间?