# \parbox

Creates a fixed-width paragraph box around content, with optional vertical alignment, for line-breaking or boxing short text/math material.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Boxes and text](https://texform.dev/latex/topics/boxes-text) |
| Packages | base |
| Allowed mode | both |
| Tags | presentation |
| Commonality | medium |
| Kind | prefix |

## Syntax

### base

Argument specification: `O{c}:N m:L m:T`

Creates a fixed-width paragraph box around content, with optional vertical alignment, for line-breaking or boxing short text/math material.

## Examples

```latex
\parbox{2em}{x}
```

[Open in Playground](https://play.texform.dev/?input=%5Cparbox%7B2em%7D%7Bx%7D)

```latex
\parbox[t]3em{x+y}
```

[Open in Playground](https://play.texform.dev/?input=%5Cparbox%5Bt%5D3em%7Bx%2By%7D)

```latex
\raisebox{1ex}{\parbox[t]{2em}{$x^2$}}
```

[Open in Playground](https://play.texform.dev/?input=%5Craisebox%7B1ex%7D%7B%5Cparbox%5Bt%5D%7B2em%7D%7B%24x%5E2%24%7D%7D)

## Renderer support

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

## Usage frequency

<0.01% of formulas in the measured corpus contain this entry, rank 190 of 263 entries with frequency data.

## In TeXForm

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

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \parbox{1pt}{x} | Positive: ctx:basic | Pass | Fail | Pass |
| \parbox[c]{1pt}{x} | Positive: ctx:align-c | Pass | Fail | Pass |
