Topic: word

Word never stores the list numbers you see — a DOCX converter has to run a numbering engine

Word never stores the list numbers you see — a DOCX converter has to run a numbering engine
A law firm sent me a 60-page contract to convert, and by section 7 every cross-reference was off by one. The text said "as set out in clause 6.3" while the heading it pointed to read "6.4". I assumed a typo in the source document — until the same drift showed up in three other files that week. The root cause changed how I think about Word documents: the numbers you see in a DOCX are not stored anywhere. Open document.xml and search for "6.3" — you'll find cross-reference fields, maybe, but the list numbers themselves simply don't exist. A numbered paragraph carries only <w:numPr> with a numId and a nesting level. The visible number is computed at render time from numbering.xml: an abstract numbering definition holding formats like "%1.%2", start values, restart rules, and occasionally a startOverride when someone right-clicked "Restart at 1". So Word runs a small numbering engine on every render. My first converter jus...