Questions tagged [arrays]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
56 views

How to create an array of colors? [closed]

I am trying to pass an array of colors (of any length) into a macro command to then be used when filling the background of tikz shapes. I've been successful, however, I ran into an issue with the none ...
user avatar
0 votes
0 answers
19 views

Question on Latex related to nested arrays

I'm having problems displaying on Math StackExchange the Latex generated by and exported from Mathematica corresponding to the following image associated with the definition of a Piecewise function ...
user avatar
4 votes
3 answers
138 views

Horizontal spacing bmatrix in align environment

I have a large block matrix in my document, which violates the page margin slightly. I would like to reduce the horizontal spacing between the matrix elements of a row. Additionally, I want to align ...
user avatar
2 votes
1 answer
22 views

Array function with implies arrow at center

I want to display multiple functions in an array with an implies arrow next to it in the center. \begin{equation*} \setlength{\arraycolsep}{0pt} \left\{ \begin{array}{ c c } \varphi \left(\...
user avatar
1 vote
1 answer
21 views

Undefine/Unset newcolumntype to use tabulary with tablestyles

In a project I'm working on I'm using the latex package Tablestyles for styling tables. Until now I have been using tabularx for tables. However, now I need tabulary for automatically setting the ...
user avatar
0 votes
0 answers
30 views

How to label each column of an array in a math environment and also maintaining a global label for the whole equation?

I have an linear program displayed as an array inside an align environment: \begin{align}\label{label1} \begin{array}{lll} \max & \sum_{v\in V} z^v\\ \text{s.t.} & \forall v\in ...
user avatar
  • 165
0 votes
3 answers
78 views

Displaying table with equations

How can I display this table with an equation? I tried many times but i can't find any solution to display the table \documentclass{article} \usepackage[margin=25mm]{geometry} \usepackage{...
user avatar
  • 113
2 votes
2 answers
60 views

How to put braces over certain parts of matrices?

I want to typeset something like this: I couldn't find a way to achieve this using array or blkarray. Any help?
user avatar
  • 297
0 votes
1 answer
33 views

Kindly increase the gap size in an array (between the \overline and the top line)

Is there a simple way to increase the gap size between the \overline and the top line, in the array? More precisely, here is an example. An array command $$ \begin{array}{| c | c |} \cline{1-2} \...
user avatar
  • 2,159
1 vote
1 answer
64 views

How to pass an array of values/commands into lua function?

Is there a way to pass an arrays like {\sin{x},0,0,1} to a lua function. Numbers work perfectly fine but it seems to fail when using \sin, \cos, \tan, \sum, \int,... Commands with arguments (e.g. \sin{...
user avatar
1 vote
1 answer
21 views

Missing delimiter error involving split and array environments

The following code works fine \documentclass[a4paper,12pt]{book} \usepackage[latin1]{inputenc} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amsthm} ...
user avatar
  • 35
0 votes
1 answer
37 views

Use whole page width for aligned formulas

How can I automatically increase the distance between the columns to use the whole horizontal space that is accessible for equations (this might not necessarily be the whole page width)? Note, that I ...
user avatar
  • 147
3 votes
2 answers
52 views

How to create a simple vertical vector with several vertical curly braces outside the square bracket?

I could not code a vertical vector with several vertical curly braces outside the square bracket of the vector. The best thing I have obtained so far is by using rcases from mathtools package that ...
user avatar
  • 33
0 votes
3 answers
72 views

Add a division bar between two elements of an array

I have this array: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath, amsfonts} \usepackage[thicklines]{cancel} \title{shortenedExample} \author{CATboardBETA} \date{February ...
user avatar
5 votes
1 answer
137 views

How can I add line break for large matrices? My matrix is too large and the right side can be submerged

\documentclass{article} \begin{document} \[\left( \begin{array}{ccccc} 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ \frac{\epsilon m_w^2 x_t}{6 \epsilon ^2-7 \epsilon ...
user avatar
0 votes
1 answer
52 views

Bitarrays with Text in between

i am very new to Latex, i want to draw Bitarrays, while i got it working (in a very inelegant way) in beamer i struggle to get it properly working in article. I copied an example from some code on ...
user avatar
4 votes
3 answers
231 views

Macro returning array with vertical line

I want to make a macro "mymacro" that returns an array with two rows. The macro has two variables and each variable is a string word composed with "b","o", "x", ...
user avatar
2 votes
4 answers
221 views

How to make macro with string variable and returning array?

I want to make a macro "\mymacro" which has two string variables and returns array. The two variables are arbitrary string characters and has the same length. The length of the strings are ...
user avatar
0 votes
0 answers
18 views

Short-hand command for creating matrices

Is it possible to use \newcommand to create commands for matrices? For instance, I want to have a new command called \threedimmat that takes 9 arguments and produces a corresponding 3x3 matrix so ...
user avatar
1 vote
1 answer
32 views

Trouble spacing in array environment

I have constructed the following table: To do so, I used the following code: begin{equation*} \begin{array}{c|ccc|c} & & & & \overline{b} \\ \hline x_5 & 1 &...
user avatar
  • 265
2 votes
3 answers
140 views

More vertical space between rows in array

I would like to have a little more space between the rows of an array for better clarity. I tried \vspace{} at the end of the rows but LateX ignored it. I can accomplish something close to what I want ...
user avatar
  • 125
2 votes
3 answers
132 views

\cellcolor does not change the cell color when \makegapedcells is used

I want to fill the box but \cellcolor{red} doesn't work. \documentclass{article} \usepackage{float} \usepackage{array, makecell} \setcellgapes{5pt} \begin{document} \makegapedcells \begin{...
user avatar
  • 345
1 vote
2 answers
92 views

Set macro for Latex

I would like to define a macro for writing sets easily. E.g.: \set{ 1, 2, 3, 4, 5 } which then becomes something like \{ 1,\ 2,\ 3,\ 4,\ 5\, \} % this \begin{Bmatrix}\, 1,\, 2,\, 3 ,\, 4,\, 5\, \end{...
user avatar
  • 409
4 votes
3 answers
166 views

Tabular centering

How can I position the 1 exactly in the center? \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{array} \begin{document} \begin{center} \setlength{\arrayrulewidth}{1pt} \...
user avatar
  • 345
2 votes
4 answers
56 views

How to change spacing in array (block matrices) [duplicate]

I want to add a certain spacing s.t. the the partial derivative symbols don't touch the line. Here is the code I have so far. \begin{align*} \mathrm{D}_{}F(\textbf{x}_{0}, \textbf{y}_{0}) = \left[\...
user avatar
  • 243
1 vote
1 answer
97 views

Double vertical line column type in tabular

I need a column type with 2 vertical lines but I want the horizontal line to not go trought it. The result would be like this : \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{lipsum} ...
user avatar
  • 47
2 votes
2 answers
98 views

what's wrong with this last >{\centering}p{1.0cm}?

\documentclass[12pt, a4paper, UTF8, scheme = plain, twoside]{ctexart} %% %% \usepackage{amsmath} \usepackage{booktabs,array} \usepackage[top=0.5cm,left=0.5cm,right=0.5cm,bottom=1.68cm]{geometry} \...
user avatar
  • 489
0 votes
1 answer
25 views

What is happening with this array argument and its interaction with the stix package?

Ok so I am working on a tikz diagram and I decided to use a website called mathcha and it exported some code which I modified in order for it to compile and include below. \documentclass[a4paper,12pt]{...
user avatar
1 vote
1 answer
46 views

Label of rows and columns in matrix

I want to have the label of the matrix from left to the right. Also, seems the top labels are very close to each other. (I do not want to use "blockarray" matrix). Thank you very much. \...
user avatar
0 votes
1 answer
83 views

LaTeX array and matrix equal spacing

I'm trying to make a matrix with block 0s (so I don't have to write out the zeros). This is what I have % Taken from https://tex.stackexchange.com/questions/323297/typing-block-matrices-with-zero-...
user avatar
1 vote
2 answers
93 views

Need help for an array or matrix

I am trying to make an array or matrix to represent this matrix: But unfortunately, I don't manage to do it (I even don't know if I should do it with an array or a pmatrix). So, if someone can help ...
user avatar
  • 589
4 votes
4 answers
361 views

fine-tuning `array` environment for writing system of equations

I have heard that the array environment can be highly customized, but I am confusing in writing the following system (this system is from Lagrange's method of variation of parameters for linear ODEs) ...
user avatar
  • 13.6k
4 votes
1 answer
62 views

Aligning array elements horizontally LaTeX

I'm trying to build a graphic illustration of how a binary multiplication is solved, but I'm facing some problems while trying to align the cells of the array. Here's the code: \begin{array}{rrrrrr} ...
user avatar
  • 143
2 votes
2 answers
52 views

Centering alignments in equations [duplicate]

I have a very long set of equations that I put in an array. They must be aligned as \begin{array}{lclc} A & Long expression & \text{\hspace{.5cm}} & Long expression \\ ...
user avatar
11 votes
2 answers
538 views

French representations of functions

In France (probably in many other countries, too), functions are usually represented like this: So, I tried to create a command \fct and here is a MWE: \documentclass[a4paper,10pt]{article} \...
user avatar
  • 589
4 votes
2 answers
99 views

Centering terms of equation with tag

This minimal example \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document} \begin{frame} \begin{equation} \begin{array}{ccc} f(x) & =& \...
user avatar
0 votes
0 answers
44 views

How to arraystretch in LyX

When I make arrays with fractions in LyX, see picture attached happens, and I do not know how to fix it. For more info see minimal example. Also, despite doing a minimal amount of searching and ...
user avatar
0 votes
0 answers
39 views

How to stretch arrays in LyX

When I make arrays in LyX with fractions they always come out overlapping with each other, so I decided to figure out how to prevent that. After some searching I figured out that the two ways is to ...
user avatar
5 votes
3 answers
223 views

Making a macro for transition probability matrices (a la Pinsky & Karlin's "Introduction to Stochastic Modeling")

In An Introduction to Stochastic Modeling by Mark Pinsky and Samuel Karlin, transition probability matrices for finite-state Markov chains take a particular formatting style: Particular items of note:...
user avatar
6 votes
3 answers
180 views

Nested right cases

I was reading a script for maths and came across this "picture" and was wondering how he typeset it in LaTeX, so I wanted to try myself. First I thought of cases, but that did not work as ...
user avatar
1 vote
1 answer
47 views

Suppress vertical space above and below array with href

This is a follow up to Suppress vertical space above and below array?, which works fine when used with an \fbox (black box below), but not with \href (teal box below). My goal is to eliminate the ...
user avatar
1 vote
1 answer
60 views

Center and Top Align text in a tabular column

I have a table like the following, and would like to have the contents of the columns vertically top aligned. Additionally the first column should be centered horizontally and the second column should ...
user avatar
  • 471
3 votes
3 answers
412 views

Block matrix with array, NiceMatrix or tabularray

About this code I'd like that only between $a_{11}$ and $a_{12}$ there isn't the vertical line. How can I do? I'd desire to have three solutions, one with normal \begin-\end array, another with ...
user avatar
  • 793
3 votes
4 answers
79 views

Better \vspace{} and dashed line in array-environment

In this code \documentclass{book} \usepackage{mathtools} \usepackage{stix} \usepackage{multicol,multirow} \newcommand{\Tonde}[1]{\left(#1\right)} \newcommand*{\Scale}[2][4]{\scalebox{#1}{$#2$}}% \...
user avatar
  • 793
1 vote
1 answer
33 views

Line breaks inside autogrowing nested brackets using perfectcut?

In the package that I have been developing, I use the \perfectunary command from the Perfectcut package to get auto-growing brackets that increase in size depending on the number of nested brackets ...
user avatar
  • 351
0 votes
0 answers
76 views

Creating dotted lines in array environments with arydshln not working

I'm trying to represent partitioned block matrices in LyX. If I want to separate the blocks using solid lines, I have no trouble making it happen - here's a simple example: \begin_layout Standard \...
user avatar
1 vote
0 answers
25 views

Controlling the space between lines of an Array environment

I have an array enviroment in which the various lines are matrices. A simple example is \begin_inset Formula \begin{align*} A & =\left[\begin{array}{cc} a & b\\ c & d \end{array}\right]\\ ...
user avatar
0 votes
0 answers
42 views

How can you automatically number the entries in an (m x n)-array?

If one uses \begin{enumerate} \item Entry1 \item Entry2 : \end{enumerate} Latex generates a vertical numbered list of the form Entry1 Entry2 But how can one get automated numbering when one wants ...
user avatar
1 vote
2 answers
66 views

Render an eqexpl like an array

Could you improve my code, please? \documentclass{article} \usepackage[italian]{babel} \usepackage[utf8]{inputenc} \usepackage[a4paper,top=3cm,bottom=3cm,left=3.5cm,right=3.5cm]{geometry} \usepackage{...
user avatar
  • 793
4 votes
2 answers
122 views

Equation system with specific form

I am having trouble finding a way of writing this. I have tried align but can't get the bracket look like that. Any help is appreciated
user avatar

1
2 3 4 5
19