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

learn more… | top users | synonyms

4
votes
2answers
69 views

How do I change font in array environment inside an equation?

I have the following code to define a piece-wise equation as shown in the following figure: \begin{equation} \label{xput_vc} Throughput_{VC} = \begin{array}{cc} 1 & N_{VC} \leq N_{slave} \\ ...
2
votes
4answers
53 views

How to add vertical space before `hline` in `array`

I am trying to format the following table with more space below the horizontal lines. \begin{equation*} \begin{array}{|c|c|c|} \hline i & (266)_i & [266]_i\\[3pt] ...
2
votes
2answers
111 views

Instead of the left open brace, if I want an Arrow mark, how I can do it?

\begin{cases} First line\\ Second line\\ third line\\ \vdots \end{cases} is giving like, Instead of the left open brace, if I want an Arrow mark, how I can do it? One way is this, ...
1
vote
1answer
78 views

Make a group presentation with an array look better

I have written a presentation like that, but I want a way to make it look better. $$\left\langle \begin{array}[t]{l|cl} A_{13}, A_{32}, A_{21} &(A_{13}-t_{13,1})(A_{13}-t_{13,2})=0&\\ ...
2
votes
1answer
39 views

Eqnarray cannot handle lines starting with a bracket

I just noticed this, but it seem obvious. A construct like this \begin{IEEEeqnarray*}{rCl} a & = & b \\ [c]_d & = & \ldots \end{IEEEeqnarray*} Does not compile because latex ...
3
votes
4answers
216 views

Array stretch only for certain rows

When having inline math in tables, fractions etc. appear "squeezed". I have now added the line \everymath{\displaystyle} to my preamble after finding the answer here to another question. This very ...
25
votes
4answers
478 views

Expandable (quick) sort array macro?

I'm trying to implement a (quick) sort algorithm. Here is what I can do : \documentclass[preview, border=7mm]{standalone} \usepackage{pgffor} % \push{xs}{\i} add \i in the array \xs ...
2
votes
1answer
75 views

Use \multicolumn in array environment in Lyx

I want to break an equation in a longer equation array in Lyx. In pure Latex I can do something like \documentclass[a4paper,10pt]{article} \usepackage{amsmath} \begin{document} \begin{eqnarray} ...
4
votes
3answers
101 views

Aligning an element of an Array to a bracket

I am new to writing in Latex and I'm struggling with what is probably a simple formatting issue. In essence, what I would like is for the left square bracket to be in line with the comma after -a in ...
4
votes
1answer
37 views

Color Inside an Array

I am using the packages amsmath and color. The following works to color an entire array blue: \documentclass{article} \usepackage{amsmath} \usepackage{color} \begin{document} \[ {\color{blue} ...
5
votes
1answer
158 views

Matrix within matrix with numbering

What is the best way to create the below matrix in LaTeX? I tried two ways 1) using gather, pmatrix and vmatrix inside but cannot get the desired formatting \begin{gather} \begin{pmatrix} ...
0
votes
2answers
61 views

Problems with highlighting a single row in an array block

As shown in the image below, I am trying to create a simplex table by highlighting the pivot row and pivot coloumn. However I come across an issue when I highlight the pivot row as the command fills ...
1
vote
3answers
65 views

Centering from array package won't work

I'm working on a table right now and I would really like to center it to make it look neater. Only problem is after I import the array package, and then use the m{width} function. It doesn't seem to ...
2
votes
2answers
38 views

rotate one entry of an array

I have the following matrix and I want to rotate the entry in row 1 column 2 90 degrees so that it actually looks like a column. \left[ \def\arraystretch{1.5} \begin{array}{ccc|c} ...
0
votes
1answer
47 views

How can I shift an array further left?

I want to move an array about 3 or 4 cm further to the left. Knowing how to align it on the left side of the page could be useful too. The code is: \documentclass{article} \usepackage{graphicx} ...
4
votes
2answers
175 views

Creating truth tables using over/underbrace with array environment

Using the code \documentclass{article} \usepackage{amsmath} \usepackage{array} \newcolumntype{C}{>$c<$} \begin{document} \[ \begin{array}{C|C|C|C|C|C} $p$ & $q$ & $p\land q$ & ...
1
vote
1answer
54 views

overriding \everymath color: Is there an efficient way to apply color on every line for all arrays, and doing the same for cases as well?

TLDR; How does one efficiently apply color on every line of every array to override the color by \everymath? i.e from to (A compilable example of this is at the bottom) Is there a way to ...
2
votes
1answer
34 views

Align polynomials on multiple rows in a table

I want to format a table with polynomials in each column. These polynomials do not necessarily have the same degree, and their coefficients can be any rational number. The terms of the polynomial ...
2
votes
1answer
84 views

combine tabularx and dcolumn and define column width in dcolumn

Problem description I am trying to combine the tabularx and dcolumn usepackage in LaTex to format my table. My aim is to create a table that; stretches the width of the text has fixed (2cm) column ...
3
votes
1answer
224 views

Creating a transition probability matrix

I would like to create a transition probability matrix, like the ones found in a textbook I'm using, An Introduction to Stochastic Modeling by Mark A. Pinsky and Samuel Karlin. The double bars are ...
3
votes
1answer
71 views

Vertically center elements in rows of array

In the following table, I would like to center the Venn diagrams vertically. Here is a MWE showing my diagrams aligned "top": \documentclass[letterpaper,10pt,american]{article} \usepackage[left=1 in, ...
3
votes
3answers
322 views

Moving a matrix (array) to the left margin

So, of particular interest to my question is the second to last line of the following code: \documentclass[]{article} \usepackage{amsmath} \usepackage{units} \usepackage{amssymb} \usepackage{array} ...
1
vote
1answer
77 views

Get element from array

considering the generic table \mytable, to get an element from there I am using \pgfplotstablegetelem{\row}{[index]\column}\of\mytable. but if I don't have a table but an array? the case is this: ...
0
votes
1answer
65 views

Alignment of multiple align-blocks

I try to align multiple blocks of equations in such a way that the same alignment is used for the different blocks. I am currently using align with an array-environment for each line. By specifying ...
1
vote
1answer
26 views

Separate a long equation in an array environment

I wanna to separate a long equation in an array environment, as it shows in the following graph: Place the right part of || to the below of =. CODE: \[ \Delta P_k^{ij} \; \text{is} \; \left\{ ...
1
vote
2answers
88 views

Tikz - parametrically set node text

I want to have a circle of nodes in tikz, and the text in each node needs to come from an array. How do I achieve this? The following does not work. \documentclass{article} \usepackage{tikz} ...
5
votes
3answers
129 views

Arranging equations neatly in rows and columns with a single numeration for all

Say I want to write a set of equations in a systematic way, more like the ones in a matrix but without the matrix parenthesis on the left and right-hand sides. More like: A=1 A=2.5 C=8 B=9 B=0 A=2 ...
12
votes
3answers
445 views

Matrices in latex

Trying to create a matrix using the below markup: \begin{figure} \centering \[ \begin{blockarray}{cccccccc} I & like & nlp & mlpr & enjoy & reading & books \\ ...
2
votes
2answers
167 views

Adjust Array Column Width to Fill Page

I am trying to make use of the array environment (anything that operates similarly would suffice) that will automatically stretch the columns to be even-width and spread across the entire page. One ...
6
votes
2answers
473 views

Using arrays to align parallel equations: Why isn't $|z|$ centered?

There was an earlier question about aligning different parts of two parallel equations in a multiple line environment, and I'm trying to adapt Werner's answer that used an array for my own use. ...
4
votes
2answers
80 views

Odd spacing due to diagonal dots in pmatrix environment

I'm trying to typeset this matrix, but it seems the spacing between the fourth and fifth lines is off, perhaps due to the diagonal dots : Here is my Latex code : \[ \mathrm{Mat}_{\mathcal B}D = ...
0
votes
3answers
63 views

Table rows | single line | double line | of text not lining up

I have a table with two columns, the width of each column is set. There are cases where the left hand text is one line and the right hand text is two lines. As a result the left hand text is aligned ...
0
votes
0answers
29 views

how to draw shift operations and rotation of digital electronics in latex

how to draw the arrows as shown in the picture .Please Guide.
4
votes
3answers
69 views

Multicolumn in array . How do I place the dividend in right place?

Edit: The original question before being re-edited too much: \newcommand\divspace{\,} \[ \arraycolsep=0em \begin{array}{r@{\divspace}c@{\divspace}lllll} & & ...
4
votes
2answers
69 views

Is there a way to decrease the row separation in arrays?

I would like all the arrays I generate in a document, using the normal array environment, to have slightly smaller distance between rows, but the same column separation. Is there a simple way to do ...
5
votes
4answers
149 views

How can I align the < signs in my array (piecewise function) in TeX?

I don't know how to use align with an array, any suggestions? I'd like the first < sign in each line to match up while retaining the alignment that I currently have. Here is my code: \be ...
2
votes
2answers
89 views

Bolding the first column of a table in math mode

What I want to do: Create a table in math mode without $...$ everywhere Bolding the first column What I have done: Using >{$}c<{$} to put table in math mode; see this answer. Following ...
1
vote
2answers
32 views

Left align the array conditional

The conditional appears in the center of the line, I would like to left align the conditional. I have tried quite a few things and ultimately settled on the following. Is there a way to left align ...
4
votes
1answer
423 views

Redefining \bordermatrix

Greetings to all of the community! Could anyone help on redefining the \bordermatrix to get results as shown? The initial question was about changing form of braces (and there is a thread about it) ...
7
votes
3answers
213 views

Display math gets typeset as inline math

When typesetting the below annotated equation my summations are being typeset as inline maths rather than display maths. If I wrap the sum and subscript with \smashoperator{} then they are typeset ...
1
vote
1answer
205 views

How to create LaTeX example codes using verbatim and large braces?

I read this question it's useful but isn't exactly what I need. My problem consists in create an array, table or something like that with two columns. In the left one I need to put LaTeX code with ...
2
votes
1answer
1k views

Creating a Payoff Matrix Using LaTeX Tabular Environment

I'm trying to use my limited knowledge of LaTeX to create a payoff matrix by hand. Here's my first try: \begin{tabular}{cc|c|c|} & & Player $Y$ & \\ ...
1
vote
2answers
41 views

How to put several diagrams in one row?

Here are my codes for four arrays. Is there a way to put four diagrams together in the same row instead of put one of them above the other without exporting them as images? (a)\begin{displaymath} ...
0
votes
3answers
64 views

Spacing in Multicols and Array

The following shows my work in LaTeX recently: I made this with the following code: \documentclass[12pt,lettersize]{article} \usepackage[top=1.25in, bottom=1.05in, left=0.5in, ...
2
votes
1answer
145 views

Matrix: hline is cut by cmidrule

I want to emphasize a block structure in a matrix by both, vertical and horizontal lines. Since I am using bmatrix as matrix environment I had the issues as in How to shorten \hline in a matrix. I ...
1
vote
1answer
34 views

Array search using arrayjobx

I'm using the arrayjobx to store data in arrays, and I want to search through those arrays. For example, I might have a list of names and places and I want to search through those names to find the ...
1
vote
1answer
56 views

Special alignment

Can anyone tell me how you can I do such alignment in an efficient way? I tried several things within the array but I didn't find the way.
0
votes
0answers
24 views

How to translate an array of equations with the use of align to the use of array? [duplicate]

Translation between eqnarray and align is known: How to write an array of equations without using eqnarray? How about the translation between: align and array? Although the use of ...
5
votes
2answers
178 views

Split within a matrix environment

I have an array that looks like this: I'm not sure how I can add the curly brackets and text there. I formatted the array like this: \begin{equation*} \begin{array}{r*{10}{l}} \trom{1} & ...
0
votes
1answer
113 views

Using “align” instead of “array” in an array of equations [duplicate]

I want to produce big parenthesis like this: Left brace including several lines in eqnarray How do I do this with align instead of array? I do not want to use eqnarray though. Thanks.