@@ -498,6 +498,32 @@ function lowercasePageFieldFooterXml(): string {
498498` ;
499499}
500500
501+ function formattedPageFieldFooterXml ( ) : string {
502+ const pageField = ( instruction : string , cachedText : string ) => `
503+ <w:r><w:fldChar w:fldCharType="begin"/></w:r>
504+ <w:r><w:instrText xml:space="preserve">${ instruction } </w:instrText></w:r>
505+ <w:r><w:fldChar w:fldCharType="separate"/></w:r>
506+ <w:r><w:t>${ cachedText } </w:t></w:r>
507+ <w:r><w:fldChar w:fldCharType="end"/></w:r>` ;
508+
509+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
510+ <w:ftr xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
511+ <w:p>
512+ <w:pPr>
513+ <w:pStyle w:val="Footer"/>
514+ <w:jc w:val="center"/>
515+ </w:pPr>
516+ <w:r><w:t xml:space="preserve">Formats </w:t></w:r>
517+ ${ pageField ( 'PAGE \\* Roman' , 'I' ) }
518+ <w:r><w:t xml:space="preserve"> </w:t></w:r>
519+ ${ pageField ( 'PAGE \\* ALPHABETIC' , 'A' ) }
520+ <w:r><w:t xml:space="preserve"> </w:t></w:r>
521+ ${ pageField ( 'PAGE \\* ArabicDash' , '- 1 -' ) }
522+ </w:p>
523+ </w:ftr>
524+ ` ;
525+ }
526+
501527function inlinePageFieldSingleRunFooterXml ( ) : string {
502528 return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
503529<w:ftr xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="${ NS_R } " xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w="${ NS_W } " xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 wp14">
@@ -658,6 +684,14 @@ export const FOOTER_LOWERCASE_PAGE_FIELD_DOC_PATH = ensureGeneratedFixture(
658684 'word/footer2.xml' : lowercasePageFieldFooterXml ( ) ,
659685 } ,
660686) ;
687+ export const FOOTER_FORMATTED_PAGE_FIELD_DOC_PATH = ensureGeneratedFixture (
688+ 'footer-formatted-page-field.docx' ,
689+ 'h_f-normal.docx' ,
690+ {
691+ 'word/document.xml' : multiPageHeaderFooterDocumentXml ( ) ,
692+ 'word/footer2.xml' : formattedPageFieldFooterXml ( ) ,
693+ } ,
694+ ) ;
661695export const FOOTER_SIMPLE_TEXT_WITH_TABLE_AND_FOOTNOTE_DOC_PATH = ensureGeneratedFixture (
662696 'footer-simple-text-with-table-and-footnote.docx' ,
663697 'h_f-normal.docx' ,
0 commit comments