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

learn more… | top users | synonyms

8
votes
3answers
3k 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
7k 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
152 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
549 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
103 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
151 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
768 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
2k 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
3k 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
237 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 ...
12
votes
4answers
4k 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
15k 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 ...
8
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
754 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
2k 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
307 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
306 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
1k 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
2k 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
2k 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
656 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: ...
5
votes
3answers
8k 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
4k 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
638 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( ...
10
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
310 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} ...
14
votes
3answers
703 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
426 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
110 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
988 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
856 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 ...
4
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
229 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
275 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
2k 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
271 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 ...
2
votes
1answer
146 views

Array and macro resetting

I would like to make an array with some automatic calculations. I use the package ftlpoint. I made a test, but it does not work: \newcommand{\line}[2]{% \fpMul{\produit}{#1}{#2}% Calculation ...
2
votes
1answer
4k views

How to resize a fomula inside a block?

I would like to insert a formula as a block in my presentation: \begin{block}{concretization}{ $\renewcommand{\arraystretch}{1.5}% \begin{array}{l} \gamma \rightarrow ... \end{array}$ ...
5
votes
3answers
6k views

Typesetting on block matrix is ugly

I have a large n x n matrix I'm trying to typeset. My current code is as follows: $\left(\begin{array}{c|ccc} 1 & c_2 & \cdots & c_n \\ \hline 0 & ...
2
votes
3answers
9k views

how to insert multi line equation in the tabular environment?

How can insert multi line equation in the tabular environment? For example see the following code that can show my request. \begin{tabular}{rrr} &a &b\\ &u=\begin{cases} 0;& ...
3
votes
1answer
709 views

Passing two or more dimensional arrays to lua

I can write: \def\myarray{{Nrs,1,2,3}} then I can call lua: \luadirect{myfunc(\myarray)} and access the values in the array/table. How would one do it for multidimensional ones? I initially ...
1
vote
2answers
296 views

\pgfmathdectobase macro \pgfmathresult digit index or bitwise operators

Is there a way to access each digit of a macro returned by \pgfmathdectobase (or \pgfmathresult) which is a binary number ? This would be useful for a function which prints the power set of a given ...
0
votes
2answers
662 views

How to make equal width columns?

Based on Leo's answer but I removed one column and replaced the \big) with a vertical rule. Now I want to make all columns have the same width. How to do this? \documentclass{article} ...
28
votes
4answers
4k views

Using display style fraction in a matrix environment

I'd like use the \dfrac command in a bmatrix environment as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \dfrac{\partial f}{\partial x} \\ ...