下面的 MWE 中有两个矩阵。第一个矩阵使用 \begin{strip}, \end{strip} 包围 \begin{nicematrix}, \end{nicematrix} 以创建一列方程时效果很好。但如果我在第二个矩阵中启用 \begin{strip}, \end{strip},Overleaf 会报告错误。如何修复此问题?
\documentclass[journal]{IEEEtran}
%\usepackage[retainorgcmds]{IEEEtrantools}
%\usepackage{bibentry}
\usepackage{xcolor,soul,framed} %,caption
\usepackage{verbatim}
\colorlet{shadecolor}{yellow}
% \usepackage{color,soul}
\usepackage[pdftex]{graphicx}
\graphicspath{{../pdf/}{./figs/}}
\DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\usepackage[noadjust]{cite}
\usepackage[cmex10]{amsmath}
\usepackage{multicol,lipsum,mathtools,cuted}
%Mathabx do not work on ScribTex => Removed
%\usepackage{mathabx}
\usepackage{array}
\usepackage{mdwmath}
% \usepackage{mdwtab} %conflicts w/ Braces over matrix. causing "Undefined ctrl seq"
\usepackage{eqparbox}
\usepackage{url}
\usepackage[ruled,vlined]{algorithm2e}
% Braces over matrix
\usepackage{tikz-cd}
\tikzcdset{diagrams={nodes={inner sep=1pt}}}
% \usepackage{tikz}
\usetikzlibrary{arrows,
positioning,
overlay-beamer-styles,
shapes.geometric,
decorations.text}
% \usepackage{appendix}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{adjustbox}
\usepackage[cal=mt,scr=kp]{mathalpha}
% \usepackage{bm}
\usepackage{stackengine}
\usepackage{cases}
\usepackage{nicematrix}
\DeclareMathOperator{\co}{co}
\usepackage{tikz}
\usetikzlibrary{matrix}
% One column eqn
\usepackage{amssymb}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\usepackage{cuted}
\setlength\stripsep{3pt plus 1pt minus 1pt}
\begin{document}
\begin{strip}
\begin{equation}
\setcounter{MaxMatrixCols}{30} %<<<<<<<<<<<<<<<<<<<
\begin{bNiceMatrix}
x&x&x&x&x&x&x&x&x&10& x&x&x&x&x&x&x&x&x&20& x&x&x&x&x&x&x&x&x&30\\ x&x&x&x&x&x&x&x&x&10& x&x&x&x&x&x&x&x&x&20& x&x&x&x&x&x&x&x&x&30\\
x&x&x&x&x&x&x&x&x&10& x&x&x&x&x&x&x&x&x&20& x&x&x&x&x&x&x&x&x&30\\
x&x&x&x&x&x&x&x&x&10& x&x&x&x&x&x&x&x&x&20& x&x&x&x&x&x&x&x&x&30\\
\end{bNiceMatrix}
\end{equation}
\end{strip}
% \begin{strip}
\begin{equation}
\setcounter{MaxMatrixCols}{12} %<<<<<<<<<<<<<<<<<<<
\begin{bNiceMatrix}
S_{11} & S_{12} & S_{13} & S_{14} & S_{15} & S_{16} & S_{17} & S_{18} & S_{19} & S_{1\_10} & S_{1\_11} & S_{1\_12}\\
S_{21} & S_{22} & S_{23} & S_{24} & S_{25} & S_{26} & S_{27} & S_{28} & S_{29} & S_{2\_10} & S_{2\_11} & S_{2\_12}\\
S_{31} & S_{32} & S_{33} & S_{34} & S_{35} & S_{36} & S_{37} & S_{38} & S_{39} & S_{3\_10} & S_{3\_11} & S_{3\_12}\\
S_{41} & S_{42} & S_{43} & S_{44} & S_{45} & S_{46} & S_{47} & S_{48} & S_{49} & S_{4\_10} & S_{4\_11} & S_{4\_12}\\
S_{51} & S_{52} & S_{53} & S_{54} & S_{55} & S_{56} & S_{57} & S_{58} & S_{59} & S_{5\_10} & S_{5\_11} & S_{5\_12}\\
S_{61} & S_{62} & S_{63} & S_{64} & S_{65} & S_{66} & S_{67} & S_{68} & S_{69} & S_{6\_10} & S_{6\_11} & S_{6\_12}\\
S_{71} & S_{72} & S_{73} & S_{74} & S_{75} & S_{76} & S_{77} & S_{78} & S_{79} & S_{7\_10} & S_{7\_11} & S_{7\_12}\\
S_{81} & S_{82} & S_{83} & S_{84} & S_{85} & S_{86} & S_{87} & S_{88} & S_{89} & S_{8\_10} & S_{8\_11} & S_{8\_12}\\
S_{91} & S_{92} & S_{93} & S_{94} & S_{95} & S_{96} & S_{97} & S_{98} & S_{99} & S_{9\_10} & S_{9\_11} & S_{9\_12}\\
S_{10\_1} & S_{10\_2} & S_{10\_3} & S_{10\_4} & S_{10\_5} & S_{10\_6} & S_{10\_7} & S_{10\_8} & S_{10\_9} & S_{10\_10} & S_{10\_11} & S_{10\_12}\\
S_{11\_1} & S_{11\_2} & S_{11\_3} & S_{11\_4} & S_{11\_5} & S_{11\_6} & S_{11\_7} & S_{11\_8} & S_{11\_9} & S_{11\_10} & S_{11\_11} & S_{11\_12}\\
S_{12\_1} & S_{12\_2} & S_{12\_3} & S_{12\_4} & S_{12\_5} & S_{12\_6} & S_{12\_7} & S_{12\_8} & S_{12\_9} & S_{12\_10} & S_{12\_11} & S_{12\_12}\\
\end{bNiceMatrix}
\end{equation}
% \end{strip}
\end{document}
答案1
感谢大家的回复。是的,strip pkg 实际上不是必需的。删除它后,我能够实现相同的目标 - 在矩阵中添加分区线。
\documentclass[journal]{IEEEtran}
\usepackage{nicematrix}
\usepackage{tikz}
\begin{document}
\begin{equation}
\setcounter{MaxMatrixCols}{12} %<<<<<<<<<<<<<<<<<<<
\begin{pNiceMatrix}
\\\Block[borders={bottom,right,tikz=dashed}]{4-4}{}
S_{11} & S_{12} & S_{13} & S_{14} & S_{15} & S_{16} & S_{17} & S_{18} & S_{19} & S_{1\_10} & S_{1\_11} & S_{1\_12}\\
S_{21} & S_{22} & S_{23} & S_{24} & S_{25} & S_{26} & S_{27} & S_{28} & S_{29} & S_{2\_10} & S_{2\_11} & S_{2\_12}\\
S_{31} & S_{32} & S_{33} & S_{34} & S_{35} & S_{36} & S_{37} & S_{38} & S_{39} & S_{3\_10} & S_{3\_11} & S_{3\_12}\\
S_{41} & S_{42} & S_{43} & S_{44} & S_{45} & S_{46} & S_{47} & S_{48} & S_{49} & S_{4\_10} & S_{4\_11} & S_{4\_12}\\
S_{51} & S_{52} & S_{53} & S_{54} & \Block[borders={bottom,top,right,left,tikz=dashed}]{4-4}{}
S_{55} & S_{56} & S_{57} & S_{58} & S_{59} & S_{5\_10} & S_{5\_11} & S_{5\_12}\\
S_{61} & S_{62} & S_{63} & S_{64} & S_{65} & S_{66} & S_{67} & S_{68} & S_{69} & S_{6\_10} & S_{6\_11} & S_{6\_12}\\
S_{71} & S_{72} & S_{73} & S_{74} & S_{75} & S_{76} & S_{77} & S_{78} & S_{79} & S_{7\_10} & S_{7\_11} & S_{7\_12}\\
S_{81} & S_{82} & S_{83} & S_{84} & S_{85} & S_{86} & S_{87} & S_{88} & S_{89} & S_{8\_10} & S_{8\_11} & S_{8\_12}\\
S_{91} & S_{92} & S_{93} & S_{94} & S_{95} & S_{96} & S_{97} & S_{98} & \Block[borders={top,left,tikz=dashed}]{4-4}{} S_{99} & S_{9\_10} & S_{9\_11} & S_{9\_12}\\
S_{10\_1} & S_{10\_2} & S_{10\_3} & S_{10\_4} & S_{10\_5} & S_{10\_6} & S_{10\_7} & S_{10\_8} & S_{10\_9} & S_{10\_10} & S_{10\_11} & S_{10\_12}\\
S_{11\_1} & S_{11\_2} & S_{11\_3} & S_{11\_4} & S_{11\_5} & S_{11\_6} & S_{11\_7} & S_{11\_8} & S_{11\_9} & S_{11\_10} & S_{11\_11} & S_{11\_12}\\
S_{12\_1} & S_{12\_2} & S_{12\_3} & S_{12\_4} & S_{12\_5} & S_{12\_6} & S_{12\_7} & S_{12\_8} & S_{12\_9} & S_{12\_10} & S_{12\_11} & S_{12\_12}\\
\end{pNiceMatrix}
\end{equation}
\end{document}