JavaHelp Swing 错误呈现 HTML 垂直对齐
JavaHelp Swing wrong rendering of HTML vertical-align
我知道 JavaHelp HTML 呈现是已知的 poor/outdated 但我想知道是否存在解决以下问题的解决方法。以下HTML片段
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
<span>This is a </span>
<img style="vertical-align:middle" src='./_LaTeX_cvode_solve.xml_1.png' />
<span>formula</span>
</div>
</body>
</html>
在 JavaHelp 中被 javax.help.SwingHelpUtilities 错误地呈现:
Firefox 中的(正确)呈现如下
还有哪些其他方法(JavaHelp 可以支持)垂直对齐内联图像 w.r.t。文本 ?我已经测试了很多流行的方法,但 none 目前有效。因此,如果有人已经在 JavaHelp 上苦苦挣扎,可以提供一些提示,我将不胜感激。
Java Swing 对 CSS 的支持很随意。这是支持的属性列表(带注释):
The following describes the CSS properties that are supported by the rendering engine:
- font-family
- ..
- text-decoration (with the exception of blink and overline)
- vertical-align (only sup and super)
- text-align (justify is treated as center)
- ..
- list-style-position
所以最好的办法可能是使用实际的 HTML 作为公式,加上上标和下标。
注意: Java-FX 提供 WebView
,其中 (AFAIU) 嵌入了一个实际的浏览器。
我知道 JavaHelp HTML 呈现是已知的 poor/outdated 但我想知道是否存在解决以下问题的解决方法。以下HTML片段
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
<span>This is a </span>
<img style="vertical-align:middle" src='./_LaTeX_cvode_solve.xml_1.png' />
<span>formula</span>
</div>
</body>
</html>
在 JavaHelp 中被 javax.help.SwingHelpUtilities 错误地呈现:
Firefox 中的(正确)呈现如下
还有哪些其他方法(JavaHelp 可以支持)垂直对齐内联图像 w.r.t。文本 ?我已经测试了很多流行的方法,但 none 目前有效。因此,如果有人已经在 JavaHelp 上苦苦挣扎,可以提供一些提示,我将不胜感激。
Java Swing 对 CSS 的支持很随意。这是支持的属性列表(带注释):
The following describes the CSS properties that are supported by the rendering engine:
- font-family
- ..
- text-decoration (with the exception of blink and overline)
- vertical-align (only sup and super)
- text-align (justify is treated as center)
- ..
- list-style-position
所以最好的办法可能是使用实际的 HTML 作为公式,加上上标和下标。
注意: Java-FX 提供 WebView
,其中 (AFAIU) 嵌入了一个实际的浏览器。