# \acomm

Used to typeset anticommutators such as {A,B} in quantum mechanics, field theory, and graded algebra.

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

## Metadata

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

## Syntax

### physics

Argument specification: `s m{} m`

Used to typeset anticommutators such as {A,B} in quantum mechanics, field theory, and graded algebra.

## Examples

```latex
\acomm{A}{B}
```

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

```latex
\acomm*{A}B
```

[Open in Playground](https://play.texform.dev/?input=%5Cacomm*%7BA%7DB)

## 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
\acomm{#1}#2
```

→

```latex
\left\{#1,#2\right\}
```

The mapping passes \{ and \} as the fence pair. If a neighboring \big, \bigg, \Big, or \Bigg follows the command, that size command is used instead; if starred, the result is fixed \{#1,#2\} and any such size modifier is consumed but ignored in the final rewrite.

## Equivalent forms

```latex
\anticommutator{#1}#2
```

exact. 

```latex
\left\{#1,#2\right\}
```

exact. Matches the unstarred form when no intervening \big/\bigg/\Big/\Bigg size modifier is used.

## See also

- [\\anticommutator](https://texform.dev/latex/commands/anticommutator)
- [\\comm](https://texform.dev/latex/commands/comm)
- [\\commutator](https://texform.dev/latex/commands/commutator)
- [\\pb](https://texform.dev/latex/commands/pb)
- [\\poissonbracket](https://texform.dev/latex/commands/poissonbracket)

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \acomm{a}{b} | Positive: baseline | Pass | Fail | Pass |
| \acomm*{a}{b} | Positive: vary:s[0] | Pass | Fail | Pass |
| \acomm{a}b | Positive: bare[2] | Pass | Fail | Pass |
