# base/dots-to-ldots-or-cdots

Resolve plain \dots to an explicit ellipsis only when the following math atom class determines MathJax's choice.

https://texform.dev/rules/base/dots-to-ldots-or-cdots

## Metadata

| Field | Value |
| --- | --- |
| Key | base/dots-to-ldots-or-cdots |
| Level | faithful |
| Fidelity | render |
| Enabled by packages | base |
| Profiles | Faithful, Corpus, Equiv |

## Rewrite patterns

### following-non-bin-rel

From:

```latex
\dots #1
```

To:

```latex
\ldots #1
```

### following-bin-rel

From:

```latex
\dots #1
```

To:

```latex
\cdots #1
```

## Examples

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

### Following non bin rel

Before:

```latex
a,\dots,b
```

After this rule:

```latex
a,\ldots,b
```

Packages: base.

Rendering verified with the declared packages.

### Following bin rel

Before:

```latex
a\dots=b
```

After this rule:

```latex
a\cdots=b
```

Packages: base.

Rendering verified with the declared packages.

### Right boundary preserved

Before:

```latex
x+\dots
```

After this rule:

```latex
x+\dots
```

Packages: base.

Rendering verified with the declared packages.

## Triggers

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

## Produces

- [\\ldots](https://texform.dev/latex/symbols/ldots)
- [\\cdots](https://texform.dev/latex/symbols/cdots)

## Touches

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

## Same family

- [ams/Doteq-to-doteqdot](https://texform.dev/rules/ams/Doteq-to-doteqdot): Collapse Doteq to the descriptive doteqdot character.
- [ams/doublecap-to-Cap](https://texform.dev/rules/ams/doublecap-to-Cap): Collapse doublecap to the more common Cap character.
- [ams/gggtr-to-ggg](https://texform.dev/rules/ams/gggtr-to-ggg): Collapse gggtr to the shorter ggg character.
- [ams/llless-to-lll](https://texform.dev/rules/ams/llless-to-lll): Collapse llless to the shorter lll character.
- [ams/trianglerighteq-to-unrhd](https://texform.dev/rules/ams/trianglerighteq-to-unrhd): Collapse trianglerighteq to the more common unrhd character.
- [ams/unlhd-to-trianglelefteq](https://texform.dev/rules/ams/unlhd-to-trianglelefteq): Collapse unlhd to the descriptive trianglelefteq character.
- [ams/vartriangleleft-to-lhd](https://texform.dev/rules/ams/vartriangleleft-to-lhd): Collapse vartriangleleft to the more common lhd character.
- [ams/vartriangleright-to-rhd](https://texform.dev/rules/ams/vartriangleright-to-rhd): Collapse vartriangleright to the more common rhd character.
- [ams/impliedby-to-Longleftarrow](https://texform.dev/rules/ams/impliedby-to-Longleftarrow): Collapse impliedby to the explicit AMS long-left-arrow spelling with source-backed spacing.
- [ams/implies-to-Longrightarrow](https://texform.dev/rules/ams/implies-to-Longrightarrow): Collapse implies to the explicit AMS long-right-arrow spelling with source-backed spacing.
- [ams/Join-to-bowtie](https://texform.dev/rules/ams/Join-to-bowtie): Normalize Join to bowtie for corpus form.
- [ams/centerdot-to-cdot](https://texform.dev/rules/ams/centerdot-to-cdot): Normalize AMS centerdot to the base cdot character for corpus form.
- [ams/doublecup-to-Cup](https://texform.dev/rules/ams/doublecup-to-Cup): Normalize doublecup to Cup for corpus form.
- [ams/leadsto-to-rightsquigarrow](https://texform.dev/rules/ams/leadsto-to-rightsquigarrow): Normalize leadsto to the more common rightsquigarrow corpus form.
- [ams/lozenge-to-Diamond](https://texform.dev/rules/ams/lozenge-to-Diamond): Normalize lozenge to Diamond for corpus form.
- [ams/restriction-to-upharpoonright](https://texform.dev/rules/ams/restriction-to-upharpoonright): Normalize restriction to upharpoonright for corpus form.
- [ams/square-to-Box](https://texform.dev/rules/ams/square-to-Box): Normalize square to Box for corpus form.
- [ams/vartriangle-to-bigtriangleup](https://texform.dev/rules/ams/vartriangle-to-bigtriangleup): Normalize vartriangle to bigtriangleup for corpus form.
- [base/ast-to-asterisk](https://texform.dev/rules/base/ast-to-asterisk): Canonicalize the math binary operator \ast to the pixel-identical literal asterisk form.
- [base/ge-to-geq](https://texform.dev/rules/base/ge-to-geq): Collapse ge to the explicit geq relation character.
- [base/le-to-leq](https://texform.dev/rules/base/le-to-leq): Collapse le to the explicit leq relation character.
- [base/lnot-to-neg](https://texform.dev/rules/base/lnot-to-neg): Collapse lnot to the standard neg character.
- [base/ne-to-neq](https://texform.dev/rules/base/ne-to-neq): Collapse ne to the explicit neq relation character.
- [base/owns-to-ni](https://texform.dev/rules/base/owns-to-ni): Collapse owns to the shorter ni character.
- [base/prime-to-prime-node](https://texform.dev/rules/base/prime-to-prime-node): Convert the prime control sequence to the Prime AST node.
- [base/not-equals-to-neq](https://texform.dev/rules/base/not-equals-to-neq): Rewrite \not followed by an equals sign to the canonical \neq character.
- [base/not-exists-to-nexists](https://texform.dev/rules/base/not-exists-to-nexists): Rewrite \not\exists to the canonical AMS \nexists character when the target is available.
- [base/not-in-to-notin](https://texform.dev/rules/base/not-in-to-notin): Rewrite \not\in to the canonical \notin character.
- [base/not-right-arrow-to-nrightarrow](https://texform.dev/rules/base/not-right-arrow-to-nrightarrow): Rewrite not followed by a U+2192 right arrow to the canonical AMS nrightarrow character.
- [base/gets-to-leftarrow](https://texform.dev/rules/base/gets-to-leftarrow): Normalize gets to leftarrow for corpus form.
- [base/land-to-wedge](https://texform.dev/rules/base/land-to-wedge): Normalize land to wedge for corpus form.
- [base/lor-to-vee](https://texform.dev/rules/base/lor-to-vee): Normalize lor to vee for corpus form.
- [base/rightarrow-to-to](https://texform.dev/rules/base/rightarrow-to-to): Normalize rightarrow to the shorter to arrow character for corpus form.
- [base/semantic-dots-to-cdots](https://texform.dev/rules/base/semantic-dots-to-cdots): Normalize semantic centered-dot ellipsis aliases to cdots for corpus form.
- [base/semantic-dots-to-ldots](https://texform.dev/rules/base/semantic-dots-to-ldots): Normalize semantic baseline ellipsis aliases to ldots for corpus form.
- [physics/divsymbol-to-divisionsymbol](https://texform.dev/rules/physics/divsymbol-to-divisionsymbol): Collapse divsymbol to the documented divisionsymbol character alias.
- [physics/dotproduct-to-vdot](https://texform.dev/rules/physics/dotproduct-to-vdot): Collapse dotproduct to the shorter vdot character alias.
- [physics/cross-aliases-to-times](https://texform.dev/rules/physics/cross-aliases-to-times): Normalize physics cross-product glyph aliases to times for corpus form.

## Notes

MathJax BaseItems.DotsItem selects cdots only when the next embellished core atom has Bin or Rel TeX class; otherwise it selects ldots. The rule must inspect AST siblings and known character/command records, skip missing or unclassifiable following atoms, and leave \dotsb/\dotsc/\dotsi/\dotsm/\dotso to their existing owners. It is a partial matcher and therefore touches rather than eliminates cmd:dots. Every Applied result replaces one eligible cmd:dots node with ldots or cdots; missing and unclassifiable following atoms return Skipped, so the number of eligible cmd:dots nodes strictly decreases.

## Disable this rule

```python
TransformEngine(profile="corpus", disable_rules=["base/dots-to-ldots-or-cdots"])
```

```javascript
new TransformEngine({ profile: 'corpus', disableRules: ['base/dots-to-ldots-or-cdots'] })
```

[Open in Playground](https://play.texform.dev/?input=a%2C%5Cdots%2Cb)
