# physics/vectorunit-to-vu

Collapse vectorunit to the short vu helper.

https://texform.dev/rules/physics/vectorunit-to-vu

## Metadata

| Field | Value |
| --- | --- |
| Key | physics/vectorunit-to-vu |
| Level | authoring |
| Fidelity | render |
| Enabled by packages | physics |
| Profiles | Authoring, Faithful, Corpus, Equiv |

## Rewrite patterns

### vectorunit

From:

```latex
\vectorunit{#1}
```

To:

```latex
\vu{#1}
```

### vectorunit-star

From:

```latex
\vectorunit*{#1}
```

To:

```latex
\vu*{#1}
```

## Examples

Examples show the rule in isolation, not a complete normalization profile.

### vectorunit radial basis

Before:

```latex
\vectorunit{e}_r\cdot\vb{r}=r
```

After this rule:

```latex
\vu{e}_r\cdot\vb{r}=r
```

Packages: base, physics.

Rendering verified with the declared packages.

### vectorunit star bold italic

Before:

```latex
\vectorunit*{\alpha}\cdot\vectorunit*{p}
```

After this rule:

```latex
\vu*{\alpha}\cdot\vu*{p}
```

Packages: base, physics.

Rendering verified with the declared packages.

## Triggers

- [\\vectorunit](https://texform.dev/latex/commands/vectorunit)

## Eliminates

- [\\vectorunit](https://texform.dev/latex/commands/vectorunit)

## Produces

- [\\vu](https://texform.dev/latex/commands/vu)

## Downstream

- [physics/vu-to-hat-mathbf](https://texform.dev/rules/physics/vu-to-hat-mathbf): Canonicalize vu to an explicit hat-wrapped mathbf form.

## Same family

- [physics/derivative-to-dv](https://texform.dev/rules/physics/derivative-to-dv): Collapse derivative to the compact dv command.
- [physics/functional-derivative-to-fdv](https://texform.dev/rules/physics/functional-derivative-to-fdv): Collapse long functional derivative names to the fdv command.
- [physics/partial-derivative-to-pdv](https://texform.dev/rules/physics/partial-derivative-to-pdv): Collapse long partial derivative names to the pdv command.
- [physics/vectorarrow-to-va](https://texform.dev/rules/physics/vectorarrow-to-va): Collapse vectorarrow to the short va helper.
- [physics/vectorbold-to-vb](https://texform.dev/rules/physics/vectorbold-to-vb): Collapse vectorbold to the short vb helper.
- [physics/dv-to-frac-d](https://texform.dev/rules/physics/dv-to-frac-d): Expand dv forms to explicit d-based derivative fractions.
- [physics/fdv-to-frac-delta](https://texform.dev/rules/physics/fdv-to-frac-delta): Expand fdv forms to explicit delta-based derivative fractions.
- [physics/pdv-to-frac-partial](https://texform.dev/rules/physics/pdv-to-frac-partial): Expand pdv forms to explicit partial-derivative fractions.
- [physics/va-to-vec-mathbf](https://texform.dev/rules/physics/va-to-vec-mathbf): Canonicalize va to an explicit vec-wrapped mathbf form.
- [physics/vb-to-mathbf](https://texform.dev/rules/physics/vb-to-mathbf): Canonicalize vb to an explicit mathbf wrapper.
- [physics/vu-to-hat-mathbf](https://texform.dev/rules/physics/vu-to-hat-mathbf): Canonicalize vu to an explicit hat-wrapped mathbf form.

## Notes

Star is preserved on the short alias; physics StarMacro propagates it into the nested vb branch used under hat.

## Disable this rule

```python
TransformEngine(profile="corpus", disable_rules=["physics/vectorunit-to-vu"])
```

```javascript
new TransformEngine({ profile: 'corpus', disableRules: ['physics/vectorunit-to-vu'] })
```

[Open in Playground](https://play.texform.dev/?input=%5Cvectorunit%7Be%7D_r%5Ccdot%5Cvb%7Br%7D%3Dr)
