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
1answer
84 views

How do I force two arrays to hold the same horizontal space?

In a previous topic (Why do horizontal matrices look different than multistory matrices?), it was asked why a vector holds a different horizontal space from what a matrix holds. One solution devised ...
2
votes
1answer
48 views

Use \ifthenelse{\equal{ on a number called from reference

I want to store an answer key for an exam and then automatically move the multiple choice answer choices around for each question match its predetermined answer. (I need to conform my multiple choice ...
2
votes
2answers
55 views

nested arrays spacing

I'm trying to align two child arrays to a parent array. At the moment my code gives: Which means, the two child arrays refer only to first row and fourth row of parent array. I would like the curly ...
1
vote
1answer
30 views

Disable `math text inlined` color in all display math environments (beamer)

I color my inline math in beamer to improve readability. However, when I use array environment, it will include some inline math being put inside array which is display math. I would like inline math ...
5
votes
4answers
227 views

Space in array system equations

I need to make some system equations but when I place them on one row I have this problem. Space between | and x. How to remove it? \begin{document} Example 1: \\ $\left| \begin{array}{@{}*...
6
votes
4answers
231 views

Exempt portion of equation line from aligning?

I am using an array environment to get aligned portions of a series of equations to center (instead of left-justify), as shown below: \usepackage{array,amsmath} \[ \begin{array}{>{\displaystyle}c @...
1
vote
2answers
52 views

How can I get a table to exceed left and right margin equally without changing its font size?

When I use adjustbox to modify the width of a table, even the font size changes. How can I increase the table width but let it exceed both margins equally? My MWE \documentclass{elsarticle} \...
4
votes
2answers
58 views

Is there a simple way to force matrix brackets to stretch according to phantom contents of `array` environment?

The output I get The output I want is the same except that the brackets of the Z_bus matrix should stretch to contain phantom content of array environment as follows Clearly, I can use \phantom and ...
0
votes
0answers
88 views

How to control the height of square brackets of matrix

Here is my code for creating a matrix: \begin{equation} \left [ \begin{array}{ccc} 1 & 2 & 3\\ 1 & 2 & 3\\ 1 & 2 & 3\\ ...
0
votes
1answer
41 views

Error on array using math notation

I don't know why this equation have the errors. Thanks if you can help me. \documentclass{article} \usepackage{array} \usepackage{amssymb,amsthm,amsmath} \begin{document} \begin{equation*} \left[h(t)...
3
votes
2answers
86 views

Combine rectangle split with array

I want to draw a "complicated" figure, like shown below. What is need to be done: Enlarge the \hdashline to fit the hole width (drawn in red) Remove the dashed line (:) from the first row (done per ...
0
votes
0answers
7 views

Array: dashed hline in array [duplicate]

How to set the \hline to be dashed in an array? \documentclass{standalone} \usepackage{amsmath} \begin{document} $\begin{array}{ll} a & b\\ \hline c & d\\ \end{array}$ \end{document}
1
vote
1answer
39 views

Brackets around blkarray are too big

This is a followup to this question. MWE (given by Henri Menke in the linked post): \documentclass{article} \usepackage{blkarray} \begin{document} \[ \left[ \begin{blockarray}{ccccccc} \...
7
votes
1answer
782 views

How to encircle section of matrix in LaTeX?

I am currently working on a lab report where I have to explain the Gaussian Elimination Method for a matrix. As part of my explanation, I want to circle/oval portions of a matrix. Is there any way ...
0
votes
1answer
56 views

Call/insert variable of Array for tcolorbox

Thank Tex community & Stack Exchange. Hi friends, With supporting of Mr @marmot, i can create "variable Array" in file myarrays.tex. Link topic: Global variable Array Now i want call/insert ...
1
vote
1answer
95 views

! Extra alignment tab has been changed to \cr in table with array

This is the error I have gotten while having my table as here ; ! Extra alignment tab has been changed to \cr. \endtemplate l.168 Sample & Size ( $\mu$ m) & ...
0
votes
2answers
43 views

How do I center text in a table vertically without using the array package?

I have a table, that works perfectly. I just want the text to be centered vertically. I do not want to use the array package, because I do not want to specify the column widths manually, I just want ...
1
vote
1answer
46 views

Centering Cells with m{}

I have a very simple table with only a few cells. \documentclass{article} \usepackage{mwe} \begin{document} \begin{table}[ht] \centering \begin{tabular}{c|ccc} \hline Long Text Here & D &...
1
vote
0answers
48 views

colortbl conflict with tabular parbox? [duplicate]

I have a large document that I want to fix column widths in several tables and I have previously done so using p{XXin} column types (where XX is some number). I recently moved to a new computer and ...
3
votes
1answer
108 views

Code between \begin{environment} and \end{environment} stored in an array

Is there a way to store the text between the \begin and \end commands of a generic environment in an array? A code that obviously doesn't work but shows what I mean is the following \documentclass{...
1
vote
1answer
36 views

Ifthen statement with array value as an entry

Whenever I try to use an element of an array as an entry for a \ifthenelse statement I get the error Incomplete \iffalse; all text was ignored after line 6. Here's a MWE. \documentclass{memoir} \...
2
votes
1answer
57 views

Spacing between elements in an array

I have the following table almost finished (I tried to make the code as much readable as I could) \documentclass{article} \usepackage[table]{xcolor} \usepackage{tikz} \usepackage{mathtools} \...
2
votes
1answer
59 views

Change tabular row height including a matrix [duplicate]

I am looking for a way, to change the height of a row in a tabular environment (or evenly add space at the top and bottom) but without changing the size of an included matrix. If I use \renewcommand{...
4
votes
3answers
153 views

Vertical Alignment of Matrices with spalign Package

I am using the spalign package to typeset matrices and systems of equations. Basically it just lets you use spaces (or commas) and semicolons instead of & and \\ when typing in matrices and ...
3
votes
1answer
129 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
153 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
56 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
3answers
84 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
25 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
66 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{...
0
votes
2answers
200 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
243 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
30 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
60 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
34 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
54 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
82 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
594 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
155 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
89 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
236 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 ...
7
votes
2answers
505 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
86 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
31 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
123 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
65 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
36 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
130 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
1k 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
136 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 ...