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

learn more… | top users | synonyms

0
votes
1answer
52 views

Highlight matrix cell and have arrows pointing from cell with text [duplicate]

This code is building from the solutions posted here. I am trying the approach suggested from the duplicate solutions. I am having two issues: I am not sure how to get the arrow to point to the ...
3
votes
1answer
28 views

Custom align, three \beta = statements, so the beta is custom aligned vertically, and the matrices/vectors are all vertically aligned

Something like: \beta = [], \quad \beta = [], \quad \beta = []. So that the three forms of beta fit on one line. I want the \beta = to valign with the first element of the vector/matrix. I want ...
4
votes
2answers
34 views

How to have 2 arrays of variables in one document

I've used an example from Create an array of variables By adding a new \newcommand as in the code below: \documentclass{article} \usepackage{etoolbox} \newcounter{cnt} \newcommand\textlist{} ...
1
vote
1answer
22 views

Making a beamer page that includes an array. Code included

Please help with code below. Firstly, beamer seems to insist that every line within the array code requires its own begin and end $ signs. Then, though I've checked this for hours, it insists that ...
2
votes
1answer
30 views

How to make the distance between two rows larger in array?

I found a mathematical formula in mathdesign document, it looks good and elegant When I try to type it as it looks, what I got is always not as good as origin. The code I use is ...
1
vote
1answer
15 views

Missing endcsname inserted error

I have the following latex code which produces the error mentioned in the title: \documentclass{article} %\usepackage{flexisym} %\usepackage[T1]{fontenc} %\usepackage{array} \usepackage{setspace} ...
1
vote
1answer
30 views

How to use values from a 2d array in a tikz picture ? (out of bounds error)

I would like to use a list of values from a 2d array in a Tikz picture. The code bellow works while using a random number : \pgfmathtruncatemacro{\r}{round(rnd*20)} But when I replace it with the ...
1
vote
1answer
28 views

How to vertically center cells (tabular) without altering the automatic column width?

In the following file I have a table with insertion of figures. I want to vertically center the cell contents. Only the cells in the second and third rows. But I do not want to leave intact the ...
11
votes
3answers
321 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
37 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} ...
2
votes
1answer
24 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
24 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 ...
1
vote
0answers
46 views

design multiple array using tikz

I would like to design multiple array like this using tikz:
3
votes
3answers
105 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
20 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
30 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
63 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
35 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 ...
1
vote
2answers
37 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
43 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 ...
1
vote
1answer
43 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
53 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
48 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
97 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
63 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
31 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
161 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
460 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
47 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
86 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
33 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
82 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
54 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
58 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
32 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
29 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
132 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
52 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
27 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
57 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
125 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
65 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
185 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
61 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
50 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
22 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
123 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
415 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 \\ ...