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

learn more… | top users | synonyms

11
votes
3answers
365 views

What all those @{} resp @{\quad} in preamble of this array mean?

as I was reading different question This one I've found code of array enviroment which preamble is quite unknown to be... I see what it does but I would like to understand it to be able use that ...
1
vote
1answer
46 views

Formatted table based on arrayjob

I want to setup a rowcolor and the cell content of a tabular accordingly to the values stored into an array (arrayjob). The next MWE \documentclass[10pt]{article} \usepackage{arrayjob} %\usepackage{...
2
votes
1answer
30 views

Separators in array (for a matrix) have different, wrong sizes

Why is it so and how to fix it? \documentclass{article} \begin{document} \[ A = \left ( \begin{array}{c|c|c} \\ C_1 & \cdots & C_q \\ \\ \end{array} \right ) \] \end{document}
1
vote
1answer
54 views

Align/Array equation - explain the options

I have searched and found a solution to a problem I had here: Horizontal alignment, but now I have a follow-up question (and can't comment there because I have little reputation): The code in the ...
0
votes
0answers
54 views

design multiple array using tikz

I would like to design multiple array like this using tikz:
3
votes
3answers
125 views

Mathematical optimization problem doesn't look good

I was trying to write an optimization problem in which "subject to" part is a vector statement. however it doesn't look good. \[ \begin{array}{clcll} \textrm{min} & \|k_i\|^2 &\...
2
votes
1answer
34 views

Problem displaying figure captions from array while looping

I'm attempting to generate multiple Figures using the code below. However, I'm having a problem with \caption{\questions(\plotNum)}. The error I receive is Incomplete \iffalse; all text was ignored ...
3
votes
3answers
35 views

Array — dynamic !{decl.} parameter

I use !{=} in array to make compact equation, but on the last line I'd like to have \approx instead of =. Is it possible ? \documentclass{standalone} \usepackage{array,tabularx} \begin{document} $...
3
votes
3answers
80 views

Align environment with optional columns

I'm working with formal grammar in LaTeX and would like to write some of the shorter rules in the same row in order to save space. The rules are aligned using the array environment and I'd like to ...
1
vote
2answers
51 views

How can we give a single number for a system of equations?

I want to type the following equation, as it is.. I need the left flower to be right and the numbering also should be right.. How I can do that? Do we have an environment like \begin{...
1
vote
2answers
49 views

Aligning inside a table across a column

I have a table in which a column looks like this: I want to align the $\ge$ signs one below the other. How do I achieve this? I was also hoping that the solution would be generalizable, in the ...
0
votes
0answers
10 views

Problem with brackets in more than one row [duplicate]

I format my equations with an array to have them look nicer. I also use the \left( and \right) for brackets. One part of the equation is too long and needs to be splitted into two lines. This is my ...
2
votes
1answer
53 views

Writing over a tikz array

i have this array. I need to write over each cell. For example, i have to write "S" and "E" over the array and not inside. Can anyone help me? \begin{tikzpicture}[>=latex,font=\sffamily,every node/...
1
vote
1answer
83 views

Curly braces in arrays

How is it possible to make a big right curly brace and have something like this in an equation array block? My code doesn't work, can anyone find the problem? The left curly brace at the end of the ...
4
votes
2answers
90 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
55 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
118 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, $\left\...
1
vote
1answer
93 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
44 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 ...
4
votes
4answers
274 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
492 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 \def\push#1#2{...
2
votes
1answer
132 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
108 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
38 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} \left(...
5
votes
1answer
222 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
63 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
44 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
64 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
206 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
60 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
40 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
117 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
285 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
74 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
440 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
93 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
71 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
27 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
90 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
138 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
462 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 \\ \begin{block}{[...
2
votes
2answers
188 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
477 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
98 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
66 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
33 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
70 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} & & \multicolumn{4}{l}...
4
votes
2answers
71 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
155 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 \frac{M_{...