2

I'm getting an error in the html document (not the pdf generated by pdflatex) of

Unknown environment 'NiceMatrix'

with the following code and can't seem to locate an error in compiling the following file:

\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}  

Any help would be appreciated.

Edit: the fileversions are:

 *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
 ***********

where the dots are a large list of repeated comment_*.cut

The html code generated by lwarpmk html only generates the following html code for display on the page:

<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>
9
  • 1
    I think some of your pacakges are out of date. Seems to run fine for me with TeXLive 2020 on a Mac. I suggest you add \listfiles just before \begin{document} and post the versions of the files that are listed in the log. Nov 17, 2020 at 1:53
  • @PeterGrill I had immediately updated my tex installation; I use TeXlive 2020 on a windows10 machine. I can compile this with pdflatex or xelatex just fine, but using lwarpmk html is still definitely a no-go for me.
    – tim
    Nov 17, 2020 at 2:45
  • Possibly lwarpmk isn't generating the correct html (or mathjax) code for the nicematrix environement? See the edit showing the html generated.
    – tim
    Nov 17, 2020 at 2:56
  • Opps, I only checked with pdflatex. Don't know anything about lwarpmk. Nov 17, 2020 at 5:52
  • I think that the package nicematrix is not compatible with lwarp in MathJax mode. Nov 17, 2020 at 11:19

1 Answer 1

1

It looks like adding the code

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

in the preamble solves the issue, but this is just a workaround.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .