Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I try next code

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage{blkarray}

\begin{document}
        \begin{frame}{Title}

            \[
            \begin{blockarray}{c|c}
            A & B 
            \end{blockarray}
            \]      
        \end{frame} 
\end{document}

pdflatex finishes with

 ! Incompatible list can't be unboxed. <argument> \BA@first@box 
                           l.15         \end{frame}

If I replace beamer with article there is no problem. Do you know why?

share|improve this question
    
    
@percusse: That might be related, but the suggest workaround won't help. tikz is loaded with the beamer documentclass so there's no way to load atbegshi first. At least, that's what I found when I tried to compile the original poster's MWE. –  Matthew Leingang May 8 '12 at 11:57
    
@MatthewLeingang Indeed, it's not working. But I was hoping to find something that blkarray does similar to the case that is not valid anymore. –  percusse May 8 '12 at 11:59
    
@percusse: I've tested with \RequirePackage{atbegshi} before \documentclass{beamer} but the problem persists. –  Ignasi May 8 '12 at 13:26
add comment

2 Answers

up vote 5 down vote accepted

blkarray has two implementations a "quick" version for simple arrays and the full version if you want to do all the weird things that the package allows. For some reason eluding me at present beamer doesn't like the quick version so you can add to the document preamble after loading blkarray.

\makeatletter
\let\BA@quicktrue\BA@quickfalse
\makeatother

then it seems to work OK. Even the slow version is a lot quicker than the quick version was in 1992:-)

share|improve this answer
add comment

You need a block environment within your blkarray environment, similar to the one given in Error with blkarray: Misplaced \noalign:

\documentclass{beamer}
\usepackage{blkarray}

\begin{document}
\begin{frame}{Title}

\[
\begin{blockarray}{cc}
A & B \\
\begin{block}{c[c]}
1 & 2 \\
\end{block}
\end{blockarray}
\]      
\end{frame} 
\end{document}

enter image description here

share|improve this answer
1  
How did you spot that:-) To be more exact you just need to force blkarray to avoid its "quick" code. See my answer below, but +1 from me as the hint saved a fair bit of debugging time. –  David Carlisle May 8 '12 at 21:46
1  
The actual thought process was: first, read the other comment's linked answer, and write a long (unposted) comment about how the OP probably needed to update their TeX system, and not to take the posted solution so literally. Second, see that the MWE didn't work in my updated TeX Live, and cancel the previous comment. Third, Googled 'beamer blkarray' in case someone else had a similar problem, and found Stefan's answer. Fourth, verified Stefan's answer worked in the MWE, and happily avoided thinking about other methods. –  Mike Renfro May 8 '12 at 23:48
    
Of course, not knowing blkarray or what the OP was really trying to accomplish, my answer may miss the point entirely. –  Mike Renfro May 8 '12 at 23:51
    
@MikeRenfro: I wanted to write an answer to using multiple brace in array environment with blkarray. The OP used beamer so I did the same and found the problem. I also googled and found Stefan`s answer but I didn't related with my error. –  Ignasi May 9 '12 at 7:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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