1

When I include arydshln, I get a conflict with kbordermatrix (from here):

\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}
\usepackage{kbordermatrix}

\begin{document}

\begin{align}
\kbordermatrix{ &1 & 2 & 3\\ 
               a&b & c & d}
\end{align}

\end{document}

\adl@@cr ...tempdima \xdef \adl@rowsL {\adl@rowsL 
                                                  (\adl@colsL /\number \adl@...
l.11 \end{align}

How can I use both packages without conflicts?

0
1

In case you don't need to use dashed lines inside a kbordermatrix, you can obtain the same result with the blockarray environment – in a less simple way (but you may define new commands/ environments), and it is compatible with arydshln as long as you don't use inside blockarray.

So I propose this code as a work-around:

\documentclass{article}
\usepackage{amsmath}
\usepackage{kbordermatrix}
\usepackage{array, blkarray} %

\usepackage{arydshln}

\newcolumntype{$}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
}

\begin{document}

\begin{align}
\begin{blockarray}{*{3}{>{\scriptstyle}c}}
 1 & 2 & 3\\
\begin{block}{\Left{$ \scriptstyle a $\enspace }{[\enspace}ccc\Right{. \enspace]}{}}
 b & c & d\\
\end{block}
\end{blockarray}
\end{align}

\begin{align}
\begin{array}{$c*{3}{^c}}
\rowstyle{\scriptstyle} & 1 & 2 & 3\\
 \hdashline
\scriptstyle a & b & c & d 
\end{array}
\end{align}

\end{document} 

enter image description here

1
  • how can I use blockarray as a kbordermatrix substitute if I want to have multiple lines, e.g. a | b c d followed by e | f g h in the next line – m.s. Sep 7 '16 at 9:47
0

There are problems using arydshln and \kbordermatrix. Moreover you need to use the \kbordermatrix in the equation (According to the relevant document from Caltech). Having said that, it does not deny the conflict among these packages. you can try easybmat package instead of arydshln in some cases.

1
  • 2
    I can't compile this code either. – Bernard Sep 5 '16 at 12:30

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.