# Tag Info

## New answers tagged matrices

3

I'd set the inner-matrix as a "pseudo-matrix" where you specify the brackets using amsmath's \bigl/\bigr constructions. It allows you the break them across the cell boundary but also to maintain a structure-wide columnar alignment: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \left[\begin{array}{c r @{} c c @{} l} a & ...

3

\setbox is a rather error prone way to test if an argument is empty, but here I don't think you need the test at all: \documentclass[a4paper,11pt]{article} \usepackage{amsmath} \usepackage{marvosym} \usepackage{wasysym} \usepackage{amssymb} \makeatletter % http://tex.stackexchange.com/questions/2233/ \renewcommand*\env@matrix[1][*\c@MaxMatrixCols r]{% ...

6


1

You can construct a stackable matrix to insert your A^T in the top row so it aligns vertically with the top row of B: \documentclass{article} \usepackage{amsmath,bm} \begin{document} \[ \bm{A}^T \bm{B} = \begin{array}{@{}c@{}} (\begin{array}{c} \quad \bm{A} \quad \end{array}) \\ \mathstrut \\ \mathstrut \end{array} \left( ...

4

Here's a slightly simpler approach, omitting the unsightly internal rules in the matrices, and using a scalebox to shrink the identity matrix instead of trying to grow the other parts. The other trick used here is to insert an invisible vertical rule to control the spacing. \documentclass{article} \usepackage{mathtools} \begin{document} ...

2

The standard array environment is good, but if the entries are decimal numbers it's better to use siunitx. \documentclass{article} \usepackage{amsmath,array,siunitx} \sisetup{output-decimal-marker={,}} \begin{document} First the version with the standard \texttt{array} \begin{array}{r @{} *{8}{c} @{} l} & A & B ...

3

Here's one possibility, with TABstacks. \documentclass{article} \usepackage{amsmath,tabstackengine} \setstackTAB{@} \setstacktabbedgap{1em}% INTERCOLUMN GAP \stackMath \begin{document} \begin{align} p_{A} =\phantom{(} \tabbedstackon[5pt]% THE 5pt IS THE GAP TO THE OVERSET {\llap{(}0,01 @ 0,49 @ 0,02 @ 0,00 @ 0,01 @ 0,26 @ 0,10 @ 0,11\rlap{)}} ...

2

Something like this? \documentclass{article} \usepackage{mathtools} \DeclareMathOperator*{\argmax}{arg\,max} \begin{document} \begin{align*} \argmax_{a,b} &= \begin{bmatrix*} t(a,b,c) u_1(a)+ t(a,b) u_1(a) & [c] \\ t(a,b,c u_1(a) & [d] \\ \end{bmatrix*}\\[1ex] \argmax_{a,b} &= \begin{bmatrix*} 0.9 u_1(a)+ 0.1 u_1(b) ...

1

As label is predefined style in TikZ, for my answer I'll use mymodule and mylabel in place of module and label. What is happening here is that when you put nodes={mymodule} and then |[mylabel]|, the style of the cell became equivalent to |[mymodule,mylabel]|. So if mylabel/.style={} finaly the style of your cell is just like for all other cells ...

2

If label nodes are only labels to be added to some module nodes, there's no need for a new style, just including a label option to corresponding node can work. \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \tikzset{ module/.style={draw, rectangle, fill=white, minimum width=4cm, minimum height=0.8cm}, } \begin{document} ...

4


3

I don't know if exist an environment which has different layout in in-line math and displaymath, so I suggest to define two commands, one -- \cases -- for inline use and -- \Cases -- for use in displaymath. Instead of cases i suggest to use mathtool and Bmatrix* and Bsmallmatrix*: \documentclass{article} \usepackage{mathtools} ...

1

Here I made a number of strategic changes. I dispensed with the cases environment. I built the stacked math using a \stackanchor (from stackengine package). I used the \stretchleftright{}{}{} macro (from scalerel package) to make the braces by stretching the \{ and \} glyphs, subject to a maximum aspect ratio limitation. To achieve a different look ...

8

Instead to draw line arround nodes try to use rectangle shape, which fit this nodes: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{backgrounds,fit,matrix,positioning} %%%% se-prewiew-tikz \usepackage[active,floats,tightpage]{preview} \PreviewEnvironment{tikzpicture}% <--------------------------------- ...

Top 50 recent answers are included