Tag Info

New answers tagged

0

You could use an array instead; in this way, the standard | for the vertical rule and \hline (for the horizontal rule) will give you the desired result. The brackets can be obtained using \mleft, \mright from the mleftright package: \documentclass{article} \usepackage{amsmath} \usepackage{mleftright} \begin{document} \[ \renewcommand\arraystretch{1.3} ...


1

For a one off display, here's a hack that exploits the fact that the braces should be as high as a three line matrix. \documentclass[11pt]{memoir} \usepackage{amsmath} \newcommand{\nrow}[1]{% \relax \vcenter to 0pt{% \vss \kern-1.5ex \llap{$#1\left\{\vphantom{\begin{matrix}0\\\vdots\\0\end{matrix}}\right.\kern.75em$}% \vss }% } ...


1

Make a matrix to put the braces etc in: \documentclass[11pt]{memoir} \usepackage{amsmath} \begin{document} \begin{align*} % % % \begin{matrix} n_1 = \left\{\begin{matrix}\\\\\\\end{matrix}\right. \\ n_2 = \left\{\begin{matrix}\\\\\\\end{matrix}\right. \\ ...


3

Don't use confusing ellipses, for example, the last 1 of your n_2 block turns into zero after the ellipses. Actually, if you can, always avoid ellipses. Your matrix has a very distinguished structured and make it obvious to your readers. They can construct the matrix when they know the rule. But they can't read the rule from the construction easily. Here ...


3

Here is a solution hacked together using tikz \documentclass[11pt]{memoir} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{calc,decorations.pathreplacing} \newcommand\REM[2]{\tikz[remember picture,inner sep=0pt] \node (#1) {#2};} \begin{document} \begin{align} \begin{pmatrix} \REM{A}{1} & 0 & 0 & ...


5

A hackish solution: In the bottom row of the submatrix (or third, sixth, and last row of the matrix), \vadjust puts stuff after that row. Then the brace is drawn using an invisible matrix of three rows to get the right height of the brace (\vphantom). This is put into a \vbox to 0pt to avoid increasing the line skip between the insertion via \vadjust. Also ...


1

Using \multirow is similar to using \multicolumn and, when p is specified in the latter, math mode must be resumed in the argument also in array. However, the arrangement you're looking for can be obtained without \multirow: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ \begin{pmatrix} \;\mathcal{J} & \begin{matrix} a & ...


3

According to multirow's documentation, when you specify the width of the multi-row cell explicitly, it sets the contents in a \parbox of the requested width. This would obviously switch to text mode so you'd need to re-enter maths mode explicitly within the cell. When you specify the width as *, the contents is set in LR mode. So, again, you drop out of ...


1

Maybe it would be easier to set this with tikz-cd: % arara: pdflatex \documentclass{article} \usepackage{float} % for your [H] option to figure (I guess) \usepackage{caption} % for better spacing if captions are used above the figures. And it deletes the colon if no caption is given. \usepackage{tikz-cd} \begin{document} \fontsize{11}{13}\selectfont ...


1

You have made the matrix a matrix of math nodes, meaning that all the nodes are set in math mode, where spaces are ignored, and the text set in math italic. Change it to matrix of nodes. \documentclass[border=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m) [matrix of nodes, row sep=2em, ...


4

Supplement to egreg's answer. The columns can be right aligned by a trick. Package array allows the definition of a new column style. Thus locally c is redefined to r: Some space is added around the left and right column. The size of the outer brackets can be reduced by manipulating \delimiterfactor and \delimitershortfall. When TeX has calculated the size ...


3

You can use nested matrices: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \frac{\epsilon_{1}}{12h^2_{1}} \begin{bmatrix} \\[-2\jot] \begin{matrix} 12 \\ -1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{matrix} \underbrace{% \begin{bmatrix} -24 & 12 & 0 & 0 & 0 & 0 & 0 \\ 16 & -30 & 16 & -1 ...


3

You can nest matrices, just use a matrix environment for the first column of N: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation} \begin{pmatrix} v_a\\ v_y \end{pmatrix} \sim \mathcal{N} \begin{pmatrix} \begin{matrix} \bar{v}_a\\ \bar{v}_y \end{matrix}, & \begin{bmatrix} ...


4

You can simply use \left(...\right) and nest two matrices inside it: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{pmatrix} v_a \\ v_y \end{pmatrix} \sim \mathcal{N} \left( \begin{matrix} \bar{v}_a \\ \bar{v}_y \end{matrix} \mathrel{,} \begin{bmatrix} \sigma_a^2 & \sigma_{ay} \\ ...


1

Here is a short solution to create this kind of diagrams : \documentclass[tikz,border=7mm]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} % draw the grid and the numbers \draw (-1,-1) grid (5,5) foreach \i in {0,...,5}{ (\i-.5,5.5) node{\i} (-1.5,4.5-\i) node{\i}}; % for every line we give first and last index to ...


2

Try adding anchor=center to the node style, i.e. within nodes={} in m2style. \documentclass[border=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{ fit, positioning, matrix, } \begin{document} \begin{tikzpicture} \tikzset{ status/.style={rectangle, draw=black, text centered, text=black, minimum width=1.5em, minimum height=1.5em, ...


0

If you want a left-to-right anumeration, thetasks package is done for that: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{fourier} \usepackage{amsmath} \usepackage{enumitem} \usepackage{tasks} \settasks{ label-offset=0.85em,counter-format =(tsk[a]) , column-sep =8pt, item-indent=4em, after-item-skip=0.6ex, after-skip=3ex} \begin{document} ...


0

Here is a method that wraps each matrix in a minipage and the resume feature of the enumitem package: If you wish to align the labels with the top, then you can use adjustbox: Code: \documentclass{article} \usepackage{enumitem} \usepackage{amsmath} \newcounter{MatrixCount} \setcounter{MatrixCount}{0} \newenvironment{MyMatrix}{% ...


2

The next code was using the matrix environment within the multicol package \documentclass{article} \usepackage{multicol} \usepackage{amsmath} \begin{document} \begin{enumerate} \item Determinar la transpuesta de cada una de las sigientes matrices. Adem\'as si la matriz es cuadrada, calcular su traza. \begin{multicols}{2} \begin{enumerate} ...


1

The hard way. ;-) \documentclass{article} \usepackage{amsmath} \usepackage{xparse} \NewDocumentCommand{\canonicalmatrix}{mO{th}mO{th}}{% \begin{array}{@{}c@{}} \vphantom{ \begin{array}{@{}c@{}}\text{$#3$-#4 column}\\\downarrow\end{array} } \\ \hphantom{E_{#1#3}={}\enspace} \begin{pmatrix} & & \smash[t]{ ...


4

Here it is using a TABstack. \documentclass{article} \usepackage{tabstackengine,amsmath} \stackMath \def\Vdots{\smash{\protect\raisebox{-1.5pt}{$\vdots$}}} \begin{document} \[ \setstacktabbedgap{1.5ex} E_{ij} = \stackon{\parenMatrixstack{ & & \Vdots& &\\ & & 0& \\ \cdots & 0 & 1& 0 & \cdots\\ ...


4

I am not sure if I understood the question correctly. You can give your options to a particular matrix in several ways: using a scope environment: \begin{scope}[<options>] <code for the matrix> \end{scope} or passing the options to the optional argument for the particular matrix: \matrix[<options>] <code for the matrix> The ...


3

In addition to Mico and in order to show the \right| command: % arara: pdflatex \documentclass{article} \usepackage{mathtools} \newcommand*{\partderat}[3]{\left.\dfrac{\partial#1}{\partial#2}\right|_{\mathrlap{#3}\phantom{t_{N_{\textit{sp}}}}}} \begin{document} \[ Q_r = \begin{bmatrix} \partderat{\breve{y}_r}{\theta_1}{t_1} & \cdots & ...


6

I can think of two solutions: Use \dfrac ("display-style fraction") instead of \frac to increase the size of the fractional terms, and Keep using \frac, but reduce the size of the conditioning bars from \bigg to \Big. Both methods are acceptable, typographically speaking. Which one is "better" will depend on many aspects of your documents (about which we ...


5

Define your own bordermatrix, derived from the one in latex.ltx: \documentclass{article} \makeatletter \def\BorderMatrix#1{% \begingroup \m@th\@tempdima8.75\p@\setbox\z@\vbox{% \def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline }}% \ialign{\hfil$##$\hfil\kern2\p@\kern\@tempdima & \thinspace \hfil $##$\hfil ...


1

Commands and environments should be defined before \begin{document} and you can redefine them between frames \documentclass[11pt]{beamer} \usetheme{Warsaw} \usepackage[utf8]{inputenc} \usepackage{amsmath,adjustbox,mathtools} \usepackage{amsfonts} \newenvironment{Pbmatrix}[1][c] {\begin{adjustbox}{valign=#1}$\begin{pmatrix}} ...


3

\documentclass{article} \usepackage{amsmath} \usepackage{tikz} \newcommand{\mymatrix}{ \left(\begin{gathered} \tikzpicture[every node/.style={anchor=south west}] \node[minimum width=2cm,minimum height=.6cm] at (0,0) {$C_2$}; \node[minimum width=2cm,minimum height=.6cm] at (0,.6) {$B_2$}; \node[minimum width=4cm,minimum ...


3

Don't use \bordermatrix, that's all! \documentclass{article} \begin{document} \begin{tabular}{c @{\hspace{2\tabcolsep}} *{5}{c}} & \itshape A & \itshape B & \itshape C & \itshape D & \itshape E \\[1ex] \bfseries A & 0 & 0 & 1 & 0 & 1 \\ \bfseries B & 0 & 0 & 1 & 0 & 0 \\ \bfseries C ...


2

Please post complete minimal examples rather than code fragments. They make it much easier to help. Maybe something like this? I don't know why you would want 'Player Y' centred over any box, so I've assumed you don't really mean it. \documentclass{article} \usepackage{multirow,array} \begin{document} \begin{table} \setlength{\extrarowheight}{2pt} ...


0

Two possibilities, the idea of the second one can be used for general partitioned matrices where \cmidrule defined by booktabs doesn't mix with vertical rules in an array. \documentclass[11pt,letterpaper,oneside]{article} \usepackage{amsmath,booktabs} \begin{document} \begin{equation*} \textbf{Y}=\begin{bmatrix} 11\\ 12\\ \cmidrule(lr){1-1} 8\\ ...


4

Almost the same solution, slightly improved: \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{babel} \begin{document} \begin{equation}\label{eq:appendrow}\renewcommand\arraycolsep{0.67em} \text{ScanPos}=\begin{bmatrix} A \\ B \\ C\\ \end{bmatrix}=\begin{bmatrix} -3.3816 ...


2

Is this what you want? \documentclass[english]{article} \usepackage{amsmath} \begin{document} \begin{equation}\label{eq:appendrow} \text{ScanPos}= \begin{bmatrix} A B C \end{bmatrix}= \begin{bmatrix} -3.3816 & \ -1.6166 & \ 1.75\\ -3.3816 & \ -1.6166 & \ 1.5\\ -3.3816 & \ -1.6166 & \ ...



Top 50 recent answers are included