{array} is an environment used in {math-mode}. It can be useful when aligning terms.

learn more… | top users | synonyms

7
votes
1answer
183 views

Matrix derivation

I would like to display a matrix with a dot (derivative) on top of it. The entry of this matrix shall consist of arbitrary symbols. When I write \begin{align} \dot{\begin{pmatrix} x \\ y ...
7
votes
1answer
293 views

Tables header row's: how to ignore the column type?

I have several column types defined using the array and collcell package. An example \newcolumntype{N}{>{\collectcell\num}c<{\endcollectcell}} This alleviates making tables a lot, and makes ...
7
votes
2answers
414 views

Modify locally the “array” environment for Equation Systems

When I started to use LyX 2.0.6 I noticed that when an Equation System is needed, there are two options available to typeset it: using the appropriate command on the Math Line cases, or ...
7
votes
1answer
510 views

cases and spacing between array rows

The space between two rows seems to differ if the cases environment is used. Have a look at the following example: \documentclass{minimal} \begin{document} \[ \begin{array}{l} f(x) =% ...
6
votes
3answers
1k views

Color a line in array

Is it possible to change a color of a single line inside an array environment? I have an array of possible solutions and I'd like the best one to be highlighted, the array is declared like ...
6
votes
2answers
6k views

Curly braces and nested arrays

I am trying to reproduce the equation of the image below. I am using an array environment to create the first big curly brace. I have tried to nest a second array to produce a second curly brace, but ...
6
votes
2answers
471 views

Several lines of formulas to the left of one curly brace pointing to equation number

How to make several lines of equations under one curly brace from the left side, such that it point to a reference number. Now I do something like this: \begin{align} \left. \begin{array}{ll} a = b ...
6
votes
3answers
316 views

Adding colour to table cells when decimals are aligned with arrays and {.} used in the column definition

I've got a table (below) that aligns the decimal points of my data - I wish to highlight a value (2 adjacent cells), however this leaves a white space where the decimal point is! If I increase the ...
6
votes
2answers
238 views

When substack and array doesn't work

I am trying to write a formula. But both substack and array cannot fulfil my needs (as far as I know how to use them). The first is how I want it to look like. But I need an i'\neq i below the ...
6
votes
3answers
355 views

How to use data structures in TikZ?

I created a foreach statement, using expl3 and TikZ/pgf: \documentclass{article} \usepackage{tikz} \setlength{\parindent}{0cm} \usepackage{expl3} \ExplSyntaxOn \cs_new:Npn \Counter #1 \Stopper { ...
6
votes
3answers
792 views

Integral sign inside equation array becomes too small

\documentclass[12pt,a4paper]{report} \usepackage{palatino} \begin{document} \begin{equation}\label{good} \int_{0}^{1} \end{equation} \begin{equation}\label{ugly} \begin{array}{c} \int_{0}^{1}\\ ...
6
votes
2answers
185 views

Vertical lines in matrices should be aligned

I'm trying to write matrices one below the other but I want the vertical lines (compare example below) to be aligned. Eventually, there will be several matrices in one document - in the example below ...
6
votes
2answers
514 views

How to make frame in matrix? [duplicate]

I want to draw : I have tried to make this by the following command : \documentclass[11pt,twoside,openright]{book} \usepackage{geometry,tikz,amsmath} \begin{document} ...
6
votes
1answer
445 views

How can I update the array package? Warning from tabu

I am trying to use the tabu package, but it returns a warning which does not seem like a good sign. Does anyone know how to resolve the following issue? LaTeX Warning: You have requested, on input ...
6
votes
3answers
1k views

Using a big brace over multiple lines - multiple lines left of it

I am super helpless, I wanna do the following: Mathmode, 2 lines on the left, a brace over both (using array) and than I wanna have 3 lines on the right. A small example: \begin{align*} \left. ...
6
votes
1answer
118 views

Parsing a \$ as part of an improved \getargs command

As the author of stringstrings, I am acutely aware of its slowness. For small tasks, that slowness can be annoying. For larger tasks, it can be prohibitive. Recently, in using data column as ...
6
votes
2answers
3k views

Make each column of a table have same width

I have a table as follows: &$\begin{array}{c|cc|cc} & x & \multicolumn{1}{c}{y} & i & 0 \\ \hline x & 0 & \multicolumn{1}{c}{} & -49 & \\ y & ...
6
votes
2answers
101 views

How to make the this brace bigger? “}”

here is my code: \begin{equation*} \left . \substack{ 2 \beta_{r,j}^{(l)} = \beta_{r,j}^{l-1} + \beta_{R+r,j}^{(l-1)} \epsilon_{m}^{j} \\ 2 \beta_{r,m+j}^{(l)} = ...
6
votes
2answers
2k views

Extra vertical space after \hline causes a gap in the right border of an array

I wanted to put a bit of space after an \hline in an array; the main suggestion floating round the Internet seems to be to use \hline \\ [-1.5ex] Unfortunately, this causes a gap in the line on the ...
6
votes
2answers
156 views

How to match left alignment of equations in math mode outside and inside an array?

My code is shown below, every equation is left aligned, my problem is that the equations inside the array enviroment seem to be indented. How can I align all the equations to the same vertical line? ...
6
votes
2answers
75 views

Problem with \pgfmathparse and font style of array elements

There are probably other ways to do that, but I was happy I've found this code working just fine for my needs: \documentclass{article} \usepackage{tikz} \newcounter{grpcnt} \def\groups{grp1, grp2, ...
6
votes
1answer
176 views

How to model {smallmatrix} with {array}?

It is pretty normal, I guess, to use \begin{array} ... \end{array} to model matrices, when more control is required than you get with pmatrix, bmatrix, etc., with the proper \left and \right, and the ...
6
votes
1answer
94 views

Combining rows and columns in array

I am trying to write some kind of blockmatrix \[A_n= \left( \begin{array}{cc|cc} && 0 & 0 \\ & A_{n-2}&n-2&0 \\ \hline\\ 0&-n+2&1&n-1 \\ ...
6
votes
1answer
2k views

Breaking an array of equations

I wanted to break long equations in an array environment. To do this, I used dmath environment from breqn package but it did not work. How can I write long equations in an array environment with line ...
5
votes
5answers
1k views

Automation: static array for the sieve of Eratosthenes

I would like to produce one simple array of numbers from 1 to 100 of dimension 10*10, where 1 will not be displayed. In Sieve of Eratosthenes in tikz there are pretty animations, but what I need is ...
5
votes
4answers
727 views

Big curly brackets and rotated text around table

I have a rather cramped looking table here showing the chance of a nurse touching a surface type given (s)he is doing a certain type of care. I would like to make a large curly bracket to the left of ...
5
votes
2answers
1k views

Underbraces in Matrix Divided in Blocks

How to put underbraces, inside the parenthesis of a matrix, to name both sides of the blocks? \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{array} \begin{document} . . . \[ ...
5
votes
3answers
5k views

Typesetting on block matrix is ugly

I have a large n x n matrix I'm trying to typeset. My current code is as follows: $\left(\begin{array}{c|ccc} 1 & c_2 & \cdots & c_n \\ \hline 0 & ...
5
votes
1answer
149 views

Block matrix equation with dimensioning

I need to write following matrix equation in LaTex. The dotted lines shown need to be present in the structure but need not have colors (could as well be black). I have used it here only to show the ...
5
votes
1answer
4k views

LaTeX doesn't recognize \end{array}

Following code ... \begin{align} \begin{array} 1 & 2 & 3\\ 1 & 2 & 3 \end{array} \end{align}... results in numerous errors: - Argument of \array has an extra } (line 0) - ...
5
votes
2answers
1k views

breaking lines in a matrix/array environment

I have a matrix whose entries are quite long and must be broken up across multiple lines. The desired break-points are the + operators separating terms in each matrix element. The following code is ...
5
votes
4answers
959 views

Table of displayed formulae

I'm trying to make a table of formulae. I've tried a bunch of different approaches (including \parbox, align, eqnarray, etc.), but none of these satisfy all of the requirements: \hline (or something ...
5
votes
2answers
559 views

How to show carries in long addition?

I am doing binary addition in LaTeX, and I cannot figure out how to show carried numbers above my work. (That is, 1 + 1 = 0 with carry 1, etc.) Here is a minimal example of my addition without ...
5
votes
1answer
313 views

array and line how to draw?

I want to know how can I draw the line that appears in the right of the image below, and also how can I write this array that appears in the left of the picture.
5
votes
1answer
378 views

tabularx and formatting entire column

This is obliquely related to this query, except that I would like to have a tabularx environment where the entire first column is in italics (or some other standard formatting). The following ...
5
votes
4answers
2k views

vertical spacing in array with double-spacing

Double-spacing seems to mess up the vertical spacing inside of arrays. For example, the braces below extend too high. Is there a way to have the array contents centered vertically within the braces? ...
5
votes
1answer
279 views

What environment to use in writing formal deductions?

Learning about mathematical logic, I have to write formal deductions*. How can I write them using TeX? Any feedback is welcome. (*)Roughly they are numbered lists over two columns, the first ...
5
votes
1answer
959 views

Changing the fontsize of selected column in table

I want to decrease the font-size of a selected column. I tried \documentclass{article} \usepackage{multirow,array} \usepackage{booktabs} \begin{document} ...
5
votes
2answers
700 views

Numbering Vertical Addition Problems

Right now I have the following for a vertical addition problem but I would also like it to be numbered without messing everything else up. \begin{array}{c@{\,}c} & 1 \\ + & 1 \\ \hline ...
5
votes
3answers
357 views

Is there a \foreach function that works in the preamble?

Tikz/PGF has an extremely useful implementation of \foreach, which allows for instance the construction \foreach \x / \y in {1/a,2/b,3/c,4/d} {\x is a lot like \y} in which you can iterate over a ...
5
votes
1answer
304 views

`missing $ inserted` Error when not putting $ before and after array environment

Considering this answer I added $ before and after the array, i. e. before \begin{array} and after \end{array} in the following code. Then the former missing $ inserted Error was gone. ...
5
votes
2answers
70 views

Array spacing in multiple line environment

Consider the following MWE \documentclass{article} \usepackage{amsmath} \begin{document} \begin{gather*} \renewcommand{\arraystretch}{1.2} \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix} ...
5
votes
1answer
4k views

Columns width of array environment

I'm using the array environment and have something like this: \begin{array}{|c|c|} \hline \textbf{x} & \textbf{y} \\ \hline \hline t_1 & lon_1 \\ \hline \end{array} I ...
5
votes
1answer
110 views

Array indexing does not work for the node label

There is something I cannot understand. I'm using array indexing and it works for determining the radius of the circles and to positioning the nodes. However it does not work as the node content. ...
5
votes
1answer
235 views

Drawing a grid on each image inside the array of images

Please see what I have written,when I need individual grid on each of picture inside my figure-array. In contrast to previews question Drawing a grid on array of images. Question now is why I can't ...
5
votes
1answer
606 views

Inserting arrays into semantic's inference rules

I want to typeset inference rules containing tables (or arrays) in the premises. I'm using the semantic package, which sets the premises (and conclusion) in math mode, so I thought this might work: ...
5
votes
1answer
73 views

delarray and colortbl issue

There seems to have a compatibility issue between the colortbl and delarray packages because when compiling the following code : \documentclass{article} \usepackage[T1]{fontenc} ...
5
votes
2answers
310 views

Gaussian elimination

I want to demonstrate examples of Gaussian elimination/the Gauss-Jordan method as shown below. There are some things that I like about what I have right now. Each column is the same width from ...
4
votes
2answers
3k views

Sub-numbering equations within array

I'm using the array environment to give multiple definitions of some value, let's call it x. I can easily get a reference to all 3 definitions together, but I want each one to have its own reference. ...
4
votes
2answers
2k views

left aligning the conditional statement inside an array

I have equations of the form a = b + d for i <= 4, j < 3 = c for i = 5 = d - e + u for i > 5 I am writing them using the following code in latex: \begin{equation} a = ...