# \it

Legacy math-mode declaration for switching subsequent symbols in the current group to math italic.

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

## Metadata

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

## Syntax

### base

Argument specification: ``

Legacy math-mode declaration for switching subsequent symbols in the current group to math italic.

### textmacros

Argument specification: ``

Legacy declaration that switches following text to italic styling until the current group ends.

## Examples

```latex
x \it y
```

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

```latex
{x \it y} z
```

[Open in Playground](https://play.texform.dev/?input=%7Bx+%5Cit+y%7D+z)

```latex
\text{\it x}
```

[Open in Playground](https://play.texform.dev/?input=%5Ctext%7B%5Cit+x%7D)

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| base |  | math | Legacy math-mode declaration for switching subsequent symbols in the current group to math italic. |
| textmacros |  | text | Legacy declaration that switches following text to italic styling until the current group ends. |

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

### Discouraged in base

Legacy declaration-style font switch; modern LaTeX prefers explicit math alphabet commands such as \mathit.

```latex
{\it $1} -> \mathit{$1}
```

\mathit is the modern argument-scoped math italic command; it avoids the legacy declaration-style scope of \it.

### Discouraged in textmacros

\it is a deprecated old-style font switch; modern LaTeX usage prefers NFSS declarations or scoped text commands.

```latex
{\it ...} -> {\itshape ...}
```

\itshape is the LaTeX2e declaration that supersedes the deprecated two-letter \it switch.

```latex
\it ... -> \textit{...}
```

\textit gives explicit scope and is the standard LaTeX2e text command for italic text.

## Equivalent forms

```latex
\mathit{#1}
```

approximate. Prefix command alternative for math mode

```latex
\textit{...}
```

approximate. \textit is a command with arguments, whereas \it is declarative.

```latex
{\itshape ...}
```

exact. 

## See also

- [\\bf](https://texform.dev/latex/commands/bf)
- [\\cal](https://texform.dev/latex/commands/cal)
- [\\mit](https://texform.dev/latex/commands/mit)
- [\\oldstyle](https://texform.dev/latex/commands/oldstyle)
- [\\rm](https://texform.dev/latex/commands/rm)
- [\\sf](https://texform.dev/latex/commands/sf)
- [\\tt](https://texform.dev/latex/commands/tt)

## Test cases

### base

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

### textmacros

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