Questions tagged [arrays]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
29 views

Aligning one of the elements of an equation in an array environment

Consider the following equation - \documentclass{article} \usepackage{array} \begin{document} \begin{equation} A = \\ \nonumber \left\{ \begin{array}{lllr} A_{1} & & \mbox{} m=1, n=1 \\[...
2
votes
5answers
108 views

Forcing equal width columns in an array environment with a custom command

I've defined a custom command tractorQ that takes four arguments and typesets them in a matrix-like notation using the array environment: \newcommand{\tractorQ}[4]{ \def\arraystretch{1.2} \...
0
votes
1answer
18 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
42 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,...
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 & &\...
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{...
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 ...
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
3answers
80 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{{ - ...
1
vote
2answers
50 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. ...
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 ...
5
votes
4answers
236 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, ...
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 ...
2
votes
3answers
958 views

Formulating a linear program

I want to formulate a linear program but I have not been able to find exactly what I am looking for. It should look similar to this picture: The main difference is that I want automatic numbering on ...
3
votes
2answers
48 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 &...
1
vote
1answer
382 views

alignat: Centering, multicolumn

How can I center all columns in a multicolumn, multiline equation? The array environment: Does not allow for multiple float numbers. Does incorporate space between columns. Does allow centering ...
4
votes
2answers
188 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 + &...
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} \...
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 ...
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 ...
21
votes
5answers
17k views

Create an array of variables

I'm creating a package for my question papers. (I'm aware of the exam class but I don't want to use that.) I have everything ready but I want to create a grading table at the top of the first page. ...
2
votes
1answer
76 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
57 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 \...
4
votes
1answer
247 views

How can I use multicolumn or multirow in a tabular using the array package global formatting technique?

Awhile ago, @robintw asked a practical question: Make first row of table all bold It uses the array package to cleverly inject formatting code into the header row columns. Clever Table Row ...
8
votes
3answers
8k views

Integral sign inside equation array becomes too small

\documentclass[12pt,a4paper]{report} \usepackage{palatino} \begin{document} \begin{equation}\label{good} \int_{0}^{1} \end{equation} \begin{equation}\label{ugly} \begin{array}{c} \int_{0}^{1}\\ \...
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 ...
4
votes
5answers
261 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
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,...
2
votes
1answer
38 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
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 ...
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 %...
14
votes
4answers
10k views

Text above matrices

I am new to latex and I am trying to create this: So far I have been able to create the matrices, like so: \[ N\textrm{ spectra} \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1M} ...
2
votes
2answers
36 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 ...