# \newcolumntype

Used to define reusable array/tabular column specifiers, including parameterized column types for custom preambles.

https://texform.dev/latex/commands/newcolumntype

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Layout and breaks](https://texform.dev/latex/topics/layout) |
| Packages | base |
| Allowed mode | math |
| Tags | invisible, newdefine |
| Commonality | low |
| Kind | prefix |

## Syntax

### base

Argument specification: `m O{0}:I m`

Used to define reusable array/tabular column specifiers, including parameterized column types for custom preambles.

## Examples

```latex
\newcolumntype{C}{c}
```

[Open in Playground](https://play.texform.dev/?input=%5Cnewcolumntype%7BC%7D%7Bc%7D)

```latex
\newcolumntype{C}[1]{c}
```

[Open in Playground](https://play.texform.dev/?input=%5Cnewcolumntype%7BC%7D%5B1%5D%7Bc%7D)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| base | full | none | none |

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \newcolumntype{a}{b} | Positive: baseline | Pass | Fail | Fail |
| \newcolumntype{a}[1]{c} | Positive: vary:o[1] | Pass | Fail | Fail |
| \newcolumntype a{b} | Positive: bare[0] | Pass | Fail | Fail |
| \newcolumntype{a}b | Positive: bare[2] | Pass | Fail | Fail |
| \newcolumntype{a}[a]{b} | Negative: neg:I[1] | Fail | Fail | Fail |
