# \emph

Used in text mode to emphasize text, typically rendering as italics

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

## Metadata

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

## Syntax

### textmacros

Argument specification: `m:T`

Used in text mode to emphasize text, typically rendering as italics

## Examples

```latex
\text{\emph{hello}}
```

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

```latex
\text{\emph{emphasized}}
```

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

```latex
\emph{x}
```

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

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## Equivalent forms

```latex
\textit{#1}
```

approximate. \textit applies italics unconditionally, whereas \emph toggles between italic and upright based on context.

## Test cases

### textmacros

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \emph{a} | Positive: baseline | Fail | Pass | Pass |
| \emph a | Positive: bare[0] | Fail | Pass | Pass |
| \emph{a^2} | Negative: neg:T[0] | Fail | Fail | Fail |
