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

learn more… | top users | synonyms

7
votes
1answer
289 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
930 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
600 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: ...
4
votes
3answers
6k 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
568 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
293 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
629 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
411 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
108 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
942 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
687 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
221 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
261 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
258 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
145 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
5k 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
658 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
288 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
652 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} ...
27
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} \\ ...
4
votes
3answers
847 views

Multiple arrays side-by-side?

what I've been trying to do is to pack multiple arrays on a single 'row', similar to what subfig module does with images (and tables, I guess); mostly to conserve space. Something like this: I ...
4
votes
3answers
1k views

How to include an array in cell of a tabular environment

For an equation that has an array we use \\ for new row as well, and \newline didn't work, and this is understood by the tabular environment as a new row! Would appreciate all the help!
7
votes
1answer
912 views

tabular and array

Consider the following example: \documentclass{article} \usepackage{array} \usepackage{calc} \begin{document} \begin{tabular}{p{\textwidth - 3cm}|p{1cm}<{foo}} Caption1 & Caption2\\ ...
5
votes
3answers
357 views

Is there a \foreach function that works in the preamble?

Tikz/PGF has an extremely useful implementation of \foreach, which allows for instance the construction \foreach \x / \y in {1/a,2/b,3/c,4/d} {\x is a lot like \y} in which you can iterate over a ...
0
votes
0answers
170 views

How to make a table column disappear? [duplicate]

Possible Duplicate: Easiest way to delete a column? I have many table in my document, and I have decided I don't want one of their columns to appear in the output. I don't want to just ...
1
vote
2answers
999 views

Right Align Equation Number with hfill in Custom Environment

I have a couple of custom environments that I want to be able to use \hfill to right align the last column (similar to what {align} environment does with equation labels}. I attempted to use \hfill ...
1
vote
2answers
949 views

Changing elements of arrays in Beamer without shifting the unchanging elements.

An array is to be displayed in a Beamer presentation with some elements constant across all slides in the frame. Other array elements, however, must change with the overlay in the frame and are of ...
3
votes
1answer
440 views

Array problem, can only have one row.

I'm not sure what I'm doing wrong, I'm trying to create a line of bits with labels. I'm trying to do this with an array: $\begin{array}{c|ccccccc} \mbox{L1} & \mbox{L2} & \mbox{L3} & ...
4
votes
2answers
724 views

Problem with \bordermatrix inside array

When a \bordermatrix is placed inside an array, the spacing between rows will be wrong (see the MWE below). What is causing this problem? Is there a solution? \documentclass{book} \begin{document} ...
0
votes
1answer
1k views

Cannot make latex multicolumn work

I am trying to make a matrix in LaTeX. Now I am trying to make a table with multicolumn like a b c d у So I coded \usepackage{arydshln} \usepackage{array} \usepackage{amsmath} ...
6
votes
3answers
314 views

Adding colour to table cells when decimals are aligned with arrays and {.} used in the column definition

I've got a table (below) that aligns the decimal points of my data - I wish to highlight a value (2 adjacent cells), however this leaves a white space where the decimal point is! If I increase the ...
16
votes
5answers
8k views

bordermatrix with blocks

I need to write a complicated matrix, that has a structure as in the attached picture.
3
votes
1answer
3k views

Right-aligned columns using the tabularx environment

I'm trying to typeset a matrix which has entries of differing widths. However, for aesthetic reasons, I would like each of the columns of the matrix to be the same width, and I'd furthermore like ...
2
votes
2answers
1k views

How can I process an array using TikZ 2.00 syntax?

I use TikZ/PGF 2.00. In the CVS PGF manual pag. 563 we have \def\myarray{{1,"two",2+1,"IV","cinq","sechs",sin(\i*5)*14}} \foreach \i in {0,...,6}{\pgfmathparse{\myarray[\i]}\pgfmathresult, } My ...
4
votes
3answers
2k views

How to get TikZ nodes not to change alignment?

I'm still working on rendering a nice block matrix. I've been using BMAT but it is irrelevant for the question at hand. I want to connect various entries in an array/matrix/BMAT by lines, and I'm ...