使用 lWarp 和 nicematrix 的 html 文档中出现错误

使用 lWarp 和 nicematrix 的 html 文档中出现错误

我在 html 文档(不是 pdflatex 生成的 pdf)中收到错误

未知环境‘NiceMatrix’

使用以下代码,似乎无法找到编译以下文件时的错误:

\documentclass{article}

\usepackage[
 latexmk, % Use latexmk to compile.
 OSWindows, % Force Windows. (Usually automatic.)
 mathjax, % Use MathJax to display math.
]{lwarp}

\usepackage{bbm,nicematrix}

\newcommand*{\F}{\mathbbm{F}}
\begin{warpHTML}
\CustomizeMathJax{\newcommand{\F}{\mathbb{F}}}
\end{warpHTML}

\begin{document}

Let  
\[T_n(\F)=\left(\begin{NiceMatrix} a_{1,1} & \Cdots & \Cdots & a_{1,n} \\ 0 & \Ddots & & \Vdots \\ \Vdots & \Ddots & \Ddots & \Vdots \\ 0 & \Cdots & 0 & a_{n,n}\end{NiceMatrix}\;\right)\]

\end{document}  

任何帮助,将不胜感激。

编辑:文件版本是:

 *File List*
 article.cls    2020/04/10 v1.4m Standard LaTeX document class
  size10.clo    2020/04/10 v1.4m Standard LaTeX file (size option)
   lwarp.sty    2020/10/07 v0.892 Allows LaTeX to directly produce HTML5 output
.
   iftex.sty    2020/03/06 v1.0d TeX engine tests
   ifpdf.sty    2019/10/25 v3.4 ifpdf legacy package. Use iftex instead.
  ifptex.sty    2019/11/01 v2.0 pTeX checker
etoolbox.sty    2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
  xpatch.sty    2020/03/25 v0.3a Extending etoolbox patching commands
   expl3.sty    2020-10-27 L3 programming layer (loader) 
l3backend-xetex.def    2020-09-24 L3 backend support: XeTeX
  xparse.sty    2020-10-27 L3 Experimental document command parser
ifplatform.sty    2017/10/13 v0.4a Testing for the operating system
shellesc.sty    2019/11/08 v1.0c unified shell escape interface for LaTeX
pdftexcmds.sty    2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty    2019/12/03 v1.5 Providing info/warning/error messages (HO)
 ltxcmds.sty    2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
catchfile.sty    2019/12/09 v1.8 Catch the contents of a file (HO)
etexcmds.sty    2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
letltxmacro.sty    2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
newunicodechar.sty    2018/04/08 v1.2 Defining Unicode characters
kvoptions.sty    2020-10-07 v3.14 Key value format for package options (HO)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
kvsetkeys.sty    2019/12/15 v1.18 Key value parser (HO)
 comment.sty    
comment_print.cut
comment_all.cut
    calc.sty    2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
comment_all.cut
comment_all.cut
 xstring.sty    2019/02/06 v1.83 String manipulations (CT)
 environ.sty    2014/05/04 v0.3 A new way to define environments
trimspaces.sty    2009/09/17 v1.1 Trim spaces around a token list
comment_print.cut
varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages
comment_all.cut
.
.
.


.
.
.
comment_print.cut
     bbm.sty    1999/03/15 V 1.2 provides fonts for set symbols - TH
nicematrix.sty    2020/11/08 v5.6 Enhanced arrays with the help of PGF/TikZ
 pgfcore.sty    2020/10/01 v3.1.6a (3.1.6a)
graphicx.sty    2020/09/09 v1.2b Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
   xetex.def    2020/08/26 v5.0i Graphics/color driver for xetex
  pgfsys.sty    2020/10/01 v3.1.6a (3.1.6a)
  pgfrcs.sty    2020/10/01 v3.1.6a (3.1.6a)
pgfrcs.code.tex
pgfsys.code.tex
pgfsyssoftpath.code.tex    2020/10/01 v3.1.6a (3.1.6a)
pgfsysprotocol.code.tex    2020/10/01 v3.1.6a (3.1.6a)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
pgfcore.code.tex
l3keys2e.sty    2020-10-27 LaTeX2e option processing using LaTeX3 keys
   array.sty    2020/10/01 v2.5c Tabular extension package (FMi)
 amsmath.sty    2020/09/23 v2.17i AMS math features
 amstext.sty    2000/06/29 v2.01 AMS text
  amsgen.sty    1999/11/30 v2.0 generic functions
  amsbsy.sty    1999/11/29 v1.2d Bold Symbols
  amsopn.sty    2016/03/08 v2.02 operator names
  ts1cmr.fd    2019/12/16 v2.5j Standard LaTeX font definitions
    ubbm.fd    1999/03/15 V 1.2 Font definition for bbm font - TH
 ***********

其中的点是一大串重复的 comment_*.cut

lwarpmk html生成的html代码只生成如下html代码用于页面显示:

<p>
Let
</p>

<p>
\[T_n(\F )=\left (\begin {NiceMatrix} a_{1,1} &amp; \Cdots &amp; \Cdots &amp; a_{1,n} \\ 0 &amp; \Ddots &amp; &amp; \Vdots \\ \Vdots &amp; \Ddots &amp; \Ddots &amp; \Vdots \\ 0 &amp; \Cdots &amp; 0 &amp; a_{n,n}\end {NiceMatrix}\;\right
)\]
</p>

答案1

看起来像添加代码

\begin{warpMathJax}
\CustomizeMathJax{\renewenvironment{NiceMatrix}{\begin{matrix}}{\end{matrix}}}
\end{warpMathJax}

在序言中解决了这个问题,但这只是一个解决方法。

相关内容