Stack Exchange Network

Stack Exchange network consists of 175 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.

6
votes
2answers
81 views

How do I partition a matrx into blocks and replace zeros with dots?

I am using this command \begin{equation} W = \left( \begin{array}{ccccccccc} 1 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & -1 \\ 0 & 0 & 0 & 0 & 0 & 0 & ...
0
votes
1answer
15 views

How to add more clearance near the brackets of `blockarray` blocks?

In the image above, we can see that blockarray barely leaves any clearance between the matrix content and the brackets around it. The distance from the first row to the orange line is extremely small. ...
6
votes
3answers
129 views

Alternatives to achieve certain output format

Consider the following MWE \documentclass[border=10 pt]{standalone} \usepackage{mathtools,setspace} \begin{document} $\displaystyle {\setstretch{1.5} \begin{array}{ccccccccccccccccccccccc} ^{12} \...
1
vote
2answers
34 views

switching alignment

I'm new to Latex and its environments such as split and align and I'm trying to change the alignment of an equation in a customized manner. I have a set of equations similar to what you can see in the ...
2
votes
1answer
24 views

Tabular: lines with \pause get line added

When I try to build this: \usepackage{array} \documentclass{beamer} \begin{document} \begin{frame}{Bibliotheken} \setlength\extrarowheight{5pt} \begin{tabular}{|l|l|l|l|l|l|} \hline ...
4
votes
3answers
171 views

tikzcd diagram within an array

I am trying do make this looking better: namely: curly brackets enclosing everything, tikzcd diagram vertically centered compared to the two other lines. Any suggestion? \documentclass[letter, ...
1
vote
1answer
34 views

Recurring decimal within an aligned array

I am having some issues with representing recurring decimals (using \overline{}) within an aligned array I am using to represent a matrix. \documentclass{article} \usepackage{gensymb} \usepackage{...
2
votes
2answers
26 views

Aligning an array with text beside it

I am trying to create a 'matrix' using the array environment. I have multiple of these lines each with text besides it of varying length. I would like to have the array aligned; however, in example ...
3
votes
2answers
131 views

Double underlining a result in a system of equations with calculation steps on the right side

I am trying to create a system of equations with my calculation steps on the right side and a double underlined result. I've decided to use NiceArray from the nicematrix package for the calculation ...
3
votes
3answers
44 views

How to avoid overlap in the fractions of a table

Is there any proper way to avoid overlap in the fractions of a table (see the picture) The source code is : \[ \textbf{S} = \begin{Bmatrix} 0 \\ - g \rho \eta \partial_x Z + \dfrac{1}{2} g Z^2 \...
1
vote
1answer
30 views

mdframed - how to make the box larger to fit my table?

My code is given below. How can I make the box bigger so that the table fits inside it? Or how could I make the table smaller so that it fits inside the box? \documentclass[12pt]{article} \...
3
votes
1answer
66 views

Alignment of matrices with annotations on the right side

I have a problem with aligning matrices with annotations on the right side. I need the annotations to show the operations I used. To show the operations I first used the gauss package. Unfortunately ...
0
votes
2answers
39 views

How to get continuous vertical line without breaking inside array environment?

I am facing a problem in the following code, i found that there is a breaking in two vertical lines as shown in red mark when i used the command \cmidrule[1pt](r{-1.0em}){1-4} inside array environment,...
5
votes
5answers
195 views

An array in an equation with curly braces in both sides

I am trying to generate the following equation: I am working with an old file (I have not written it) that already has the following code for this equation: \begin{equation} \delta(x)\equiv\left\{\...
0
votes
3answers
41 views

How to move the lines in arrays

I wanted to apply Ruffini's rule but since I'm using fractions it's all crowded and messy. Is there a way to leave more space between the lines? \begin{equation*} \begin{array}{c|c c c|c} ...
3
votes
1answer
52 views

Array/tabular for long multiplication

In other topic @egreg helped me a lot but there can be thousand of bugs in horizontal long multiplication. I am a bit frustrated and can't make array like that: The red drawings are commas. I'm ...
2
votes
2answers
36 views

Renew arraystretch only inside matrix environment

I am using \renewcommand{\arraystretch}{2.5} in my arrays to produce nice tables. But this is affecting also matrix environments. Supposedly one can redefine the \arraystretch locally inside each ...
2
votes
1answer
31 views

Inserting an array into a diagram

Suppose I have a diagram of this form: \documentclass[11pt]{beamer} \usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx, amsfonts, braket} \usepackage{subfig} \usetheme{Madrid} \...
0
votes
0answers
20 views

Select one of many groups of array definition

I use variable.tex to definite some Array: Name, color, folder In main.tex: \input{variable.tex} In variable.tex: ( not exist begin/end{document} Each Group includes 3 Array: Name, color, folder %...
2
votes
2answers
33 views

Outlining specific parts of array

I couldn't find this anywhere else. I have an array with a bunch of numbers in it, and I am very new to posting on this forum. This is from a template that I have to use for a document. Here's the ...
1
vote
1answer
30 views

Make underbraces span over particular array columns

I'm new to using latex and I tried to look at some related questions here, but unfortunately I didn't understand how to apply suggested solutions to my problem yet. So I got this .tex code \...
3
votes
2answers
66 views

How can I increase row vertical spacing in a table without affecting inner arrays?

The methods I am aware of for modifying vertical spacing in a table are \renewcommand{\arraystretch}{<length>} and \setlength{\extrarowheight}{<length>}. However, these commands affect the ...
0
votes
1answer
52 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
30 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
37 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
23 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
157 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}{@{}*...
7
votes
4answers
191 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
40 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
43 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
51 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
39 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
79 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
6 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
26 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} \...
8
votes
1answer
749 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
39 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
70 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
36 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
44 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
38 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
100 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
30 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
52 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
42 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
112 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
126 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
80 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
45 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
62 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{{ - ...