# \diffd

Used to produce the differential operator 'd', automatically adapting between upright and italic forms based on package options.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Physics: derivatives](https://texform.dev/latex/topics/physics-derivatives) |
| Packages | physics |
| Allowed mode | math |
| Tags |  |
| Commonality | low |
| Kind | prefix |

## Syntax

### physics

Argument specification: ``

Used to produce the differential operator 'd', automatically adapting between upright and italic forms based on package options.

## Examples

```latex
\diffd
```

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

```latex
\diffd x
```

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

## Renderer support

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

## In TeXForm

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

### Expands to (physics)

```latex
\diffd
```

→

```latex
{\rm d}
```

Expands to 'd' instead if the physics option 'italicdiff' is enabled.

## Equivalent forms

```latex
\mathrm{d}
```

approximate. Similar to the default upright behavior of \diffd.

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \diffd | Positive: baseline | Pass | Fail | Pass |
