2

In the MWE below there are two matrices. The first one works fine w/ \begin{strip}, \end{strip} enclosing the \begin{nicematrix}, \end{nicematrix} so as to create one column equation. But if I enable the \begin{strip}, \end{strip} in the second matrix, Overleaf reports an error. How to fix this?

\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}
5
  • Welcom to TeX SE! You should provide a more compact MWE (minimal working example). For instance, you're loading packages which are probably not relevant to your problem. Jun 28, 2022 at 6:30
  • 1
    I have no problem if I add text. It seems that you cannot have two strip environments on the same page, however: the text between them is gobbled. On the other hand, I'd more simply use a table* environment rather than strip that makes it difficult for the reader to understand where the text continues.
    – egreg
    Jun 28, 2022 at 8:55
  • Your preamble is very confusing as it mixes loading and setting. By the way the mdw packages have been unmaintained for a quarter of a century: simply drop them.
    – egreg
    Jun 28, 2022 at 8:56
  • Using strip seems a bit extreme for IEEE. Usually journals do not like authors messing with their formatting. Jun 28, 2022 at 14:56
  • @F. Pantigny, Sorry I am not familiar w/ all these pkgs. I'll try my best to minimize the number of them in an MWE but pls expect some misses...
    – farhill
    Jul 5, 2022 at 15:57

1 Answer 1

2

Thanks for all the replies. Yes, the strip pkg is actually not necessary. After removing it I am able to achieve the same goal - adding partitioning lines in the matrix.

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

You must log in to answer this question.

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