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
2answers
23 views

I can't change \hhline color with \arrayrulecolor{}

I have created a table with tabular and cellcolor, and you know what hapends: the cell color overlap the border. I have found that this is often solved with hhline. In order to change the color in ...
3
votes
1answer
36 views

Refinement of nested cases / aligned equations

For the following two approaches or sets of equations, I would like to 1- (in the first set) make the first for align with the two fors below 2- (in the second set) keep the font and interspaces the ...
2
votes
5answers
162 views
+100

Automatic generation of table made initially on MS word

I have made with MS-Word the following table and I would like to find a tool (online or by command line) on MacOS or Linux to convert it to LaTeX table: As you can see, it is pretty complicated to ...
0
votes
0answers
18 views

csvsimple inside tabular environment, but csv data includes LaTeX arrays/tables/aligned etc

I am trying to import a csv using csvsimple, and I have already overcome the challenge of the csv delimiter (by adding curly braces around every field), but I am now stuck with a admittedly weird ...
5
votes
3answers
150 views

Issue with the alignment of the array

I am having the issue with the alignment of an array. Please, find the below code: \documentclass[12 pt, a4paper]{book} \usepackage{multicol} \usepackage{geometry} \geometry{ a4paper, ...
1
vote
0answers
22 views

Vertical space at the bottom of nested tabulars

I'm trying to make a macro which typeset a text "accross a vertical line", and I'm using a tabular for that : \documentclass{article} \begin{document} \makeatletter \newlength\tdv@temp \...
4
votes
5answers
231 views

How to change the vertical position of a horizontal line in a matrix?

I need to adjust the vertical position of a horizontal line inside a matrix. Here's a MWE code to play with: \documentclass[11pt,letterpaper,twoside]{book} \usepackage[T1]{fontenc} \usepackage{...
1
vote
3answers
29 views

Alignment at equals signs in two columns of an array environment

I would like to make a table of two columns of the squares of all the digits. With the following code, there is no proper spacing between the equals sign and the numbers in the first column, and the ...
5
votes
2answers
154 views

How can I improve displaying repetitive equations

I'm looking to improve my report quality by making equations more clear. As the equations I'm stating are repetitive a couple of times throughout the report I thought it would be better to use matrix ...
2
votes
1answer
29 views

Place arrays one next to the other with caption and shape value

I have the following code snippet executed on Overleaf, \documentclass{article} \usepackage[T1]{fontenc} \usepackage{mathtools,siunitx} \usepackage{amsmath} \title{test} \author{spanos.nikolaos } \...
0
votes
0answers
28 views

What is causing (and how can I fix) “Misplaced \cr” and “Misplaced alignment tab” errors in an array environment when trying to compile my .dtx?

I created a small package to help me typeset various tidbits in papers for a specific domain of theoretical computer science that I sometimes work in. So far, it has been working well, but I decided ...
4
votes
1answer
101 views

Draw path only if condition is met

I am using TikZ and would like to draw a path from one node to another if a condition is met. Here is my code: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \begin{document} \...
0
votes
1answer
18 views

pgfmathmin and pgfmathsetmacro and array

I am trying to calculate the minimum and maximum of an array. The only problem unsolved is to save the value in a macro/variable. \documentclass[utf8,fleqn]{scrartcl} \usepackage[ngerman]{babel} \...
2
votes
2answers
30 views

\baselineskip not working on array

I want to add a linebreak with distance proportional to \baselineskip in array environment, in order to make my document more stable to format change. However, it seems as \baselineskip is zero in ...
2
votes
2answers
32 views

How to align these objects in a function mapping

I'm trying to write a function mapping between three sets. I'd like to keep the alignment of the first "array" environment in the second one, because I'd like the tips and the tails of the ...
1
vote
4answers
85 views

How to put upward arrow with text below the elements of an array

I want to put upward arrow with text below some elements of an array. Code: \documentclass[12 pt, a4paper]{book} \usepackage{multicol} \usepackage{geometry} \geometry{ a4paper, ...
2
votes
2answers
25 views

How to vertically center all elements of array

I want to put all elements of the array vertically centered. I have tried \arraystretch command to do so, but it is not working. Code: \documentclass[12 pt, a4paper]{book} \usepackage{multicol} \...
0
votes
1answer
81 views

Aligning linear system in optimization problem

There are a lot of similar problems I found on stackexchange, but none quite worked for my problem. Given an objective function and a set of (in-)equalities, I want to neatly align the variables in ...
0
votes
1answer
36 views

Align, multiline, … more equationsymbols in one line under each other

I could not find a method to use \begin{align} or the other similar commands, s.t. in one line ist not only one = symbol, they are more. And I want arrange the equality sign under each other. No ...
2
votes
2answers
24 views

Remove whitespace left of an array

I would like to display equations one on top of the other with a large brace on the left, with the array environment for instance. However, there always is a consequential white space between the ...
2
votes
2answers
42 views

Aligning a group of muti-line equations within along align environment

I'm trying to get 3 really long equations (that I've split) to be aligned more elegantly with their respective equal signs in some way. Shortening the LHS of those 3 equalities (perhaps splitting it 3 ...
0
votes
2answers
54 views

multine line array in table cell

\begin{table} \centering \renewcommand{\arraystretch}{1.3} \begin{tabular}{c | l} Group element & $\begin{array} {r@{}l@{}} U(\xi) & {}= e^{\xi^a P_a} \\ U(\Lambda) & {}= e^{-\frac{1}{2}\...
2
votes
2answers
57 views

Using align* and array together to show relationship between matrix and system

I am trying to align an entire matrix with a system of equations with an arrow between them. Here is what I have so far, \begin{align*} \left[\begin{array}{ccc|c} 1 & 0 & 0 & \...
0
votes
1answer
19 views

Partioned/block matrices with “empty” cells

I am trying to create a matrix like the following where notice that I envision it as a 4x4 matrix, with 4 blocks, one 1x1 block, one 3x1 block, one 1x3 block, and one 3x3 matrix. My confusion in ...
2
votes
3answers
63 views

How to programmatically insert an \hline between each line of an array

I'm trying to create an environment for matrices that are divided in four sections, such as the following: Ideally, I'd like to make it so that it can be used like the following: M = \left( \begin{...
0
votes
1answer
24 views

Internal delimiters for matrix and array

I would like to customize the array environment in such a way that I can write arrays with dashed delimiters that are internal to the arrays as in the figure below. Question. How do I place the ...
0
votes
1answer
26 views

Left align entire array environment

I want to create a notation section a la the Matrix Cookbook (PDF). Here's a screenshot: I can create this using an array, so \begin{array}{r l} but then the whole array is centered. How can I left ...
1
vote
0answers
24 views

Adjusting Column Widths in Tables

I'm new to Latex and struggling with adjusting the widths of a few columns in a Table. From the table attached here, I just need columns 2 & 4 to be reduced so that column 5 can be enlarged. Here ...
1
vote
1answer
65 views

`\readlist{}` inside a table not working

I am writing a package, which contains the following code as its part. The problem is \readlist inside longtable environment. When I write the code, not as a macro but in the main body it works, in ...
2
votes
1answer
21 views

aligning addition symbols in array

I have been trying to figure out how to put addition symbols in between each of the following characters for this code: \begin{equation} \begin{array}{c|ccccc} &a_0 &...
0
votes
1answer
16 views

array/matrix specify default alignment

normally you write a matrix something like this \begin{align*} \begin{pmatrix} ele1 & ele2 & ele3 \\ longEle1 & longEle2 & longEle3 \end{pmatrix} \end{align*} ...
1
vote
2answers
62 views

! LaTeX Error: Illegal character in array arg

I'm having the following error message ABD: EveryShipout initializing macros geometry driver: auto-detecting geometry detected driver: pdftex No file main.bbl. ! LaTeX Error: Illegal ...
3
votes
1answer
33 views

array environment: missing $ inserted and some other issues

I have the following code: \begin{array}{cc|c|c|} & & \multicolumn{2}{c}{odd} \\ & & 0 & 1 \\ \cline{3-4} \multirow{2}{*}{even} & 0 & $(+1,-1)$ & $(-...
1
vote
3answers
51 views

How to prevent superscript getting too close to line above

The below code is working but the superscript H appears to be too close to the line above. How can I put some space in between the H and the line right above it? Thx. \documentclass{article} \...
0
votes
1answer
23 views

“missing { inserted” what was the problem

I basically copy pasted an example from here Yet it won't compile. I would really appreciate some help here \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}% {>{\ttfamily\...
2
votes
3answers
45 views

Diagonal dashed line in array

I would like to have a diagonal dashed line in an array cell. In the example, it should replace \ddot. For me, \ddot is inconvenient since I already use dots with different meaning. \documentclass{...
3
votes
2answers
102 views

Highlight sub array of tikzpicture generate array

In the generated 28 x 28 array of circles from the given code, I wanted to be able to highlight a specific sub array and have the respective arrows pointing out as follows: Here is the code I have so ...
-1
votes
2answers
129 views

Help me typeset math formulas!

I want to type these but i just don't know how to do it. Here are the pictures: Please give me the code to each one of them. Thank you all in advance.
1
vote
1answer
27 views

How do I apply different aligning options in different columns in a table?

I'm trying to figure out how I get different aligning for different columns in my table. I want the first and second column to be left-aligned and to the top of each cell (in case it turns out that ...
0
votes
1answer
18 views

How can I add spacing and alignment within and to an array of text?

How can I take a text array such as this: \[ \left. \begin{array}{l} \textrm{Commonwealth}\\ \textrm{vs}\\ \textrm{Person on Trial} \end{array} \right\} \textrm{A matter of Debt} \] Which ...
4
votes
4answers
173 views

Pass array as macro argument

I want to be able to pass an array as a macro argument as for example : \newcommand{\printLinks}[1]{ //For each links in #1 print it } \printLinks{ {link1, link2, ..., linkn} } % Results in \...
2
votes
1answer
37 views

Align within an (fl)align environment

I have a centered list of equations, and I'd like each of the equations to begin at the same margin from the left, then to have the equality signs start at the same margin, etc., whilst keeping the ...
0
votes
1answer
27 views

Middle-aligned option without width argument for tabular using array package

Consider a basic tabular environment. Two columns, the first must contain a tikzpicture of indeterminate size, the second, a description of determinate (and user-specified) width. If the content of ...
0
votes
2answers
51 views

Draw table with red markers around column and row

How I can draw similar of this red markers on the same tableau as follows?: i have used the following code to draw the tableau: \begin{equation*} \begin{array}{cc|cccccccc|c} & &...
0
votes
1answer
138 views

How to draw a simplex tableau in LaTex?

I would like to draw a simplex table as follows, I tried, \begin{equation} \begin{array}{cc|cccccccc|c} & & x_1 & x_2 & x_3 & s_1 & s_2 & s_3 & a_2 ...
3
votes
1answer
101 views

Cases vs. Array environments

I would like to completely understand all the differences between using the amsmath environment cases and using the array environment to write functions with cases. Here is my current understanding ...
0
votes
2answers
54 views

How to generate multicolumn figures with individual captions

Excluding the header stuff, how would I create something exactly like the first document/image, but with side labels that show quantity of each item (second image)? I thought about using the subfloats ...
4
votes
3answers
80 views

array of coordinates and array of strings

I want to use an array of coordinates and an array of names, both arrays being declared as Latex macros. The code below works but it I do not understand why the first array \Tpos is declared with ...
1
vote
2answers
54 views

How to draw a simple fixed width full page table?

I would like to generate pages of memory from a script and I think LaTeX is the perfect tool to build a nice PDF. However, I am struggling with the table environment and I don't know how to design the ...
1
vote
1answer
47 views

tikz-picture: for-loop over array

I want to plot a piecewise constant function like that minimal example: Hello, I want to plot a piecewise constant function like that minimal example: \documentclass[tikz]{standalone} \usepackage[...

1
2 3 4 5
17