Fix a Word Table of Contents Extending Beyond the Page
Question details
The user needs to bring a table of contents and its page numbers within the margins of a 6-by-9-inch book.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Formatting a table of contents for a 6-by-9-inch book.
- Observed behavior
- The table of contents extends beyond the right page edge, placing page numbers outside the document.
In Word, check Layout > Size and Layout > Margins to confirm the 6-by-9-inch page size and intended book margins. Note the usable text width, accounting for any gutter, so you can place the right-aligned tab within the text area.
Correct the Table of Contents Styles and Tab Stops in Word
Use this method to move page numbers inside the right margin and keep the correction in the TOC styles.
Open Layout > Size and select or set a 6-by-9-inch page. Under Layout > Margins, check the left and right margins and any gutter.
Select View > Ruler to display the text boundaries. If helpful, switch to View > Draft while inspecting the TOC entries.
Select References > Table of Contents > Custom Table of Contents, then choose Modify. Select TOC 1 and choose Modify > Format > Tabs.
In the Tabs dialog, select and clear any tab stop beyond the usable text width. Add a tab stop at the right edge of the text area, choose Right alignment and the desired leader, then select Set and OK.
Repeat the tab adjustment for the other levels in use, such as TOC 2 and TOC 3. Select the table, choose Update Table, and check that the page numbers fit within the margins.

Adjust Your Book’s Table of Contents in WPS Writer
Use WPS Writer to set the book’s page size and margins, insert a table of contents, and adjust its formatting so page numbers fit within the text area.
- 1. Open the document: Open WPS Writer and select Open to load your book document.
- 2. Set the page layout: Use Page Layout > Size to set a 6-by-9-inch page, then open Margins to check the book’s margins and gutter.
- 3. Insert or update the TOC: Place the cursor where the table should appear and choose References > Table of Contents. If a TOC already exists, select it and use its update option.
- 4. Check the alignment: Select a TOC entry and use the ruler or paragraph tab settings to place its right-aligned page-number tab within the text area. Check each TOC level and review the result after updating.

Frequently Asked Questions
Why do my TOC page numbers extend past the page edge?
The page size, margins, or a right-aligned tab stop may not match the book layout. Check Layout > Size and Layout > Margins, then inspect the TOC style’s tab settings.
How do I add dots before the page numbers?
In Word, open the relevant TOC style’s Format > Tabs dialog, select the right-aligned tab stop, and choose a dotted leader before selecting Set.
Why should I adjust TOC 1, TOC 2, and TOC 3 separately?
Each TOC level can use a different style and tab position. In References > Table of Contents > Custom Table of Contents > Modify, adjust each level used by your table.
Will updating the table remove manual formatting?
Updating the entire table can replace formatting applied directly to individual entries. Modify the TOC styles instead, then use Update Table and check the result.




