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
17 views

labelling arrays

Sorry if this is stupid but writing $$ \begin{array}{c} \label{cycle LP} \text{min} \ \ \ w^t x \\ \text{s.t.} \sum_{C \in \mathcal{C}} x_v \geq 1 \\ x \geq 0 \end{array} $$ ...
1
vote
0answers
19 views

Array: extend \newcolumntype to \provide etc

Consider the (silly) MWE: \documentclass[]{article} \usepackage{array, ragged2e} % in a package \newcolumntype{R}[1]{>{\raggedright\arraybackslash\hspace{0pt}}p{#1\linewidth}<{}} % here \...
0
votes
0answers
39 views

Multivariate polynomial long division in LaTex

How do I typeset polynomial long division with multiple variables using LaTeX? I want to do polynomial long division with two and more divisors. I know there was a similar question already answered ...
1
vote
1answer
31 views

Add a caption after an array inside displaymath

I'm writing truth tables like this: \begin{displaymath} \begin{array}{|c c|c|} p & q & p \land q \\ \hline 1 & 1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \...
2
votes
2answers
46 views

how to create a boxed table array

I'm trying to replicate the attached image. However, I'm not really sure what type of command or environment to use. I don't think its just a simple tabular or minipage environments. If someone can ...
3
votes
1answer
51 views

Align equations at more than one point

I have got the following set of equations: which corresponds to the following code: \begin{align} \begin{split} a_1 + b_1 \xi + c_1 \xi^2 + d_1 \xi^3 &= a_2 + b_2 \xi + c_2 \xi^2 + d_2 \...
3
votes
1answer
92 views

Can a table be formatted so that math mode is in some columns and text is in others by default?

I know that the best answer is to go with either a tabular or array environment depending on which is used most often and change the cell manually when the other environment is needed. This question ...
4
votes
3answers
41 views

problem with array “how to make it in the same line”

\documentclass{article} \usepackage{amsmath,amssymb,amsthm} \begin{document} let $ \begin{array}{cccc} f: & \mathbb{R}&\longrightarrow &]-1,1[\\ &x&\mapsto & \dfrac{x}{1+|...
2
votes
1answer
45 views

Grid Lines on whole page for comparing spacing

I am building on my resume on latex and need fine grid lines to compare spacing between sections and subsections. You might need this info. \documentclass{article} \usepackage[a4paper,bottom = 0.6in,...
0
votes
0answers
30 views

Vertical alignment of an array with numbered list [duplicate]

please refer to the following scenarios: and The first case is generated by the following part of the script: \question[5+2] Let $ (X,d) $ be a metric space and $ A\subseteq X $. \textit{...
1
vote
1answer
45 views

Locally typeset a polynomial division problem

Problem: Trying to locally typeset a polynomial division problem by using the package polynomial. Minimal Working Example (MWE): \documentclass[a4paper,11pt]{book} \usepackage{amsmath} \usepackage{...
4
votes
3answers
197 views

Aligning diagram with arrows

I want to draw a diagram with rightarrow and downarrow. So first I tried: \begin{alignat*}{3} M_n&(D) \overset{\alpha'}&\longrightarrow M_n&(R)\\ \det &\downarrow & &\...
6
votes
1answer
37 views

\newcolumntype doesn't emit any warning for the redefinition of a primitive type of column

With the code \documentclass{article} \usepackage{array} \begin{document} \newcolumntype{c}{l} $\begin{array}{cc} a+b+c & a \\ d & e \end{array}$ \end{document} I expect a warning for the ...
2
votes
0answers
54 views

The middle row of matrix and cases does not align at baseline

When I wrote a row vector in a matrix or a 3-branch function in a cases, I noticed that the middle row does not align at the baseline of the content outside. As one must be conformed to university ...
4
votes
1answer
54 views

Square brackets around a top aligned array

I have this code \[\left[\begin{array}{ll} \text{word} & \\ \text{HEAD} & \begin{array}[t]{ll} \text{det} & \\ \text{AGR} & \begin{array}[t]{lr} \...
0
votes
0answers
9 views

Array inside an equation: open bracket in a line and close in another line [duplicate]

This code: \documentclass[12pt]{article} \begin{document} \begin{equation}\label{eq:test} \begin{array}{l} \left[ \displaystyle \frac{e^{ix}}{2} = \\ = \sin (x) + \cos (x) \right] \end{array} \end{...
0
votes
1answer
19 views

Aligning multiple array environment vertically (at the bottom)

I have multiple array environment that I want to allign vertically. Currently it looks like: With a minimal working example being: \begin{array}{|c c|} \hline A_1^1 & A_1^2 \\ A_2^1 &...
2
votes
1answer
44 views

How to Rectify Weird Spacing in a Matrix Written as an Array

I have written a fairly standard matrix as an array since I wanted to have a matrix within it. Typeset as follows: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{...
2
votes
2answers
73 views

How to avoid the large spaces in align environment?

I want to achieve the results in this picture: It can be generated by using "array". However, it will use so many {} in the equation. I would like to use the "align" environment, but it gives a much ...
3
votes
2answers
47 views

Draw rectangle into the Array

My MWE \documentclass[a4paper,11pt]{article} \begin{document} \begin{equation} \begin{array}{ccccc} 16\cdot I_1 & + & 11\cdot I_2 & =& 13\\ 11\cdot I_1 & + & 16\cdot I_2 &...
4
votes
2answers
187 views

How can i have text between brackets in equation with respect to some criterion?

I try to have something close to that Here is my try, \begin{equation} \begin{array}{cccc} \partial_t C & + \partial_x u C + \partial_x v C = & D_x \partial_{xx} C + D_y \partial_{yy} C + &...
7
votes
2answers
108 views

How do I partition a matrix 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 & ...
1
vote
2answers
48 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
142 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
40 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
26 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 ...
5
votes
4answers
234 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, ...
2
votes
1answer
74 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
34 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
179 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
56 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
40 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
84 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
47 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,...
4
votes
5answers
259 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
52 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
53 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 ...
3
votes
2answers
54 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
37 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
21 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
35 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
32 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
74 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
69 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
45 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
54 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
26 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
212 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
219 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
50 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} \...