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

learn more… | top users | synonyms

10
votes
3answers
16k views

Adjusting space between array rows and columns

\documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{babel} \begin{document} % ... \[ \begin{array}{ccccc} x(1) & = & \frac{x(0)}{1} & = ...
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} . . . \[ ...
0
votes
1answer
132 views

Aligning an array in align*

I was trying to make a 3 point list with a brace next to 2 of the items with text next to it and than a brace that covered all three again with text next to it. I had never used an array before but I ...
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
1answer
212 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 ...
9
votes
1answer
147 views

Using an array environment inside an xparse command

I would like to define a macro for optimization problems. My attempt is given below. I am wondering why \optimizationproblema works, but \optimizationproblemb does not (I get a "misplaced alignment ...
8
votes
1answer
306 views

Replacing Leading Minus Signs in Environment

In this question concerning negative signs and the alignment of entries in matrix environments, Heiko Oberdiek gave a great answer in which he uses a user-defined command called \matminus instead of ...
1
vote
0answers
83 views

how to store page numbers in array and retrive them later? [closed]

I am working on one application where i need to store page numbers in an array and retrive them later to print index. I don't want to use the existing index function as i need to have control on it. ...
5
votes
2answers
723 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 ...
3
votes
1answer
960 views

How to draw the following table (simplex tableau)

I would like to draw table, I tried, \begin{equation} \begin{array}{c} z \\ s_1 \\ s_2 \\ s_3 \end{array} \begin{bmatrix} \begin{array}{c|ccccc|c} z & x_1 & x_2 & s_1 & s_2 ...
9
votes
1answer
5k views

Systems of equations with a single number

I want to write a numbered system of equations. Right now, this is what I do and I am satisfied with the output, but I have a feeling it's not the best way to do it. \begin{equation} ...
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
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? ...
4
votes
2answers
78 views

Labelling three-column array

I got this code: $$\begin{array}{lcr} a_{11}\cdot x_1+a_{12}\cdot x_2 &+ … + &a_{1n}\cdot x_n=\alpha_1 \\ a_{21}\cdot x_1+a_{22}\cdot x_2 &+…+&a_{2n}\cdot x_n=\alpha_2 \\ &\vdots ...
4
votes
2answers
507 views

Block matrices, separator with space

I want to write block matrices like the one shown below I tried underlining, fraction, and using __ as an entry by making three rows but they did not look nice.I want the horizontal lines inside ...
3
votes
1answer
87 views

Add spacing before and after `\hline` in an array in an equation

I'm trying to add a little bit of space before and after the \hline in this matrix: \documentclass[a4paper,journal]{IEEEtran} \usepackage[cmex10]{amsmath} \interdisplaylinepenalty=2500 ...
2
votes
1answer
868 views

Algorithmcx and array representation

I'm using package algorithmcx and algpseudocode to describe an algorithm in a paper. Each function in the algorithm receive an array/list of numerical values, e.g. {x1, x2, ..., xn}. ...
8
votes
2answers
440 views

Pretty lists for sorting algorithms

I would like to obtain easily something like in this picture so as to illustrate several sorting algorithms. To produce one line, I would like to use one command of the following kind where the ...
12
votes
2answers
874 views

Array cell highlighting tikz

I'm beginning to write up a PhD thesis and am pretty new to LaTeX. I'm trying to explain a numerical method I'm using and in doing this I wish to highlight sections of arrays to aid explanation. The ...
4
votes
2answers
12k views

Numbering an array as one single equation LaTeX

I've looked around at various sites and tried switching between array/eqnarray but don't seem to be able to get the effect I would like. I want to simply give an array I have one single equation ...
3
votes
1answer
175 views

In array env how to add extra space between two columns and how to have enumeration across rows?

In array env, how to add extra space between two columns? how to enumerate acrossrows? e.g.
11
votes
4answers
563 views

How to construct a logic argument with colored hline with length under control?

How to construct a logic argument like this one? I can construct it like this: Latex of my argument: \documentclass[10pt]{article} \usepackage{newtxtext} \usepackage{newtxmath} ...
3
votes
1answer
273 views

Pgfplotstable adding a growth column without column names and then offsetting it

I'm trying to create a new column in a pgfsplotstable which shows the compound growth over the preceding columns. The columns don't have names, and I want to shift the column a little to the right to ...
2
votes
2answers
232 views

Draw a horizonal line over the entries of a row in an array

How to draw a horizonal line across a row (over the entries) in an array?
13
votes
1answer
5k views

A Matrix with labels, dashed lines

I'm trying to TeX the following matrix, from Guillemin and Pollack (1.4 #13) The best I've been able to do is get the dashed lines with \[ \left( \begin{array}{c:c} B & C \\ \hdashline D ...
5
votes
1answer
522 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
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 ...
10
votes
1answer
4k views

Negative Sign and Matrix Alignment

I am having trouble centering the elements of a matrix such that the negative sign is not taken into account during alignment. Additionally, I would also like the space between the left parenthesis ...
3
votes
2answers
249 views

having problems using arrayjobx with tikz - how can i use arrays in tikz?

I need the help of some smart people ;) I want to draw a picture with TikZ, which is heavily based on randomization and I want to make it quite parametrized. It's actually a graph of n nodes where ...
4
votes
2answers
4k 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. ...
2
votes
2answers
583 views

array environment with tags/labels

I try to come up with a couple of formulas which should be aligned according to a relation symbol but also to the left. Have a look at the following example: \documentclass{article} ...
1
vote
0answers
60 views

Brace and Array with \frac and \cos, Height [duplicate]

Possible Duplicate: Using display style fraction in a matrix environment How do I create a left brace for an array such that it surrounds all the elements of the array? This is happening ...
1
vote
1answer
60 views

svmono array padding

The svmono class (available here) butchers spacing inside arrays; compare \documentclass{svmono} \begin{document} $\begin{array}{|l|} text \end{array}$ \end{document} to the same in the article ...
9
votes
1answer
297 views

What is best practice for aligning distinct arrays or tables side-by-side?

I have two related tables that could naturally be displayed side-by-side but don't have to be. However, it saves space to display them side-by-side rather than one atop the other. If I do so without ...
2
votes
1answer
307 views

How can I write a matrix using the whole page width in a two-colum document?

How can I write a big matrix (or array) in the width of the page while using two columns for all paper? I know that for figures (figure*) can be used, is there any way to do it for arrays?
7
votes
3answers
327 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)$), ...
5
votes
1answer
318 views

Counters for use in array/tabular cells

The following practical example \documentclass{article} \usepackage{array}% http://ctan.org/pkg/array \newcounter{tabcol}\newcounter{tabrow} \newcolumntype{C}{>{\stepcounter{tabcol}}c} ...
8
votes
2answers
3k 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 ...
3
votes
1answer
148 views

Line breaking and floating

I have a matrix and I want to show some lines of text floating right to the matrix. The problem is that the following code shows two lines of text without executing \\ break-line. \[ M = \left( ...
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
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 ...
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 ...
1
vote
1answer
280 views

Overbrace is not alligned correctly

Here is an equation: \documentclass[a4paper,10pt]{report} \usepackage{xltxtra} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{array} \usepackage{unicode-math} ...
3
votes
3answers
6k views

Array alignment within align environment

I am trying to typeset an array within an align environment, aligning to a specific separator in the array. In the following example, I want to align on the ":" separator in the array. ...
4
votes
1answer
809 views

Text column in array

I am trying to do something that seems relatively simple but I can't get it to work. Basically, I would like one of the columns in my math mode array to be text, so I am trying to use pre and post ...
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} ...
13
votes
3answers
2k views

Using \underbrace with table columns

I have the following code: \begin{displaymath} \begin{array}{|c|c|c|c} p & q & p\lor{}q & p\land{}q \\ \hline 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 1 & 0 ...
4
votes
3answers
2k views

adjust the array size to the size of the frame+Beamer

I inserted a table into a page of a presentation Beamer but the problem is that the array size exceeds the frame. How to adjust the array size to the size of the frame?
1
vote
1answer
103 views

Compiling errors in a matrix that correctly show up?

I have a little problem with nested arrays. The following examples give the correct matrix after a Latex=>PDF run but generate LaTeX errors ! missing $ inserted. <inserted text>, that I would ...
9
votes
4answers
155 views

Restore the original array code

The arraypackage redefines array in various ways. I was woundering if anyone had made a package containing a localized (prefixed) version of the kernel array? I have a document were we have a simple ...