是否可以在 Notepad++ 上预览 LaTeX 代码(HTML 预览扩展)?

Is it possible to preview a LaTeX code on Notepad++ (HTML Preview extension)?

只需将此 LaTeX 代码另存为 HTML 并在 Firefox 上打开即可预览此 LaTeX 代码。换句话说,我希望记事本++像其他浏览器一样"read/render"代码。我需要做什么才能使这成为可能?我进行了研究,但我发现的只是一些调用 sumatraPDF 的批处理函数。

我假设 firefox 能够呈现代码,那么 "HTML preview" 扩展也能,对吗?

这是一个包含一些方程式的简单代码:

    <!DOCTYPE html>
    <html>
    <head>
    <script type="text/javascript"
      src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">                
    </script>
    <title>tex texample</title>
    </head>
    <body>
    <p>$$\frac{1}{a} &lt; \frac{1}{b}$$</p>
    <p>$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$</p>
    </body>
    </html>

我得到的只是一个方程式。我希望我可以在 Notepad++ 预览 HTML 扩展上获得该预览。可能吗? 谢谢。

equation rendered on firefox

编辑:实际上我找到了这个人处理这个问题的方法,他写道使用 "doxygen" 是可能的,但是我没有设法制作 Jscript 和 Cscript 部分。

http://csholmq.se/blog/notepadpp

我很欣赏其他类型的解决方案,或者其他可以让您了解需要做什么的其他解决方案。

时代在进步,现在在 IExplorer 中编写脚本预览 HTML 并打印到 PDF 预览将相当容易。

我们可以用 MS Edge 做类似的事情

start msedge.exe file:///C:/Users/your/Documents/SomeMath.html

我尝试用脚本打印它 --headless 到 PDF 但没有成功

因此我建议 windows 中最好的本机方法是在 notepad++ 中使用脚本在 IE / Edge 或 FF 中打开 html,然后第二个脚本调用 CTRL+P 函数进行打印为 PDF。

所以像这样的 vbs 脚本应该可以

DIM shell
SET shell = WScript.CreateObject("WScript.Shell")
Shell.Run "cmd /c start msedge.exe file:///C:/Users/wherever/Documents/SomeMath.html"
WScript.Sleep(5000)
Shell.SendKeys "^P"