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

learn more… | top users | synonyms

7
votes
2answers
286 views

How to stop fractions in display equations from running into each other?

Is there some standard way to create multiple display equations like the following without having to use: \renewcommand*{\arraystretch}{2} (so that the two rows in the second equation don't get ...
7
votes
5answers
326 views

Draw a vertical line over the entries of a column in an array

I'd like to draw vertical/horizontal lines over the entries of a column/row in an array. I find the method to draw horizontal lines at Draw a horizonal line over the entries of a row in an array. But ...
7
votes
3answers
189 views

Vertically Centering Math and Text in Array?

One problem I've always had is trying to make text and/or math text vertically centered in either the tabular or array environments. Take this for example: \documentclass{article} ...
7
votes
3answers
326 views

How can I determine the size of an array?

After a long search period, I was not able to figure out how to determine and use the len of an array like this: \def\mar{ 1,2 } \path let \p1=($(rec.west)-(rec.east)$), ...
7
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 & ...
7
votes
1answer
1k views

tabular and array

Consider the following example: \documentclass{article} \usepackage{array} \usepackage{calc} \begin{document} \begin{tabular}{p{\textwidth - 3cm}|p{1cm}<{foo}} Caption1 & Caption2\\ ...
7
votes
1answer
230 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
312 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
500 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 ...
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
7k 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
736 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
335 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
286 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
378 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
1k 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
216 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
819 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
487 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
3k 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
128 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
115 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
1answer
1k 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} ...
6
votes
2answers
80 views

How to split long expression inside left brace?

Please find below the equation I want to write on my Latex document but unfortunately i can't split the 2 expressions inside the left brace because they are too long \begin{equation} \begin{split} ...
6
votes
2answers
179 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
89 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
210 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
196 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
2k 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
806 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
1answer
706 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
2answers
2k 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
8k views

Clean-Looking Piecewise-Defined Functions

I want to write a clean-looking piecewise defined function. There's a similar post here: How to write a function (piecewise) with bracket outside?, but I have follow-up questions. The two options I ...
5
votes
3answers
6k 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
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
2k 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
1k 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
3answers
47 views

Array environment cell over two rows keeping alignment

I am trying to span braces over two rows while keeping the aligment in the following example correct alignment in this case the alignment is correct. I think I am nearly there, any help would be ...
5
votes
2answers
722 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
357 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
520 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
2answers
583 views

generating LaTeX tabular code during compilation

I use LaTeX for scientific reporting in brain imaging (fMRI). I have a tabular array in LaTeX, that contains quite a lot of rows and columns, which both are brain regions and in the each intersecting ...
5
votes
2answers
59 views

Decipher a code for an array environment

I saw on this web site two codes to get vertical alignment at the equals signs in consecutive systems of equations. One of them uses the systeme package and the \mathrlap command for the quantity on ...
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
359 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
2answers
809 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
363 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
33 views

Removing specific commas between array cells

Consider the following code: \documentclass{article} \usepackage{colortbl} \usepackage{cancel} \newcommand*\nonly[1]{\cancel{\textcolor{red}{#1}}} \begin{document} \begin{equation} \left\{ ...
5
votes
1answer
1k 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. ...