1 #!C:/dev/python25/python.exe
5 Test a simple document containing citations, definition lists, and footnotes.
10 ... :author: Alan G. Isaac
11 ... :contact: aisaac@american.edu
20 ... with another definition
25 ... Here is a citation reference: [mycite2007]_.
27 ... With a footnote. [#fntest]_
29 ... .. [#fntest] The note.
34 <w:wordDocument xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:embeddedObjPresent="no" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:v="urn:schemas-microsoft-com:vml" xml:space="preserve" w:ocxPresent="no" xmlns:w10="urn:schemas-microsoft-com:office:word" w:macrosPresent="no" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" >
35 <w:ignoreElements w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2" ></w:ignoreElements>
37 <w:defaultFonts w:h-ansi="Times New Roman" w:fareast="Times New Roman" w:cs="Times New Roman" w:ascii="Times New Roman" ></w:defaultFonts>
38 <w:font w:name="Wingdings" >
39 <w:panose-1 w:val="05000000000000000000" ></w:panose-1>
40 <w:charset w:val="02" ></w:charset>
41 <w:family w:val="Auto" ></w:family>
42 <w:pitch w:val="variable" ></w:pitch>
43 <w:sig w:csb-1="00000000" w:csb-0="80000000" w:usb-3="00000000" w:usb-2="00000000" w:usb-1="10000000" w:usb-0="00000000" ></w:sig>
47 <w:listDef w:listDefId="0" >
48 <w:plt w:val="HybridMultilevel" ></w:plt>
49 <w:tmpl w:val="9C26005E" ></w:tmpl>
50 <w:lvl w:ilvl="0" w:tplc="0409000F" >
51 <w:start w:val="1" ></w:start>
52 <w:lvlText w:val="%1." ></w:lvlText>
53 <w:lvlJc w:val="left" ></w:lvlJc>
56 <w:tab w:val="list" w:pos="720" ></w:tab>
58 <w:ind w:hanging="360" w:left="720" ></w:ind>
61 <w:lvl w:ilvl="1" w:tplc="04090019" >
62 <w:start w:val="1" ></w:start>
63 <w:nfc w:val="4" ></w:nfc>
64 <w:lvlText w:val="%2." ></w:lvlText>
65 <w:lvlJc w:val="left" ></w:lvlJc>
68 <w:tab w:val="list" w:pos="1440" ></w:tab>
70 <w:ind w:hanging="360" w:left="1440" ></w:ind>
73 <w:lvl w:ilvl="2" w:tplc="0409001B" >
74 <w:start w:val="1" ></w:start>
75 <w:nfc w:val="2" ></w:nfc>
76 <w:lvlText w:val="%3." ></w:lvlText>
77 <w:lvlJc w:val="right" ></w:lvlJc>
80 <w:tab w:val="list" w:pos="2160" ></w:tab>
82 <w:ind w:hanging="180" w:left="2160" ></w:ind>
85 <w:lvl w:ilvl="3" w:tplc="0409000F" >
86 <w:start w:val="1" ></w:start>
87 <w:lvlText w:val="%4." ></w:lvlText>
88 <w:lvlJc w:val="left" ></w:lvlJc>
91 <w:tab w:val="list" w:pos="2880" ></w:tab>
93 <w:ind w:hanging="360" w:left="2880" ></w:ind>
96 <w:lvl w:ilvl="4" w:tplc="04090019" >
97 <w:start w:val="1" ></w:start>
98 <w:nfc w:val="4" ></w:nfc>
99 <w:lvlText w:val="%5." ></w:lvlText>
100 <w:lvlJc w:val="left" ></w:lvlJc>
103 <w:tab w:val="list" w:pos="3600" ></w:tab>
105 <w:ind w:hanging="360" w:left="3600" ></w:ind>
108 <w:lvl w:ilvl="5" w:tplc="0409001B" >
109 <w:start w:val="1" ></w:start>
110 <w:nfc w:val="2" ></w:nfc>
111 <w:lvlText w:val="%6." ></w:lvlText>
112 <w:lvlJc w:val="right" ></w:lvlJc>
115 <w:tab w:val="list" w:pos="4320" ></w:tab>
117 <w:ind w:hanging="180" w:left="4320" ></w:ind>
120 <w:lvl w:ilvl="6" w:tplc="0409000F" >
121 <w:start w:val="1" ></w:start>
122 <w:lvlText w:val="%7." ></w:lvlText>
123 <w:lvlJc w:val="left" ></w:lvlJc>
126 <w:tab w:val="list" w:pos="5040" ></w:tab>
128 <w:ind w:hanging="360" w:left="5040" ></w:ind>
131 <w:lvl w:ilvl="7" w:tplc="04090019" >
132 <w:start w:val="1" ></w:start>
133 <w:nfc w:val="4" ></w:nfc>
134 <w:lvlText w:val="%8." ></w:lvlText>
135 <w:lvlJc w:val="left" ></w:lvlJc>
138 <w:tab w:val="list" w:pos="5760" ></w:tab>
140 <w:ind w:hanging="360" w:left="5760" ></w:ind>
143 <w:lvl w:ilvl="8" w:tentative="on" w:tplc="0409001B" >
144 <w:start w:val="1" ></w:start>
145 <w:nfc w:val="2" ></w:nfc>
146 <w:lvlText w:val="%9." ></w:lvlText>
147 <w:lvlJc w:val="right" ></w:lvlJc>
150 <w:tab w:val="list" w:pos="6480" ></w:tab>
152 <w:ind w:hanging="180" w:left="6480" ></w:ind>
156 <w:listDef w:listDefId="1" >
157 <w:plt w:val="HybridMultilevel" ></w:plt>
158 <w:tmpl w:val="6DBC60EA" ></w:tmpl>
159 <w:lvl w:ilvl="0" w:tplc="04090001" >
160 <w:start w:val="1" ></w:start>
161 <w:nfc w:val="23" ></w:nfc>
162 <w:lvlText w:val="" ></w:lvlText>
163 <w:lvlJc w:val="left" ></w:lvlJc>
166 <w:tab w:val="list" w:pos="720" ></w:tab>
168 <w:ind w:hanging="360" w:left="720" ></w:ind>
171 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
174 <w:lvl w:ilvl="1" w:tplc="04090003" >
175 <w:start w:val="1" ></w:start>
176 <w:nfc w:val="23" ></w:nfc>
177 <w:lvlText w:val="o" ></w:lvlText>
178 <w:lvlJc w:val="left" ></w:lvlJc>
181 <w:tab w:val="list" w:pos="1440" ></w:tab>
183 <w:ind w:hanging="360" w:left="1440" ></w:ind>
186 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
189 <w:lvl w:ilvl="2" w:tplc="04090005" >
190 <w:start w:val="1" ></w:start>
191 <w:nfc w:val="23" ></w:nfc>
192 <w:lvlText w:val="" ></w:lvlText>
193 <w:lvlJc w:val="left" ></w:lvlJc>
196 <w:tab w:val="list" w:pos="2160" ></w:tab>
198 <w:ind w:hanging="360" w:left="2160" ></w:ind>
201 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
204 <w:lvl w:ilvl="3" w:tplc="04090001" >
205 <w:start w:val="1" ></w:start>
206 <w:nfc w:val="23" ></w:nfc>
207 <w:lvlText w:val="" ></w:lvlText>
208 <w:lvlJc w:val="left" ></w:lvlJc>
211 <w:tab w:val="list" w:pos="2880" ></w:tab>
213 <w:ind w:hanging="360" w:left="2880" ></w:ind>
216 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
219 <w:lvl w:ilvl="4" w:tplc="04090003" >
220 <w:start w:val="1" ></w:start>
221 <w:nfc w:val="23" ></w:nfc>
222 <w:lvlText w:val="o" ></w:lvlText>
223 <w:lvlJc w:val="left" ></w:lvlJc>
226 <w:tab w:val="list" w:pos="3600" ></w:tab>
228 <w:ind w:hanging="360" w:left="3600" ></w:ind>
231 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
234 <w:lvl w:ilvl="5" w:tplc="04090005" >
235 <w:start w:val="1" ></w:start>
236 <w:nfc w:val="23" ></w:nfc>
237 <w:lvlText w:val="" ></w:lvlText>
238 <w:lvlJc w:val="left" ></w:lvlJc>
241 <w:tab w:val="list" w:pos="4320" ></w:tab>
243 <w:ind w:hanging="360" w:left="4320" ></w:ind>
246 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
249 <w:lvl w:ilvl="6" w:tplc="04090001" >
250 <w:start w:val="1" ></w:start>
251 <w:nfc w:val="23" ></w:nfc>
252 <w:lvlText w:val="" ></w:lvlText>
253 <w:lvlJc w:val="left" ></w:lvlJc>
256 <w:tab w:val="list" w:pos="5040" ></w:tab>
258 <w:ind w:hanging="360" w:left="5040" ></w:ind>
261 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
264 <w:lvl w:ilvl="7" w:tplc="04090003" >
265 <w:start w:val="1" ></w:start>
266 <w:nfc w:val="23" ></w:nfc>
267 <w:lvlText w:val="o" ></w:lvlText>
268 <w:lvlJc w:val="left" ></w:lvlJc>
271 <w:tab w:val="list" w:pos="5760" ></w:tab>
273 <w:ind w:hanging="360" w:left="5760" ></w:ind>
276 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
279 <w:lvl w:ilvl="8" w:tplc="04090005" >
280 <w:start w:val="1" ></w:start>
281 <w:nfc w:val="23" ></w:nfc>
282 <w:lvlText w:val="" ></w:lvlText>
283 <w:lvlJc w:val="left" ></w:lvlJc>
286 <w:tab w:val="list" w:pos="6480" ></w:tab>
288 <w:ind w:hanging="360" w:left="6480" ></w:ind>
291 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
299 <w:versionOfBuiltInStylenames w:val="4" ></w:versionOfBuiltInStylenames>
300 <w:latentStyles w:latentStyleCount="156" w:defLockedState="off" ></w:latentStyles>
301 <w:style w:styleId="Normal" w:type="paragraph" w:default="on" >
302 <w:name w:val="Normal" ></w:name>
304 <w:spacing w:after="120" ></w:spacing>
307 <wx:font wx:val="Times New Roman" ></wx:font>
308 <w:sz-cs w:val="24" ></w:sz-cs>
309 <w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA" ></w:lang>
312 <w:style w:styleId="Hyperlink" w:type="character" >
313 <w:name w:val="Hyperlink" ></w:name>
314 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
316 <w:color w:val="0000FF" ></w:color>
317 <w:u w:val="single" ></w:u>
320 <w:style w:styleId="LiteralBlock" w:type="paragraph" >
321 <w:name w:val="LiteralBlock" ></w:name>
322 <w:basedOn w:val="Normal" ></w:basedOn>
323 <w:next w:val="Normal" ></w:next>
325 <w:pStyle w:val="LiteralBlock" ></w:pStyle>
326 <w:ind w:right="720" w:left="720" ></w:ind>
329 <w:rFonts w:h-ansi="Courier New" w:ascii="Courier New" ></w:rFonts>
330 <wx:font wx:val="Courier New" ></wx:font><w:sz w:val="20" ></w:sz>
333 <w:style w:styleId="Heading1" w:type="paragraph" >
334 <w:name w:val="heading 1" ></w:name>
335 <wx:uiName wx:val="Heading 1" ></wx:uiName>
336 <w:basedOn w:val="Normal" ></w:basedOn>
337 <w:next w:val="Normal" ></w:next>
339 <w:pStyle w:val="Heading1" ></w:pStyle>
340 <w:keepNext ></w:keepNext>
341 <w:spacing w:before="240" w:after="60" ></w:spacing>
342 <w:outlineLvl w:val="0" ></w:outlineLvl>
345 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
346 <wx:font wx:val="Arial" ></wx:font>
349 <w:kern w:val="32" ></w:kern>
350 <w:sz w:val="32" ></w:sz>
351 <w:sz-cs w:val="32" ></w:sz-cs>
354 <w:style w:styleId="Heading2" w:type="paragraph" >
355 <w:name w:val="heading 2" ></w:name>
356 <wx:uiName wx:val="Heading 2" ></wx:uiName>
357 <w:basedOn w:val="Normal" ></w:basedOn>
358 <w:next w:val="Normal" ></w:next>
360 <w:pStyle w:val="Heading2" ></w:pStyle>
361 <w:keepNext ></w:keepNext>
362 <w:spacing w:before="240" w:after="60" ></w:spacing>
363 <w:outlineLvl w:val="1" ></w:outlineLvl>
366 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
367 <wx:font wx:val="Arial" ></wx:font>
372 <w:sz w:val="28" ></w:sz>
373 <w:sz-cs w:val="28" ></w:sz-cs>
376 <w:style w:styleId="Heading3" w:type="paragraph" >
377 <w:name w:val="heading 3" ></w:name>
378 <wx:uiName wx:val="Heading 3" ></wx:uiName>
379 <w:basedOn w:val="Normal" ></w:basedOn>
380 <w:next w:val="Normal" ></w:next>
382 <w:pStyle w:val="Heading3" ></w:pStyle>
383 <w:keepNext ></w:keepNext>
384 <w:spacing w:before="240" w:after="60" ></w:spacing>
385 <w:outlineLvl w:val="2" ></w:outlineLvl>
388 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
389 <wx:font wx:val="Arial" ></wx:font>
392 <w:sz w:val="26" ></w:sz>
393 <w:sz-cs w:val="26" ></w:sz-cs>
396 <w:style w:styleId="DefaultParagraphFont" w:type="character" w:default="on" >
397 <w:name w:val="Default Paragraph Font" ></w:name>
398 <w:semiHidden ></w:semiHidden>
400 <w:style w:styleId="TableNormal" w:type="table" w:default="on" >
401 <w:name w:val="Normal Table" ></w:name>
402 <wx:uiName wx:val="Table Normal" ></wx:uiName>
403 <w:semiHidden ></w:semiHidden>
405 <wx:font wx:val="Times New Roman" ></wx:font>
408 <w:tblInd w:w="0" w:type="dxa" ></w:tblInd>
410 <w:top w:w="0" w:type="dxa" ></w:top>
411 <w:left w:w="108" w:type="dxa" ></w:left>
412 <w:bottom w:w="0" w:type="dxa" ></w:bottom>
413 <w:right w:w="108" w:type="dxa" ></w:right>
417 <w:style w:styleId="NoList" w:type="list" w:default="on" >
418 <w:name w:val="No List" ></w:name>
419 <w:semiHidden ></w:semiHidden>
421 <w:style w:styleId="Literal" w:type="character" >
422 <w:name w:val="Literal" ></w:name>
423 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
425 <w:rFonts w:h-ansi="Courier New" w:ascii="Courier New" ></w:rFonts>
428 <w:style w:styleId="EndnoteText" w:type="paragraph" >
429 <w:name w:val="endnote text" ></w:name>
430 <wx:uiName wx:val="Endnote Text" ></wx:uiName>
431 <w:basedOn w:val="Normal" ></w:basedOn>
432 <w:semiHidden ></w:semiHidden>
434 <w:pStyle w:val="EndnoteText" ></w:pStyle>
437 <wx:font wx:val="Times New Roman" ></wx:font>
438 <w:sz w:val="20" ></w:sz>
439 <w:sz-cs w:val="20" ></w:sz-cs>
442 <w:style w:styleId="EndnoteReference" w:type="character" >
443 <w:name w:val="endnote reference" ></w:name>
444 <wx:uiName wx:val="Endnote Reference" ></wx:uiName>
445 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
446 <w:semiHidden ></w:semiHidden>
448 <w:vertAlign w:val="superscript" ></w:vertAlign>
451 <w:style w:styleId="AuthorName" w:type="paragraph" >
452 <w:name w:val="AuthorName" ></w:name>
453 <w:basedOn w:val="Normal" ></w:basedOn>
454 <w:next w:val="Normal" ></w:next>
456 <w:pStyle w:val="AuthorName" ></w:pStyle>
457 <w:spacing w:before="240" w:after="240" ></w:spacing>
458 <w:jc w:val="center" ></w:jc>
464 <w:style w:styleId="AuthorContact" w:type="paragraph" >
465 <w:name w:val="AuthorContact" ></w:name>
466 <w:basedOn w:val="Normal" ></w:basedOn>
467 <w:next w:val="Normal" ></w:next>
469 <w:pStyle w:val="AuthorContact" ></w:pStyle>
470 <w:spacing w:before="240" w:after="240" ></w:spacing>
471 <w:jc w:val="center" ></w:jc>
474 <wx:font wx:val="Times New Roman" ></wx:font>
478 <w:style w:styleId="BibliographMatter" w:type="paragraph" >
479 <w:name w:val="BibliographMatter" ></w:name>
480 <w:basedOn w:val="Normal" ></w:basedOn>
481 <w:next w:val="Normal" ></w:next>
483 <w:pStyle w:val="BibliographMatter" ></w:pStyle>
484 <w:spacing w:before="240" w:after="240" ></w:spacing>
485 <w:jc w:val="center" ></w:jc>
491 <w:style w:styleId="DefinitionTerm" w:type="paragraph" >
492 <w:name w:val="DefinitionTerm" ></w:name>
493 <w:basedOn w:val="Normal" ></w:basedOn>
494 <w:next w:val="Normal" ></w:next>
496 <w:pStyle w:val="DefinitionTerm" ></w:pStyle>
502 <w:style w:styleId="Definition" w:type="paragraph" >
503 <w:name w:val="Definition" ></w:name>
504 <w:basedOn w:val="Normal" ></w:basedOn>
505 <w:next w:val="Normal" ></w:next>
507 <w:pStyle w:val="Definition" ></w:pStyle>
510 <w:style w:styleId="CitationReference" w:type="character" >
511 <w:name w:val="CitationReference" ></w:name>
512 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
514 <w:style w:styleId="Topic" w:type="paragraph" >
515 <w:name w:val="Topic" ></w:name>
516 <w:basedOn w:val="Normal" ></w:basedOn>
517 <w:next w:val="Normal" ></w:next>
519 <w:pStyle w:val="Topic" ></w:pStyle>
520 <w:ind w:right="1440" w:left="1440" ></w:ind>
521 <w:jc w:val="both" ></w:jc>
526 <w:view w:val="print" ></w:view>
527 <w:zoom w:percent="100" ></w:zoom>
528 <w:doNotEmbedSystemFonts ></w:doNotEmbedSystemFonts>
529 <w:proofState w:grammar="clean" w:spelling="clean" ></w:proofState>
530 <w:attachedTemplate w:val="" ></w:attachedTemplate>
531 <w:defaultTabStop w:val="720" ></w:defaultTabStop>
532 <w:punctuationKerning ></w:punctuationKerning>
533 <w:characterSpacingControl w:val="DontCompress" ></w:characterSpacingControl>
534 <w:optimizeForBrowser ></w:optimizeForBrowser>
535 <w:validateAgainstSchema ></w:validateAgainstSchema>
536 <w:saveInvalidXML w:val="off" ></w:saveInvalidXML>
537 <w:ignoreMixedContent w:val="off" ></w:ignoreMixedContent>
538 <w:alwaysShowPlaceholderText w:val="off" ></w:alwaysShowPlaceholderText>
540 <w:breakWrappedTables ></w:breakWrappedTables>
541 <w:snapToGridInCell ></w:snapToGridInCell>
542 <w:wrapTextWithPunct ></w:wrapTextWithPunct>
543 <w:useAsianBreakRules ></w:useAsianBreakRules>
544 <w:useWord2002TableStyleRules ></w:useWord2002TableStyleRules>
547 <w:footnote w:type="separator" >
550 <w:separator ></w:separator>
554 <w:footnote w:type="continuation-separator" >
557 <w:continuationSeparator ></w:continuationSeparator>
563 <w:numFmt w:val="decimal" ></w:numFmt>
564 <w:endnote w:type="separator" >
567 <w:separator ></w:separator>
571 <w:endnote w:type="continuation-separator" >
574 <w:continuationSeparator ></w:continuationSeparator>
584 <w:pStyle w:val="Heading1">
588 <w:t>Just A Test</w:t>
593 <w:pStyle w:val="AuthorName">
597 <w:t>Alan G. Isaac</w:t>
602 <w:pStyle w:val="AuthorContact">
605 <w:hlink w:dest="mailto:aisaac@american.edu">
608 <w:rStyle w:val="Hyperlink">
611 <w:t>aisaac@american.edu</w:t>
617 <w:pStyle w:val="BibliographMatter">
626 <w:pStyle w:val="DefinitionTerm">
635 <w:ind w:right="720" w:left="720">
637 <w:pStyle w:val="Definition">
641 <w:t>with a definition</w:t>
646 <w:ind w:right="720" w:left="720">
648 <w:pStyle w:val="Definition">
652 <w:t>with another definition</w:t>
657 <w:pStyle w:val="DefinitionTerm">
666 <w:ind w:right="720" w:left="720">
668 <w:pStyle w:val="Definition">
672 <w:t>with a definition</w:t>
677 <w:t>Here is a citation reference: </w:t>
681 <w:rStyle w:val="CitationReference">
684 <w:endnote w:suppressRef="on">
687 <w:pStyle w:val="EndnoteText">
692 <w:rStyle w:val="CitationReference">
695 <w:t>[mycite2007] </w:t>
698 <w:t>Citation text.</w:t>
702 <w:t>[mycite2007]</w:t>
710 <w:t>With a footnote. </w:t>
714 <w:rStyle w:val="EndnoteReference">
720 <w:pStyle w:val="EndnoteText">
725 <w:rStyle w:val="EndnoteReference">
745 <w:numFmt w:val="decimal" ></w:numFmt>
747 <w:pgSz w:w="12240" w:h="15840" ></w:pgSz>
748 <w:pgMar w:header="720" w:gutter="0" w:right="1800" w:top="1440" w:bottom="1440" w:footer="720" w:left="1800" ></w:pgMar>
749 <w:cols w:space="720" ></w:cols>
750 <w:docGrid w:line-pitch="360" ></w:docGrid>
757 from docutils
import core
, io
760 def test_wordml( input_string
):
761 overrides
= { 'template' : '../template.xml' }
762 parts
= core
.publish_string( input_string
, writer_name
='docutils_wordml', settings_overrides
=overrides
)
768 today
= datetime
.date
.today().strftime("%Y-%m-%d")
769 m
= sys
.modules
.get('__main__')
770 m
.__doc
__ = m
.__doc
__.replace( "%date%", today
);
773 if __name__
== "__main__":