# \displaystyle

Forces display-style math within the current math group, commonly to make inline fractions, sums, or integrals use display sizing.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Fonts and styles](https://texform.dev/latex/topics/fonts-styles) |
| Packages | base |
| Allowed mode | math |
| Tags | presentation |
| Commonality | high |
| Kind | declarative |

## Syntax

### base

Argument specification: ``

Forces display-style math within the current math group, commonly to make inline fractions, sums, or integrals use display sizing.

## Common tasks

### How to force display style inside inline math

Wrap the switch and the formula in a group so the style does not leak.

```latex
{\displaystyle \sum_{n=1}^\infty \frac{1}{n^2}}
```

[Open in Playground](https://play.texform.dev/?input=%7B%5Cdisplaystyle+%5Csum_%7Bn%3D1%7D%5E%5Cinfty+%5Cfrac%7B1%7D%7Bn%5E2%7D%7D)

### How to keep a nested fraction large

```latex
{\displaystyle \frac{\frac{a}{b}}{\frac{c}{d}}}
```

[Open in Playground](https://play.texform.dev/?input=%7B%5Cdisplaystyle+%5Cfrac%7B%5Cfrac%7Ba%7D%7Bb%7D%7D%7B%5Cfrac%7Bc%7D%7Bd%7D%7D%7D)

### How to put limits under an operator in a text-style slot

```latex
{\displaystyle \int_0^1 f(x)\,dx}
```

[Open in Playground](https://play.texform.dev/?input=%7B%5Cdisplaystyle+%5Cint_0%5E1+f%28x%29%5C%2Cdx%7D)

## Examples

```latex
\displaystyle
```

[Open in Playground](https://play.texform.dev/?input=%5Cdisplaystyle)

```latex
\displaystyle x
```

[Open in Playground](https://play.texform.dev/?input=%5Cdisplaystyle+x)

## Renderer support

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

## Usage frequency

1.00% of formulas in the measured corpus contain this entry, rank 49 of 263 entries with frequency data.

## In TeXForm

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

## See also

- [\\scriptscriptstyle](https://texform.dev/latex/commands/scriptscriptstyle)
- [\\scriptstyle](https://texform.dev/latex/commands/scriptstyle)
- [\\textstyle](https://texform.dev/latex/commands/textstyle)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| {\displaystyle a} | Positive: baseline | Pass | Pass | Pass |
