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

learn more… | top users | synonyms

7
votes
4answers
479 views

What is the best way to indicate repeated off diagonal elements in a matrix/array?

I'd like to typeset a matrix of the following kind: When the symbols involved are big, like, in place of $r$, suppose we had $\mu(k-1)$ and in place of $\lambda$, we had $\mu(k-2)$, the matrix B below ...
6
votes
3answers
1k views

Color a line in array

Is it possible to change a color of a single line inside an array environment? I have an array of possible solutions and I'd like the best one to be highlighted, the array is declared like ...
10
votes
3answers
4k views

Convert numpy array into tabular

I am doing some data analysis in python, putting the results in form of a matrix stored into a numpy array. I would like to put this results into a report and the best way would be to put a table with ...
5
votes
1answer
4k views

Columns width of array environment

I'm using the array environment and have something like this: \begin{array}{|c|c|} \hline \textbf{x} & \textbf{y} \\ \hline \hline t_1 & lon_1 \\ \hline \end{array} I ...
6
votes
2answers
258 views

Is it blkarray compatible with beamer?

When I try next code \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{blkarray} \begin{document} \begin{frame}{Title} \[ \begin{blockarray}{c|c} ...
3
votes
1answer
639 views

using multiple brace in array environment

I want to create something like that Clearly every element should be coherent with eachother and line need to be connected. This is a MWE, how should I modify it to make it coherent: ...
1
vote
2answers
217 views

How to get the command (csname) content in another command (csname)

I'm trying to make a class following my school's standard for thesis and I got a problem when I tried to implement a list of acronyms, because this list should be alphabetically sorted and the ...
2
votes
1answer
270 views

Latex words within eqnarray are getting emphasized

I have a latex equation within an eqnarray as follows, \begin{eqnarray*}\nonumber f(\xi) = \min \xi\\ where, \forall n_{j} \in N, \xi = \max (\xi_{1}, \xi_{2}, .., \xi_{j})\\ s.t.\\ \forall n_{j} ...
8
votes
3answers
2k views

Page with Symbols and Notation

I want to make a section for symbols and special notation, which should look like this: What would you suggest in doing this? Should I just do like a table and create an array of 3 columns?
6
votes
2answers
5k views

Curly braces and nested arrays

I am trying to reproduce the equation of the image below. I am using an array environment to create the first big curly brace. I have tried to nest a second array to produce a second curly brace, but ...
4
votes
1answer
126 views

Paretheses should match same height on single line in multiple arrays

Given is following formula: \[ a^{(k)}=\left(\begin{array}{c} a_1^{(k)}\\ \vdots\\ a_n^{(k)} \end{array}\right)\to\left(\begin{array}{c} a_1\\ \vdots\\ a_n \end{array}\right)=a \] The first ...
9
votes
3answers
2k views

Problems using `\left\{` in array environment

I am trying to define a matrix in segments by enclosing the entries of the matrix in boxes, and also using the open and closed braces to label those segments. So far I have developed the following ...
4
votes
2answers
490 views

generating LaTeX tabular code during compilation

I use LaTeX for scientific reporting in brain imaging (fMRI). I have a tabular array in LaTeX, that contains quite a lot of rows and columns, which both are brain regions and in the each intersecting ...
2
votes
1answer
98 views

How to create an array with the last column align on the right at the end of the page (using array environment))

I would like if possible using array environment, to align the last column of my array to the right and at the end of the page. Something like that: \begin{array}{\textwidth}{l r} first column ...
14
votes
1answer
2k views

Multivariate polynomial long division using LaTeX

How do I typeset polynomial long division using multiple variables in LaTeX? I am hoping to be able to do polynomial long division using 2 or more divisors. Currently, the packages I am using are: ...
20
votes
3answers
2k views

How do I create a Shidoku grid?

I can't figure out how to create a Shidoku grid using LaTeX. In other words, I am trying to have a 4x4 grid with a bold line separating the 2x2 subsquares. I have the sudoku package but it won't ...
2
votes
1answer
143 views

Sized delimiters (\left( \right)) are too tall for vertically aligned array (\begin{array}[t])

Please compile the below and the problem will be clear. \documentclass{article} \begin{document} \noindent Compare \[ \begin{array}{l} \land ~a\\ \land \left( \begin{array}[t]{l} \lor ...
5
votes
2answers
645 views

Numbering Vertical Addition Problems

Right now I have the following for a vertical addition problem but I would also like it to be numbered without messing everything else up. \begin{array}{c@{\,}c} & 1 \\ + & 1 \\ \hline ...
5
votes
2answers
1k views

breaking lines in a matrix/array environment

I have a matrix whose entries are quite long and must be broken up across multiple lines. The desired break-points are the + operators separating terms in each matrix element. The following code is ...
6
votes
2answers
2k views

Make each column of a table have same width

I have a table as follows: &$\begin{array}{c|cc|cc} & x & \multicolumn{1}{c}{y} & i & 0 \\ \hline x & 0 & \multicolumn{1}{c}{} & -49 & \\ y & ...
2
votes
1answer
2k views

Caption of a table in an array-environment

I used the array-environment to construct a table of data: \documentclass[12pt,landscape]{article} \usepackage{amsmath,amssymb} \usepackage{array} \usepackage{booktabs}% for top-,mid- & ...
4
votes
2answers
231 views

Vertical alignment through all document

I am processing a text, which is the specification for my mathematical package. The typical style for the specification looks as follows: I can align expressions only in a single environment, using ...
11
votes
4answers
3k views

PGF/TikZ: How to store strings in array?

I'm trying to generate a lot of name badges. I'm wondering, is it possible to store the names as strings in one array, according to the PGF manual: ...
2
votes
1answer
11k views

How to use tabular/array to arrange figures [duplicate]

Possible Duplicate: How to use images in a table? I'm looking for a solution for automatic alignment of figures within my tex-file. I would like to keep it as simple as possible. I have the ...
6
votes
1answer
2k views

Make every element of an array displaystyle?

Is there a way to make every element of an array be \displaystyle? I don't want to do something like \everymath={\displaystyle} (or whatever it should be) because I want this for a particular array ...
8
votes
2answers
693 views

Enforcing That \array Stays Square When Drawing Matrix

I'm trying to draw a block matrix in LaTeX, and this is what I have so far: \begin{array}{|c|c|} \hline I_{r \times r} & 0 \\ \hline 0 & 0 \\ \hline \end{array} Here's a ...
9
votes
4answers
1k views

Text above matrices

I am new to latex and I am trying to create So far I have been able to create the matrices, like so: \[ N\textrm{ spectra} \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1M} \\ ...
22
votes
1answer
303 views

Does \\ in the last line of an array have any effect?

Consider the following example: \begin{array}{l} line 1 \\ line 2 \\ \end{array} Is the \\ in the last line completely optional or are there circumstances under which it has any effect?
7
votes
1answer
282 views

Tables header row's: how to ignore the column type?

I have several column types defined using the array and collcell package. An example \newcolumntype{N}{>{\collectcell\num}c<{\endcollectcell}} This alleviates making tables a lot, and makes ...
5
votes
4answers
834 views

Table of displayed formulae

I'm trying to make a table of formulae. I've tried a bunch of different approaches (including \parbox, align, eqnarray, etc.), but none of these satisfy all of the requirements: \hline (or something ...
7
votes
3answers
1k views

Drawing Multiple Diagonal Arrows in a Table

My question is basically the same as this one, but with many arrows instead. (I'd like to see the TikZ solution--I feel like once I get it here, I'll be able to extrapolate and do it in other cases ...
8
votes
3answers
1k views

How to align piecewise functions?

I have two piecewise functions defined like this: \begin{align*} \left\{ \begin{array}{ll} i = x^2 + y^2 \\ j = a^2 + b^2 \\ \end{array} \right. \\ \left\{ ...
5
votes
1answer
562 views

Inserting arrays into semantic's inference rules

I want to typeset inference rules containing tables (or arrays) in the premises. I'm using the semantic package, which sets the premises (and conclusion) in math mode, so I thought this might work: ...
3
votes
3answers
5k views

Clean-Looking Piecewise-Defined Functions

I want to write a clean-looking piecewise defined function. There's a similar post here: How to write a function (piecewise) with bracket outside?, but I have follow-up questions. The two options I ...
13
votes
5answers
3k 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. ...
4
votes
2answers
510 views

How can I use monospaced font inside a matrix (or tabular etc)?

I would like to display a matrix with characters using monospaced font (as in \tt and \mathtt), but I haven't found an easy way to do it. Something like this: \begin{center}{\tt\left( ...
8
votes
2answers
2k views

Gaussian reduction of matrices

I have to show a Gaussian reduction in an assignment, and I was wondering what the more space-efficient and neatest way of expressing this is. I thought about using \begin{smallmatrix} (it's only a ...
2
votes
1answer
286 views

label in subcaption and customize cell size of an array

Using the following code \documentclass[11pt]{article} \usepackage{caption} \usepackage{subcaption} \DeclareCaptionSubType*[arabic]{table} \captionsetup[subtable]{labelformat=simple,labelsep=space} ...
13
votes
3answers
578 views

How to find the length of a PGF array?

A few of my macros currently require the user to pass the length of an array along with the array itself. It would be nice if the length could be calculated for them, as the user in question (myself) ...
3
votes
2answers
399 views

Can one pass a pgf array to a pgf math function?

I'd like to define: anglearray(\A,\I,\L) = array(\A,Mod(\I,\L)) + 360*floor((\I+0.1)/\L); but I get strange errors about "! Missing number, treated as zero." and the "array" part appears to ...
2
votes
1answer
103 views

Macro with an array and a customisable number of columns (from 2 to 5)

I would like to automate the use of the following arrays. In the first one, the only arguments which change are \verb!\eqDef!, the commands tested, and A \eqDef B, the visual test. My problem is that ...
4
votes
3answers
875 views

\underbrace at a strange place, spanning array columns

Take a look at the following code: $$\begin{array}{rr|r|c|l} vd_2:&\raisebox{0pt}[0pt]{\makebox[0pt][l]{$\overbrace{\phantom{b_1\dots b_{n-l_{k-1}-2k}\hspace{2\arraycolsep}b_{n-l_{k-1}-2k+1}\dots ...
3
votes
1answer
558 views

Defining repeated tabular/array columns using a computed value to specify the number

Background: I just recently saw that one could define multiple columns in a tabular or array using the syntax: *{num}{<align>} So, for example \begin{tabular}{r*{3}{l}r} is the identical to ...
3
votes
1answer
1k views

Error with blkarray: Misplaced \noalign

I am trying to write a matrix with indices given to the rows and columns. I get the error "Misplaced \noalign." Does anybody understand why? The minimal example is below. \documentclass{minimal} ...
1
vote
2answers
214 views

How to create newlines?

I am new to Latex and found out how to use it a bit. Newlines are created by \\ I get the following error: \\ can only appear in a matrix or array How do you create newlines between matrix or ...
7
votes
2answers
252 views

How to stop fractions in display equations from running into each other?

Is there some standard way to create multiple display equations like the following without having to use: \renewcommand*{\arraystretch}{2} (so that the two rows in the second equation don't get ...
3
votes
1answer
1k views

Fix sized centered multirow and multicolumn tables

I'm using TeXLive 2011, and one of my friends has a problem with creating tables, which use fix sized centered \multirow and \multicolumn cells. This is his thesis, so there is a lot of ignorable code ...
19
votes
4answers
1k views

How can I display an array (as in the data structure from Computer Science, not the mathematical version) in LaTeX?

I'm finding this extraordinarily difficult to search for, as the mathematical meaning of "array" is much more common in LaTeX documentation. I essentially want a single row of boxes, into which I can ...
8
votes
3answers
244 views

Vertically Centering Text/Numbers in Rows of Array using Math Mode

I am trying to center text in an array of two rows inside a math mode environment so that the text in the second column of the array appears half way between the first and second row of the first ...
12
votes
2answers
2k views

Array with labeling columns

Is there an intelligent way to label (or name) columns in a matrix? I would like to have something like \[M=\left[\begin{array}{c|cc} 1 & 2 & 3\\ 4 & 5 & 6 ...