How to Automatically Number Word Captions in Appendices
Question details
The user needs to configure document templates so that captions within lettered appendices accurately display the current appendix letter instead of referencing the previous chapter's number.

- Product
- Word Processors
- Device & OS
- not provided
- Scenario
- Setting up advanced document templates containing lettered appendices that require automated, sequential numbering for tables and figures.
- Observed behavior
- Table and figure captions in appendices incorrectly display the latest chapter number rather than updating to match the current appendix heading.
Ensure you have your main document chapters numbered correctly and reveal your document's field codes (commonly toggled with Alt+F9) to manually edit STYLEREF and SEQ fields.
Use Custom Styles and SEQ Fields for Appendix Captions
Bypass the limitations of built-in caption numbering by combining STYLEREF and SEQ fields to create custom appendix captions that update correctly.
The built-in restart switch (\s) for caption numbering only works with built-in heading styles. When using custom headings for lettered appendices, you must construct the caption label manually using field codes to reference the correct heading and restart the numerical sequence.
Create a new custom style named 'Appendix Heading'. Set its Outline Level to 1 and apply automatic alphabetical numbering (e.g., Appendix A, Appendix B).
Where you want your caption, press Ctrl+F9 to insert field brackets. Type 'STYLEREF "Appendix Heading" \s' inside the brackets to pull the current appendix letter.
Type a hyphen or period after the STYLEREF field. Press Ctrl+F9 again and type 'SEQ AppTable \r 1'. The '\r 1' switch forces the sequence to restart at 1 for the first table of the new appendix.
For the second and subsequent tables in the same appendix, use the field code 'SEQ AppTable' without the '\r' switch so the numbers count up sequentially.
Highlight your completed custom caption codes and save them to your AutoText gallery for easy reuse. Press F9 to update the fields and display the final text.

Create and Manage Complex Documents with WPS Writer
WPS Office provides comprehensive support for advanced document formatting, including custom styles, SEQ fields, and cross-references, making it easy to manage professional reports with appendices.
- 1. Set up custom styles: Open your document in WPS Writer and use the Home tab to create your custom Outline Level 1 styles for appendices.
- 2. Insert custom fields: Navigate to the Insert tab, click on Field, and insert your STYLEREF and SEQ formulas to construct accurate captions.
- 3. Save caption templates: Use the AutoText function under the Insert tab to save your custom caption sequence, allowing you to deploy it instantly in future appendices.
- 4. Refresh all document fields: Press Ctrl+A to select the entire document, then press F9 to instantly refresh all caption sequences and cross-references.

Frequently Asked Questions
Why does my appendix caption show the previous chapter's number?
Default caption numbering relies entirely on built-in heading styles (like Heading 1). If your appendix uses a custom style, the built-in caption generator defaults to the last recognized built-in heading, which is typically the previous chapter.
How do I restart caption numbering at the beginning of a new appendix?
Because the standard restart switch (\s) only works with built-in styles, you must manually restart custom appendix captions by appending the '\r 1' switch to the SEQ field in the first caption of every new appendix.
Can I create a cross-reference to these custom appendix captions?
Yes. You can either use the cross-reference tool directed at your custom caption labels, or manually bookmark the text of the custom caption and insert a cross-reference that points to that specific bookmark.




