Tag Info

New answers tagged

1

One option using blkarray: The code: \documentclass{article} \usepackage{blkarray} \usepackage{amsmath} \begin{document} \[ \begin{blockarray}{ccccc} x_{1} & x_{2} & \cdots & x_{n} \\ \begin{block}{[cccc|c]} a_{11} & a_{12} & \cdots & a_{1n} & b_{1} \\ a_{21} & a_{22} & \cdots & a_{2n} & b_{2} \\ ...


3

I hope the following is what you're looking for. \documentclass{article} \usepackage{amsmath,mleftright} \mleftright % eliminate whitespace inserted by \left and \right \begin{document} \[ \left( \begin{bmatrix}M_{11}&M_{12}\\M_{21}&M_{22}\end{bmatrix} + \begin{bmatrix}A_{11}&A_{12}\\A_{21}&A_{22}\end{bmatrix} \right) \begin{bmatrix} ...


2

Summarizing some of my earlier comments: Use the standalone package with the option preview in order to avoid getting an error message about a missing $ symbol. Don't use $$ in a LaTeX document to start and end displaymath mode, as it's quite deprecated. See Why is [ ... ] preferable to $$ ... $$? for more information on this subject. The matrix ...


5

You are unnecessarily grouping interior content inside the align and bmatrix environments. Remove those inner groups which are causing the mismatched brace groups: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{subequations} \begin{align} % State Equations X^{(c)}_{t + 1} &= \begin{bmatrix} \gamma & ...


2

Don't use display math if you don't want equations centered: Code: \documentclass[11pt,paper=a4,answers]{exam} \usepackage{graphicx,lastpage} \usepackage{amsmath, amsthm, amssymb, amsfonts} \usepackage{upgreek} \usepackage{censor} \censorruledepth=-.2ex \censorruleheight=.1ex \hyphenpenalty 10000 ...


4

The following uses cases and some \phantom/overlapping in order to achieve the appropriate layout: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation} c(t)=\left\{\begin{matrix} 0 & 0 < t < \Delta t \\ \alpha e^{-t/T_{1b}} & \Delta t < t < \Delta t + \tau \\ 0 & t > \Delta t ...


8

Use the align environment: Aligning the right hand side requires more tweaking by using either a \makebox of the appropriate width, and/or using an \hphantom{} to insert additional spacing. If you want the left side to be centered, the replacing the right with a centered alignment: \newcommand*{\MakeBox}[1]{\makebox[\widthof{\WidestText}][c]{$#1$}} ...


3

1. Random Colors: Here is an adaptation of Drawing grids filled with random selected colors and connecting them which alows you to specify the dimensions of the matrix: 2. Colors Specified per Cell: If you wish to specify the colors for each cell, then you can use the datatool package to read in a CSV file which contains the mapping from a number to a ...


1

The matrix environments of the amsmath package have to be set in math mode. You didn't do that, thus TeX is searching for some $ which enables this math mode. If you put it in $...$, \(...\), \[...\], \begin{displaymath}...\end{displaymath}, \begin{equation}...\end{equation} or \begin{equation*}...\end{equation*}, (and most certainly others...,) it will ...


1

Another option \documentclass{scrartcl} \usepackage{mathtools} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand \vect { s m } { \IfBooleanTF { #1 } { \chen_v_vector:n { #2 } } { \chen_h_vector:n { #2 } } } \cs_new_nopar:Npn \chen_h_vector:n { \chen_vector_aux:nn { & } } \cs_new_nopar:Npn \chen_v_vector:n { \chen_vector_aux:nn { \\ } ...


7

If you want to keep the alignment between the columns, use an array, with some enhancement: \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \usepackage{array} \begin{document} The reparameterisation is \begin{equation} \label{eqn:linear_ssK3} \begin{array}{@{} >{{}}r<{{}} @{}r@{\,} *{5}{c} @{\,}l@{}} s = & [ & s_1 & s_2 ...


2

Here's a solution along the lines @Sigur suggested. (I was working on it while he was commenting.) To get the inner alignment you wanted I hard coded some whitespace. If you need to do this often you'll need a more elegant solution. \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \begin{document} The reparameterisation is \begin{align} ...


5

Don't use equation for multi-line equations use align and don't use matrix for aligning whole equations just use it for making matrices, or here you can use bmatrix as sigur suggests. \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \begin{document} The reparameterisation is \begin{equation} \label{eqn:linear_ssK3} \begin{aligned} s&= ...



Top 50 recent answers are included