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

learn more… | top users | synonyms

2
votes
1answer
129 views

Unusual problem with eqnarray

I have this code that gives me two problems: y and x are displayed incorrectly in the first and third row of the eqnarray, like if they had a \rm in front of them, why? it gives me main.tex:91 ...
7
votes
1answer
634 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) =% ...
2
votes
1answer
1k views

Missing $ inserted. [\begin{array}{|c|cccccccccc|}]

This latex code \begin{figure}[H] \centering \begin{array}{|c|cccccccccc|} \hline ~ & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline 1 & 1 & 2 & ...
3
votes
1answer
159 views

Distance between array rows

I am using the array environment to create a multiple row bracket expression, as folows: \documentclass{article} \begin{document} \begin{equation} \left\{ \begin{array}{lll} ...
3
votes
1answer
292 views

Array as subscript

While $\begin{matrix} 2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3 \end{matrix}$ looks great for the highest root of $\mathsf E_8$, $s_{\begin{matrix} 2 & 4 & 6 & 5 ...
3
votes
1answer
410 views

Replicate a typesetting of polynomial long division

I found a typesetting of series long division I want to replicate in a book I've been reading: So I tried with the following code (using different polynomial than the example): \begin{align*} ...
2
votes
1answer
58 views

Truncated body in tabular array mode

I have the following format : \documentclass[12pt]{book} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsmath} %\usepackage{graphicx} \usepackage[total={7in,10in},top=1in, ...
6
votes
2answers
249 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 ...
4
votes
1answer
475 views

How to add vertical and horizontal dashed lines in array and tabular enviroments?

I want to present big matrices using concatenation of rows and columns with dashed lines. Also, I need to do the same for some tables. Is there any way to insert dashed lines in arrays and tabulars, ...
10
votes
2answers
310 views

Selective alignment tabs in tabular/array?

For a while now I've been thinking about an array/tabular feature that would be quite nice to have. It doesn't seem to exist yet, as far as I can discover. And unfortunately, I can't spare the time ...
3
votes
2answers
1k views

Scale down a array contained in an equation - beamer

I have an array inside an equation in a beamer presentation. I tried scaling it down using resizebox but it gives me error : \begin{equation} \label{eq:recursive} \resizebox{\linewidth}{!}{ ...
3
votes
1answer
247 views

Numbering all lines of an array

I know there are already many topics about that but I couldn't find an appropriate answer (most of the time the given solutions are not adapted to my case). Here is my code (some command have been ...
3
votes
1answer
623 views

Array inside Algorithm with underbrace and sidebrace

I'm writing my master's thesis (using LyX's thesis template) and am trying to display an algorithm. Since LyX's algorithm support doesn't quite cut it for me, I've decided to go ERT with LaTeX code ...
1
vote
1answer
342 views

“[” Square bracket Curiosities in an array environment [duplicate]

I am aware of the fact all of the following examples are in fact not the right way of doing whatever they do. But, I came across these examples by playing around with the code that WinEdt produces for ...
5
votes
1answer
249 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 ...
2
votes
1answer
436 views

Multicolumn/multirow inside align

Is there a way to use \multicolumn or \multirow inside an array environment which is inside align environment? For instance, the following piece of code gives me an error. What is the way around this? ...
7
votes
3answers
5k views

aligned environment of amsmath vs array environment

Today I found out the existence of the aligned environment of the amsmath package. However, I can't see the advantage of using it instead of the array environment from the example provided in ...
6
votes
2answers
611 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} ...
2
votes
1answer
2k views

Two double-line equations need double left brackets

I have four lines of equations. The first two and the second two need to be grouped by a left bracket, and all four need to be grouped by one overall left bracket. I am using an array within an ...
4
votes
2answers
501 views

“! Missing number, treated as zero.” error in an array

\documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[a4paper]{geometry} % change later to \usepackage{geometry} ...
6
votes
3answers
364 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
2answers
534 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 ...
4
votes
1answer
514 views

Problem while using multirow with graphics

I have a problem with the multirow command. \begin{array}{|c|c|} \includegraphics[width=1.5in]{1} & \multirow{2}{*}{ \includegraphics[width=1.5in]{3} } \\ \hline \includegraphics[width=1.5in]{2} ...
2
votes
1answer
522 views

Brace spanning multiple rows in a table and horizontal alignment

I'm a beginner trying to do an brace inside a table, that is spanning multiple rows. I assume the best way to achieve this is to do a two-row tabular environment, with an array environment for the ...
3
votes
1answer
57 views

Does align environment (or an alternative) have an option to choose left, center or right alignment?

I have quite a long set of equations, written in an array environment, but I can't seem to get it to split so that it is spread over multiple pages. I could use the align environment, but I can't seem ...
7
votes
2answers
452 views

cases environment inside an array

LyX is giving a lot of error messages for my Latex code which runs in other places. \[ \begin{array}{rl} p_{Y \mid H_1}(y \mid H_1) & = f_X(g^{-1}(y))\left| \dfrac{dg^{-1}(y)}{dy} \right| \\ \\ ...
5
votes
4answers
765 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 ...
8
votes
3answers
12k 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
118 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
124 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
185 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
139 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
274 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
82 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
606 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
752 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 ...
8
votes
1answer
4k 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
326 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
76 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
463 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
80 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
743 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
403 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
788 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
9k 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
157 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
470 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
261 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 ...