我想将 TeX 3.14159265(TeX Live 2020)中的“nicematrix”更新为 v5.11,但在我运行
tlmgr update --self
tlmgr update nicematrix
它已更新至 v5.12。但是,我无法使用此版本编译我的文件,因为它会提示
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.
一个简单的例子:
\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}
我需要更新它的原因在于:
- 默认好矩阵packagege(v3.14)仅支持大写字母在环境的序言中。
- Overleaf 与 2020 texlive 仅支持小写字母在环境的序言中好矩阵。(版本好像比v5要晚)
- 我希望他们两个都能顺利地编译相同的文件,通过更新我的本地好矩阵或使用神奇的解决方法。
问题:
- 如何使用 tlmgr 将软件包更新到特定版本,例如好矩阵v5.11?
- 这种情况是好矩阵v5.12?
欢迎任何其他解决方法!
答案1
我终于从中得到了一个更优雅的解决方案邮政,这里有一个简单的例子:
\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}
我在本地(v3.14)和 overleaf(v5.0+)环境中都成功编译了它。PS:仍然只有大写字母,但它对我有用。
还要感谢@leandriis 和@F. Pantigny