Questions tagged [arrays]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
102 views

Using \newcolumntype definition together with colortbl package

I just upgraded my Miktex distribution and I am not able to compile my MNWE example (see below) \documentclass{article} \usepackage{array} % tex.stackexchange.com/questions/12703 \...
2
votes
2answers
220 views

Add extra row height except the first for “array”

I know for tabular, there is \extrarowheight that can add the extra row height to every row. Now I have a special purpose that I must need the array environment. However, \extrarowheight does not work ...
0
votes
1answer
29 views

insert a array (e.g. a stencil) inside an array (e.g. a tabular)

I would like to insert a array (e.g. a stencil) inside an array (e.g. a tabular), in a cell next to the formula. Is there a way to do it? \documentclass[a4paper, 12pt]{book} \usepackage{amssymb, ...
0
votes
2answers
517 views

partitioned matrix with row and column label

how can I create the following matrix with the array environment? I don't have an idea What I have got is this $$ \left[ \begin{array}{c|c|c|c} \Pf_{AA} & \Pf_{AB} & \mathbf{0} & \...
5
votes
1answer
302 views

conflict between tikz (was: todonotes) - tabularx - array - arydshln

There is a conflict between the four packages tikz, tabularx, array and arydshln. The MWE below compiles, if I do not load tikz ( tikz.sty 2015/08/07 v3.0.1a (rcs-revision 1.151)) (load todonotes ...
0
votes
1answer
95 views

Insert commas in a table/array

I have a table, of the form \documentclass[hyper,12pt,A4paper]{article} \usepackage{latexsym,amsmath,amsfonts,amssymb} \begin{document} \begin{align} \begin{array}{cccc} ab=0 & cd=1 & ...
1
vote
2answers
101 views

Array Label of each 3 line

I want to label each three line of an array like the picture. Can Anyone help, please?
0
votes
1answer
40 views

Alignment of a table around decimal point

I have the following code in latex {\begin{array}{c|c} integer&real\\\hline 1&114.12382811\\ 2&64.284747272\\ 3&0.000267356293929\\ 4&273912624.91\\ \vdots&\vdots\\ \end{array}...
-1
votes
1answer
65 views

How written array long

How written array long? i want written this but i get this: \documentclass{article} \usepackage{amsmath} \begin{document} \[ a=hardlim(Wp_1 +b)= hardlim ([\begin{array}{ccc}0.5&...
1
vote
1answer
147 views

How to typeset an array

I would like to produce the following: what is the error? \documentclass{article} \usepackage{tikz} \usepackage{float} \usepackage{amsmath} \usepackage{copyrightbox} \begin{document} ...
4
votes
1answer
853 views

3D matrix visualization, like in Python

I want to create something like the following, however I can’t add red brackets and the commas. This is my code: \[ \left[\left[ \begin{array}{ccc} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & ...
6
votes
3answers
174 views

Two down arrows over specific separator lines of an array

I need to make a figure like the attached image, which contains multiple arrays, two down arrows over the specific separator lines of the first array and text above these two arrows. I could make the ...
1
vote
1answer
151 views

How can I place an array in empheq environment?

I'd like to place an array in a empheq environment. I tried the following code which gives the error: Paragraph ended before \empheq was complete. \documentclass{article} \usepackage[utf8]{inputenc} \...
7
votes
2answers
874 views

How empty cells in tikz table (matrix)?

I am trying to recreate below table in tikz (I need because I could use tikz in my jupyter notebook to render embedded output but not yet latex) When I try via tikz I only get this far.. My MWE: \...
0
votes
0answers
514 views

Disappearing border lines in table

I am trying to draw a table like below. The preview in overleaf is perfect as shown below. However, after I render in texstudio using pdflatex, the cell border lines are sporadically missing like ...
0
votes
2answers
112 views

How to draw this picture?

Hello. How can I get a picture like this? It's a part of a bubble sort algorithm. Thanks in advance.
1
vote
1answer
52 views

Subequation Numbering and placement arrangements

\begin{subequations} \renewcommand\arraystretch{1.33} % or some other suitable value \begin{flalign} {}_{\mathrm{L}}^{}\mathbf{M} &\equiv \begin{bmatrix} {}_{\mathrm{L}}^{}\mathbf{M}^{\...
1
vote
2answers
367 views

Range Subequation numbers like (1a-z) instaed of 1a, 1b, 1c, 1d, 1e, …1z

\begin{subequations} %\begin{flalign} \begin{eqnarray} _{\mathrm L}\mathbf{M} \equiv \left\[ \begin{array}{ccc} _{\mathrm L}\mathbf{M}^{\mathrm ...
0
votes
2answers
71 views

I've done it before, but now it gives me errors

I wanted to compile this, but I had difficulty. \begin{multicols}{2} \begin{enumerate} \item\[\begin{array}{rl} & p\land q\\ & p\\ \arrayrulecolor{red}\cline{2-2} \therefore & q ...
0
votes
1answer
42 views

How can Text be vertically centered, but horizontally aligned to the right?

This is my example: ignore the German text. \documentclass[a4paper,11pt]{article} \usepackage[left=3cm, right=4cm, top=2cm, bottom=2cm]{geometry} \usepackage{array} \usepackage{tabularx} \usepackage{...
4
votes
3answers
266 views

Alignment of terms within align environment

The solutions below require up-to-date versions of LaTeX When I tried to run the solutions below on my own machine I was not able to reproduce their results, but still got unwanted offsets. This was ...
4
votes
2answers
8k views

I am getting “illegal character in an array arg”

\documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{equation} {S}= \left(\begin{tabular}{1} &\centering\{B_{M,i}\}\\ &\centering.\\ &\centering.\\ &...
1
vote
2answers
209 views

Align matrix correctly

I have a matrix with "description" of the Elements on the left side and on the matrix. So the matrix is in exactly the same row as the description, but the columns are not in exactly the same line as ...
1
vote
2answers
229 views

Splitting and flushing equations inside align

MWE \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} &f = \text{here goes a very very very very very long equation} \nonumber \\ &\hspace*{7.5cm} + \...
2
votes
0answers
46 views

Add vertical space for individual lines in an array in LyX

I know that I can add vertical space for individual lines in an array in LaTeX by including an optional argument after the line break (see example below). Is there way to do this in LyX without using ...
50
votes
4answers
106k 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
115 views

adding array package changes vertical space in long table

I need to put listings inside one of the columns in a long table. The actual longtable I have is more complicated, but I made a MWE below to show. I am using the solution given in how-to-remove-extra-...
2
votes
1answer
47 views

Narrow and (vertically and horizontally) centralised fbox

Does anyone know how I can create a Narrow and (vertically and horizontally) centralised \fbox, whose content is an array. For instance, I have the following code: \documentclass{article} \begin{...
5
votes
2answers
259 views

How to make all the connections from a node have the same color?

I'm trying to make too much node connections to have the same color. I tried to create a list of colors and another of nodes, but the list of nodes doesn't work. Here is my non-MWE: \documentclass[...
38
votes
6answers
14k views

Using display style fraction in a matrix environment

I'd like use the \dfrac command in a bmatrix environment as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \dfrac{\partial f}{\partial x} \\ \dfrac{\...
2
votes
2answers
168 views

Vertically alignment in tabular seems broken

Using m columns in a tabular, I would expect to get vertically centered cells: \documentclass[a4paper, 12pt]{article} \usepackage{amsmath} \usepackage{array} \begin{document} \normalsize \textbf{...
3
votes
2answers
70 views

Introducing a point space in equations with a matrix within an array

When I try to use \documentclass[11pt,a4paper]{article} \usepackage{amsmath} \usepackage{arydshln} \begin{document} \[\left[ \begin{array}{c:c:c} \begin{bmatrix}A_l& A_{nl}\end{...
0
votes
1answer
97 views

Reducing the vertical line height in an array environment

When I try to use \documentclass[11pt,a4paper]{article} \usepackage{amsmath} \usepackage{arydshln} \begin{document} \[\left[ \begin{array}{c:c:c} \begin{bmatrix}A_l& A_{nl}\end{...
0
votes
1answer
84 views

Align all numbers, operators, variables, and insert blank spaces for variables not displayed

I would like to do the following Align the word solution left and below question 1. then align all numbers, operators, variables, and insert blank spaces for variables not displayed. As shown in the ...
5
votes
4answers
2k 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 ...
6
votes
4answers
3k views

Draw a box around selected entries of array

I want to draw a dashed-line box as show in picture. Can someone help? Here is the latex code I used for that array: \begin{array}{ccccccccccccccc} c^{(1)} & \geq & c^{(2)} & \geq & ...
1
vote
1answer
41 views

Layout of table contents

I would like to arrange the information when only s1, s2 and p1, p2, p3 as shown attached image. That is, consider an unbalanced situation. We can easily achieve when s1, s2, s3 and c1, c2, c3 exist (...
7
votes
5answers
2k views

What is the best way to indicate repeated off diagonal elements in a matrix/array?

I'd like to typeset a matrix of the following kind: When the symbols involved are big, like, in place of $r$, suppose we had $\mu(k-1)$ and in place of $\lambda$, we had $\mu(k-2)$, the matrix B below ...
2
votes
1answer
55 views

horizontally align two minipages with matrizes

I'm trying to set two matrizes side by side, but I can't manage to horizontally align the matrizes. This is my example: \documentclass[a4paper]{scrbook} \usepackage{amsmath} \begin{document} \begin{...
1
vote
1answer
73 views

Array with nested slashes and parenthesis

I am trying to TeX the following schematic: using some fiddling around with multirows. However, everything's messed up, so I suppose there must be a more elegant way. How? So far, my attempts using ...
2
votes
1answer
349 views

How to make Fractions in \array environment from being tiny and squishing up? [duplicate]

I am a new Latex user who's having problems when writing fractions in the \array environment. The text becomes compressed to where reading what I wrote becomes a challenge, and I have so far spent ...
3
votes
2answers
215 views

In `array` environment, why does `\multirow` stretch rows too much when using `=` for width entry?

When = is used, the content of \multirow command is adjusted to automatically be equal to the column in which \multirow appears. But this does not seem to be the case with me. I am trying to use array ...
3
votes
2answers
212 views

How to combine these separate two tables to become as sub tables of a main table?

Here an image of the objective output: a table (TABLE I) of sub-tables (A) and (B) Here is the code of separate small tables: (to be combined) \documentclass[conference]{IEEEtran} \usepackage{array} ...
1
vote
1answer
88 views

How to center alignment of some table entries with predefined widths?

In the table below, the methodologies cell and all numeral entries of quantile columns (Qs) are aligned to the right, while they should be centered horizontally and vertically. By the way, when I ...
4
votes
1answer
227 views

how to represent method for converting decimal to binary

How can we draw the ladder method to convert Decimal to binary in LaTeX, as shown in the figure below, I have tried with following code, but it does not serve my purpose : \documentclass{article} \...
3
votes
1answer
34 views

Error while using multi line brackets

I am getting a correct output for the below code but latex throws an error **Illegal character in array arg. \begin{array}{11}** along with it. Anybody knows how to fix this error? \begin{equation}...
2
votes
2answers
195 views

Help shifting left in align

So I have this problem in my equation, that the bottom equation keeps shifting right even though I need it to be aligned at the 'left side'. Can someone one help? \begin{align} P(y=m\vert x)=\left\{ ...
5
votes
1answer
219 views

How can I force `intertext` command to retain the default indentation in `align` enrironment?

intertext command seems to remove the indentation. Is there a way to get the normal indentation while in math mode? \documentclass[11pt, a4paper]{IEEEtran} \usepackage{amsmath} \usepackage{amssymb, ...
5
votes
2answers
5k 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} \geometry{verbose,tmargin=1cm,bmargin=1cm,...
2
votes
2answers
237 views

In LyX, how do you remove the brackets around a matrix after they're already there?

I used the GUI to make a matrix with round brackets, and now I want to remove the round brackets (or change them to square brackets), how do I do that?

1
3 4
5
6 7
17