Hot answers tagged

3

I think the first two matrices are what the OP asked for. I believe I have got the 3rd level, as well. The key is in realizing that the indices are basically in binary (base 2) notation. EDIT, To keep up with egreg, I also did 4th level. \documentclass[landscape]{article} \usepackage[margin=1cm]{geometry} \usepackage{amsmath} \newcommand\Amatrix[2]{% ...


3

Not really recursive. But, hey, it works! \documentclass{article} \usepackage{amsmath} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\recursematrix}{O{B}m} {% #1 is the (optional) symbol for the coefficient, #2 is the step \begin{pmatrix} \passerby_recursematrix:nn { #1 } { #2 } \end{pmatrix} } \tl_new:N \l_passerby_recursebody_tl ...



Only top voted, non community-wiki answers of a minimum length are eligible