# .save index command (Output processor)

The .save index command saves the index
to a defined item-ID in the same file where the Output processor document
resides.

**Synonyms:** .si

## Syntax

```
.save index item-ID
```

## Description

The .save index command is placed in the text item itself and must precede the .index commands. Only the indexed data that has been preceded
by the .save index command is saved in the specified
file.

The saved index is formatted in one column. The item can
then be formatted and edited to create a custom index format.

## Example(s)

```
.save index indexbody
.index: ’topic one’ ’subtopic one’ ’subtopic two’ .xix
.bp
.index ’topic two’ .xix
.pi
```
Results in index body:

```
topic one
subtopic one, 1
subtopic two, 1
topic two, 1
```

## See also

- [.index command (Output processor)](https://d3codex.com/output-processor/dot-index-command-output-processor/)
- [.print index command (Output processor)](https://d3codex.com/output-processor/dot-print-index-command-output-processor/)
- [Output processor commands](https://d3codex.com/output-processor/output-processor-commands/)
- [Output processor overview](https://d3codex.com/output-processor/output-processor-overview/)

---
Source: https://d3codex.com/output-processor/dot-save-index-command-output-processor/ - part of the D3Codex reference.
