Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [arrays]

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

2
votes
0answers
13 views

Vertical Alignment of Matrices with spalign Package

I am using the spalign package (http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/spalign/spalign.pdf) to typeset matrices and systems of equations. Basically it just lets you use ...
3
votes
1answer
111 views

colortbl changes array behaviour

David Reiter passed the following code to me for generating CCG proofs. This works well provided one does not load colortbl. Without colortbl I get: and with colortbl I get: Is there a way to fix ...
1
vote
2answers
43 views

Remove space between bracket and array environment

Sorry for my bad English. How can I removing space between bracket and array environment and obtained results as used cases environment. Thank you very much! I use code \[\left\{\begin{array}{l} ...
0
votes
0answers
32 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 \...
1
vote
2answers
50 views

my matrix is not showing complete in pdf,

code is here \[ \setlength{\arraycolsep}{0pt} \renewcommand{\arraystretch}{0} \begin{pmatrix} \begin{array}{*{20}{c}} {x + \cosh \left[ {2t} \right]}&0&{\frac{{ - ...
0
votes
1answer
22 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
0answers
27 views

Formatting long division involving decimals

I am looking for ways of improving the formatting I have been using to present long division involving decimals. Using this answer I have managed to come up with the following MWE. \documentclass{...
-1
votes
2answers
74 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
173 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
19 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 & ...
2
votes
2answers
42 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
27 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}...
0
votes
1answer
35 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
26 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
387 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
136 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
30 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} \...
0
votes
0answers
48 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 ...
6
votes
2answers
206 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
2answers
71 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
26 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
64 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
59 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
0answers
19 views

How to use the column- and alignment methods in an {array}

I am using this example code: $$\begin{array}{rll} \text{max} & x+y+2z \\ \text{s.t.} & x + 2y + 3z \le 4 \\ & x+y \ge 1 \\[10pt] & x,y,z \in \lbrace 0,1 \rbrace ...
0
votes
1answer
30 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{...
3
votes
3answers
102 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. ...
2
votes
2answers
282 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
74 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
33 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
13 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 ...
5
votes
2answers
67 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
27 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{...
1
vote
2answers
77 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{...
0
votes
1answer
31 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{...
3
votes
2answers
44 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
42 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 ...
1
vote
1answer
36 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 (...
1
vote
2answers
68 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 ...
2
votes
1answer
31 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
61 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
56 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
46 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
64 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
35 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
90 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
30 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
111 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
78 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, ...
4
votes
4answers
115 views

Using `split` inside array and vertical alignment

The below code produces this: I want to get that second line top-aligned, so the $\frac{\partial^2g}{(\partial n^1_\mu)^2}$ and $\frac{\partial^2 g}{(\partial n^1_\sigma)^2}$ are on the same level. ...
2
votes
2answers
60 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?