Tag Info

New answers tagged

21

You can use TikZ and matrix of math nodes: The code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix,arrows.meta,positioning} \definecolor{myyellow}{RGB}{240,217,1} \definecolor{mygreen}{RGB}{143,188,103} \definecolor{myred}{RGB}{234,38,40} \definecolor{myblue}{RGB}{53,101,167} \begin{document} \begin{tikzpicture}[ mymatrix/.style={ ...


2

To stay true to your implementation, you'll have to use some way of specifying the width of the columns that have differing widths-than-headings. Easiest is to make a box where you find the widest element in the column to get the correct width, and set the heading within that box of said width: \documentclass{article} \usepackage{mathtools,calc} ...


2

bmatrix can be only in math environment, for example in \[ ... \] and not a in a text as you show in your example: \documentclass{article} \usepackage{amsmath} \begin{document} \[% <--- replace your \begin{center} J = \begin{bmatrix} \frac{dr}{dx} & \frac{dr}{dy}\\[1ex] \frac{d\theta}{dx} & \frac{d\theta}{dy}\\ \end{bmatrix} \]% ...


3

You can try this way: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \Phi_{11} & \Phi_{12}\\ \Phi_{21} & \Phi_{22} \end{bmatrix} =\frac{1}{\det (X)} \begin{bmatrix} X_{22} Y_{11} - X_{12} Y_{21} & X_{22} Y_{12} - X_{12} Y_{22}\\ X_{11} Y_{21} - X_{21} Y_{11} & X_{11} Y_{22} - X_{21} Y_{12} \end{bmatrix} \] ...


3

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{gather} \begin{bmatrix} \Phi_{11} & \Phi_{12} \\ \Phi_{21} & \Phi_{22} \end{bmatrix} = \frac{1}{\det(X)} \begin{bmatrix} X_{22} Y_{11} - X_{12} Y_{21} & X_{22} Y_{12} - X_{12} Y_{22} \\ X_{11} Y_{21} - X_{21} Y_{11} & X_{11} Y_{22} - X_{21} Y_{12} ...


3

I propose another solution for the vertical alignment problem. A macro that vertically adjusts the argument to get the correct delimiters. For the array, egreg solution seems good. \documentclass{scrartcl} \usepackage{tikz} \newcommand*\squarepicture {\tikz[scale=.5]{\fill[yellow](-1,-1)rectangle(1,1); \draw circle(.8)(0,.8)--(0,-.8)(.8,0)--(-.8,0) ...


3

You can adjust the symbol to be slightly moved down, with \vcenter. I'd avoid scaled, and favor setting height, so the symbol with scale along with the current font size. \documentclass[a4paper]{article} \usepackage{graphicx,amsmath,amssymb} \makeatletter \newcommand{\squarepicture}{% \ensuremath{\vcenter{\hbox{% ...


2

Use a vertical bar in the format specification: c|c. A complete example: \documentclass{article} \usepackage{amsmath} \begin{document} \[ C= \left[ \begin{array}{c|c} M & N \\ \hline R & S \end{array} \right] \] \end{document} As a side note, don't use $$...$$ in modern LaTeX documents; use \[...\]. See Why is \[ ... \] preferable to $$ ... ...


4

This is a side effect of the setting \delimiterfactor=901 and \delimiterfactor=5pt; the (ordinary) matrix environments of amsmath are based on array that circumvents the problem by adding a strut to every line. This is not really possible with smallmatrix, where one wants, for rows, as small a height as possible. Here's a psmallmatrix environment that ...


3

Too me the size of the brackets is fine, they don't quite cover the content, but on the other hand smallmatrix is trying to save vertical space for you. You can get larger brackets by adding a \strut or two in the content, but this causes bad space. Struts are just rules of zero width with height and depth, better here is to use one without depth, e.g. ...


0

If using a Times Roman font instead of Computer Modern is an option for you, you may want to look into using the MathTime Professional II math font package to achieve your objective. Its square brackets are satisfyingly thick even at the smallest sizes. Note that while the full MathTime Pro II package isn't free of charge, its "lite" subset, which is all ...


6

Here is a solution, based on blkarray, multirow and \bigstrut: \documentclass{book} \usepackage{amsmath, bm} \usepackage{blkarray, multirow, bigstrut} \newcommand\mystrut[1][0.6ex]{\setlength\bigstrutjot{#1}{\bigstrut[t]}} \usepackage{bm} \begin{document} \[ \bm{O}_4(2\phi) = \begin{bmatrix} \!\!\!\begin{blockarray}{c c c c} 1 & 0 & 0 & 0 ...


8

You can, with some tricks: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \boldsymbol{O}_{4}(2\phi)= \begin{bmatrix} 1 & \mspace{-12mu} \begin{matrix} 0 & 0 & 0 \end{matrix} \\ \begin{matrix} 0 \\ 0 \\ 0 \end{matrix} & \mspace{-12mu} \begin{bmatrix} \vphantom{\begin{matrix} 0 \\ 0 \\ 0 \end{matrix}} ...


3

Using the aligned environment instead of split there is no problem, especially if you add the geometry package: \documentclass[a4paper]{book} \usepackage{geometry} \usepackage{amsmath} \begin{document} \begin{align} T_4 &= \langle \underline{k}\,.\,\underline{k}^{*^T} \rangle= \left\langle \begin{bmatrix} \left|k_1\right|^2 & k_1k_2^* ...


3

\documentclass[a4paper]{book} \usepackage{amsmath} \begin{document} {\setlength{\arraycolsep}{1.5pt} $\begin{array}{rclc} T_4 &=& \langle \underline{k}\,.\,\underline{k}^{*^T} \rangle= \left\langle \begin{bmatrix} \left|k_1\right|^2 & k_1k_2^* & k_1k_3^* & k_1k_4^*\\ k_2k_1^* & \left|k_2\right|^2 & k_2k_3^* & k_2k_4^*\\ ...


3

If you want a 1 to 1 replica of this, it would look like: % arara: pdflatex \documentclass[a4paper]{book} \usepackage{amsmath} \begin{document} \[ % or \begin{equation} if you want it numberd. \begin{split} \left[\begin{matrix} . & . &\\ . & . & \cdots\cdots\\ . & . & \cdots\cdots\\ . & . & \end{matrix}\right.\\ ...



Top 50 recent answers are included