2

I want to update my "nicematrix" in TeX 3.14159265 (TeX Live 2020) to the v5.11 one, but after I ran

tlmgr update --self
tlmgr update nicematrix

it's up-to-dated as v5.12. However, I cannot compile my files with this version, as it incadicates

usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x:NNn \c__nicematrix_types_of_matrix_seq
                                                   \c__nicematrix_types_of_m...
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x:NNn \c__nicematrix_types_of_matrix_seq
                                                   \c__nicematrix_types_of_m...
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x:NNn \c__nicematrix_types_of_matrix_seq
                                                   \c__nicematrix_types_of_m...
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x:NNn \c__nicematrix_types_of_matrix_seq
                                                   \c__nicematrix_types_of_m...
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x:NNn \c__nicematrix_types_of_matrix_seq
                                                   \c__nicematrix_types_of_m...
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x:NNn \c__nicematrix_types_of_matrix_seq
                                                   \c__nicematrix_types_of_m...
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x_seq \c__nicematrix_types_of_matrix_seq
                                                  
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x_seq \c__nicematrix_types_of_matrix_seq
                                                  
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x_seq \c__nicematrix_types_of_matrix_seq
                                                  
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x_seq \c__nicematrix_types_of_matrix_seq
                                                  
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x_seq \c__nicematrix_types_of_matrix_seq
                                                  
/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5805: Undefined control sequence.
<argument> \LaTeX3 error: 
                           A sequence was misused.
l.5805 ...x_seq \c__nicematrix_types_of_matrix_seq
                                                  

/usr/local/texlive/2020/texmf-dist/tex/latex/nicematrix/nicematrix.sty:5806: LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.

A minimal example:

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{nicematrix}
\begin{document}
\begin{equation*}
  \mathbf{I}_{temp}=\begin{bNiceArray}{CCC@{\quad \quad}CCC@{\quad \quad}CCC@{\quad \quad}CCC}
    255 & 128 & 127 & 126 & 125 & 64 & 100 & 99 & 50 & 20 & 10 & 9  \\
  \end{bNiceArray}^{\intercal}
\end{equation*}
\end{document}

The reasons why I need to update it lie in:

  1. The default nicematrix packge (v3.14) only supports capital letters in the preamble of the environments.
  2. Overleaf with 2020 texlive only supports lowercase letters in the preamble of the environments of nicematrix. (The version seems to be later than v5)
  3. I want both of them can complie the same files smoothly, by updating my local nicematrix or working with a magic workround.

Questions:

  1. How to update package into a certain version with tlmgr, e.g. nicematrix v5.11?
  2. Is this situation a bug of nicematrix v5.12?

Welcome any other workround!

14
  • 4
    How do you come to conclusion 1 "The default nicematrix packge only supports capital letters in the preamble of the environments."? Upper case letters were only used in versions prior to nicematrix version 5. If you whish to combine environments with lower and upper case column specifiers in one document, you can use the define-L-C-R package option.
    – leandriis
    Mar 24 at 8:35
  • 1
    See also the following quote from the nicematrix documentation: "Before the version 5.0, it was mandatory to use, for technical reasons, the letters L, C et R instead of l,c et r in the preambles of the environments of nicematrix. If we want to be able to go on using these letters, nicematrix must be loaded with the option define-L-C-R."
    – leandriis
    Mar 24 at 8:35
  • 1
    Here is a corresponding MWE, that works with nicematrix version 5.12 and used both upper and lower case column specifiers: \documentclass{article} \usepackage[define-L-C-R]{nicematrix} \begin{document} \begin{NiceTabular}{lcr} 1 & 2 & 3 \\ text & text & text \\ \end{NiceTabular} \begin{NiceTabular}{LCR} 1 & 2 & 3 \\ text & text & text \\ \end{NiceTabular} \end{document}
    – leandriis
    Mar 24 at 8:39
  • 3
    I’m voting to close this question because it has been solved in comments
    – Rmano
    Mar 24 at 8:52
  • 2
    On Overleaf, you have to upload the latest version of the file nicematrix.sty in the repertory of your Overleaf project. You can find that file on the SVN server of TeXLive: https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty Mar 24 at 11:14
1

I finally got a little more elegant solution to my problem from this post, and here is a simple example:

\documentclass{article} 
\usepackage{nicematrix} 

\ExplSyntaxOn
\bool_set_true:N \c__nicematrix_define_L_C_R_bool
\ExplSyntaxOff

\begin{document} 
\begin{equation*}
  \mathbf{I}_{temp}=\begin{bNiceArray}{CCC@{\quad \quad}CCC@{\quad \quad}CCC@{\quad \quad}CCC}
    255 & 128 & 127 & 126 & 125 & 64 & 100 & 99 & 50 & 20 & 10 & 9  \\
  \end{bNiceArray}
\end{equation*}

\end{document}

I compiled it successfully in both local (v3.14) and overleaf (v5.0+) environments. PS: still only capital letters, but it works for me

Also thanks to @leandriis and @F. Pantigny

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.