logo
search
Formatting Issues

Fix Word Index Formatting for See Cross-Reference Entries

Maira MehtabMaira Mehtab Sep 21, 2026 868 views

Question details

The user needs to correct a formatting issue where an index cross-reference (such as "See prior authorization" under "PA") fails to right-align properly.

Product
Word
Device & OS
not provided
Scenario
Generating an index and ensuring cross-reference entries are formatted cleanly with right-aligned subentries.
Observed behavior
Instead of right-aligning the subentry, the text appears directly adjacent to the main entry as "PA See prior authorization", and the user suspects an extra quotation mark in the XE field is responsible.
Before you start

Before editing your index entries, ensure you have enabled the display of hidden formatting symbols (Show/Hide ¶) so you can accurately view the XE and INDEX field codes.

Solution 1Recommended

Verify and Update the Main INDEX Field Code

Ensure the generated INDEX field contains the correct \e switch and tab character to apply right alignment to all entries.

The alignment of index entries is controlled by the main INDEX field code rather than the individual XE entries. If the right alignment fails, it is usually because the \e switch is missing or improperly configured in the INDEX field itself.

1
Reveal Field Codes

Press Alt + F9 (or Option + F9 on Mac) to reveal the underlying field codes in your document.

2
Locate the INDEX Field

Scroll to the end of your document where the index is located and find the main { INDEX } field code.

3
Check for the \e Switch

Ensure the field contains the \e switch followed by a space, a tab character, and another space (for example: { INDEX \e " " }). If it is missing, type it in manually.

4
Update the Index

Press Alt + F9 again to hide the field codes, then right-click anywhere inside the index and select 'Update Field' to apply the correct formatting.

Index-Wide Setting: The alignment setting configured in the INDEX field applies to the entire index globally, not just the single cross-reference entry.
Manage Indexes Easily

Create and Format Indexes with WPS Writer

WPS Writer provides a robust set of tools for generating, formatting, and updating document indexes and cross-references. It supports familiar field codes to ensure your document layout remains flawless.

  1. 1. Open Your Document: Launch WPS Writer and open the document where you need to create or edit an index.
  2. 2. Mark Index Entries: Navigate to the 'References' tab and click 'Mark Entry' to define your specific index terms and cross-references.
  3. 3. Insert the Index: Click 'Insert Index' from the References tab. In the dialog box, ensure the 'Right align page numbers' option is checked to guarantee correct formatting.
  4. 4. Update as Needed: Right-click the generated index and select 'Update Field' whenever you modify the document text or field codes.
Fully compatible with Microsoft Word document formats (.docx).Advanced referencing tools for easily inserting indexes and cross-references.Seamless handling of field codes like XE and INDEX.Free and lightweight office suite for Windows, Mac, and Linux.
microsoft office alternative - wps office

Frequently Asked Questions

Why are my index page numbers separated by commas instead of right-aligning?

This happens when the INDEX field code is missing the \e switch. Without this switch, page numbers and cross-references default to comma separation. You can fix this by enabling 'Right align page numbers' in the Insert Index dialog or by manually adding the \e switch to the field code.

How do I show or hide XE (Index Entry) fields in my document?

You can toggle the visibility of hidden XE fields by clicking the 'Show/Hide ¶' button on the Home tab ribbon, or by using the keyboard shortcut Ctrl+* (Ctrl+Shift+8).

Will fixing an extra quotation mark in an XE field correct the whole index?

Fixing a syntax error in an XE field only corrects that specific entry. General alignment issues, such as right-aligning cross-references, are controlled by the main INDEX field code, which dictates the layout for the entire index.