Fix #338: re.sub() flag argument at wrong position.
[docutils.git] / sandbox / rst2wordml / tests / test2.py
blob71a5d452f4c97c1025cfe951d10d41b598d4c23b
1 #!C:/dev/python25/python.exe
2 # coding: utf-8
4 """
5 Test a simple document containing citations, definition lists, and footnotes.
6 >>> test_wordml('''
7 ... Just A Test
8 ... -----------
9 ...
10 ... :author: Alan G. Isaac
11 ... :contact: aisaac@american.edu
12 ... :date: |date|
13 ...
14 ... .. |date| date::
15 ...
16 ...
17 ... Term1
18 ... with a definition
19 ...
20 ... with another definition
21 ...
22 ... Term2
23 ... with a definition
24 ...
25 ... Here is a citation reference: [mycite2007]_.
26 ...
27 ... With a footnote. [#fntest]_
28 ...
29 ... .. [#fntest] The note.
30 ...
31 ... .. [mycite2007]
32 ... Citation text.
33 ... ''')
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>
36 <w:fonts >
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>
44 </w:font>
45 </w:fonts>
46 <w:lists >
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>
54 <w:pPr >
55 <w:tabs >
56 <w:tab w:val="list" w:pos="720" ></w:tab>
57 </w:tabs>
58 <w:ind w:hanging="360" w:left="720" ></w:ind>
59 </w:pPr>
60 </w:lvl>
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>
66 <w:pPr >
67 <w:tabs >
68 <w:tab w:val="list" w:pos="1440" ></w:tab>
69 </w:tabs>
70 <w:ind w:hanging="360" w:left="1440" ></w:ind>
71 </w:pPr>
72 </w:lvl>
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>
78 <w:pPr >
79 <w:tabs >
80 <w:tab w:val="list" w:pos="2160" ></w:tab>
81 </w:tabs>
82 <w:ind w:hanging="180" w:left="2160" ></w:ind>
83 </w:pPr>
84 </w:lvl>
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>
89 <w:pPr >
90 <w:tabs >
91 <w:tab w:val="list" w:pos="2880" ></w:tab>
92 </w:tabs>
93 <w:ind w:hanging="360" w:left="2880" ></w:ind>
94 </w:pPr>
95 </w:lvl>
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>
101 <w:pPr >
102 <w:tabs >
103 <w:tab w:val="list" w:pos="3600" ></w:tab>
104 </w:tabs>
105 <w:ind w:hanging="360" w:left="3600" ></w:ind>
106 </w:pPr>
107 </w:lvl>
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>
113 <w:pPr >
114 <w:tabs >
115 <w:tab w:val="list" w:pos="4320" ></w:tab>
116 </w:tabs>
117 <w:ind w:hanging="180" w:left="4320" ></w:ind>
118 </w:pPr>
119 </w:lvl>
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>
124 <w:pPr >
125 <w:tabs >
126 <w:tab w:val="list" w:pos="5040" ></w:tab>
127 </w:tabs>
128 <w:ind w:hanging="360" w:left="5040" ></w:ind>
129 </w:pPr>
130 </w:lvl>
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>
136 <w:pPr >
137 <w:tabs >
138 <w:tab w:val="list" w:pos="5760" ></w:tab>
139 </w:tabs>
140 <w:ind w:hanging="360" w:left="5760" ></w:ind>
141 </w:pPr>
142 </w:lvl>
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>
148 <w:pPr >
149 <w:tabs >
150 <w:tab w:val="list" w:pos="6480" ></w:tab>
151 </w:tabs>
152 <w:ind w:hanging="180" w:left="6480" ></w:ind>
153 </w:pPr>
154 </w:lvl>
155 </w:listDef>
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>
164 <w:pPr >
165 <w:tabs >
166 <w:tab w:val="list" w:pos="720" ></w:tab>
167 </w:tabs>
168 <w:ind w:hanging="360" w:left="720" ></w:ind>
169 </w:pPr>
170 <w:rPr >
171 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
172 </w:rPr>
173 </w:lvl>
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>
179 <w:pPr >
180 <w:tabs >
181 <w:tab w:val="list" w:pos="1440" ></w:tab>
182 </w:tabs>
183 <w:ind w:hanging="360" w:left="1440" ></w:ind>
184 </w:pPr>
185 <w:rPr >
186 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
187 </w:rPr>
188 </w:lvl>
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>
194 <w:pPr >
195 <w:tabs >
196 <w:tab w:val="list" w:pos="2160" ></w:tab>
197 </w:tabs>
198 <w:ind w:hanging="360" w:left="2160" ></w:ind>
199 </w:pPr>
200 <w:rPr >
201 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
202 </w:rPr>
203 </w:lvl>
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>
209 <w:pPr >
210 <w:tabs >
211 <w:tab w:val="list" w:pos="2880" ></w:tab>
212 </w:tabs>
213 <w:ind w:hanging="360" w:left="2880" ></w:ind>
214 </w:pPr>
215 <w:rPr >
216 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
217 </w:rPr>
218 </w:lvl>
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>
224 <w:pPr >
225 <w:tabs >
226 <w:tab w:val="list" w:pos="3600" ></w:tab>
227 </w:tabs>
228 <w:ind w:hanging="360" w:left="3600" ></w:ind>
229 </w:pPr>
230 <w:rPr >
231 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
232 </w:rPr>
233 </w:lvl>
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>
239 <w:pPr >
240 <w:tabs >
241 <w:tab w:val="list" w:pos="4320" ></w:tab>
242 </w:tabs>
243 <w:ind w:hanging="360" w:left="4320" ></w:ind>
244 </w:pPr>
245 <w:rPr >
246 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
247 </w:rPr>
248 </w:lvl>
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>
254 <w:pPr >
255 <w:tabs >
256 <w:tab w:val="list" w:pos="5040" ></w:tab>
257 </w:tabs>
258 <w:ind w:hanging="360" w:left="5040" ></w:ind>
259 </w:pPr>
260 <w:rPr >
261 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
262 </w:rPr>
263 </w:lvl>
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>
269 <w:pPr >
270 <w:tabs >
271 <w:tab w:val="list" w:pos="5760" ></w:tab>
272 </w:tabs>
273 <w:ind w:hanging="360" w:left="5760" ></w:ind>
274 </w:pPr>
275 <w:rPr >
276 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
277 </w:rPr>
278 </w:lvl>
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>
284 <w:pPr >
285 <w:tabs >
286 <w:tab w:val="list" w:pos="6480" ></w:tab>
287 </w:tabs>
288 <w:ind w:hanging="360" w:left="6480" ></w:ind>
289 </w:pPr>
290 <w:rPr >
291 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
292 </w:rPr>
293 </w:lvl>
294 </w:listDef>
295 <BLANKLINE>
296 <BLANKLINE>
297 </w:lists>
298 <w:styles >
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>
303 <w:pPr >
304 <w:spacing w:after="120" ></w:spacing>
305 </w:pPr>
306 <w:rPr >
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>
310 </w:rPr>
311 </w:style>
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>
315 <w:rPr >
316 <w:color w:val="0000FF" ></w:color>
317 <w:u w:val="single" ></w:u>
318 </w:rPr>
319 </w:style>
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>
324 <w:pPr >
325 <w:pStyle w:val="LiteralBlock" ></w:pStyle>
326 <w:ind w:right="720" w:left="720" ></w:ind>
327 </w:pPr>
328 <w:rPr >
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>
331 </w:rPr>
332 </w:style>
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>
338 <w:pPr >
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>
343 </w:pPr>
344 <w:rPr >
345 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
346 <wx:font wx:val="Arial" ></wx:font>
347 <w:b ></w:b>
348 <w:b-cs ></w:b-cs>
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>
352 </w:rPr>
353 </w:style>
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>
359 <w:pPr >
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>
364 </w:pPr>
365 <w:rPr >
366 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
367 <wx:font wx:val="Arial" ></wx:font>
368 <w:b ></w:b>
369 <w:b-cs ></w:b-cs>
370 <w:i ></w:i>
371 <w:i-cs ></w:i-cs>
372 <w:sz w:val="28" ></w:sz>
373 <w:sz-cs w:val="28" ></w:sz-cs>
374 </w:rPr>
375 </w:style>
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>
381 <w:pPr >
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>
386 </w:pPr>
387 <w:rPr >
388 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
389 <wx:font wx:val="Arial" ></wx:font>
390 <w:b ></w:b>
391 <w:b-cs ></w:b-cs>
392 <w:sz w:val="26" ></w:sz>
393 <w:sz-cs w:val="26" ></w:sz-cs>
394 </w:rPr>
395 </w:style>
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>
399 </w:style>
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>
404 <w:rPr >
405 <wx:font wx:val="Times New Roman" ></wx:font>
406 </w:rPr>
407 <w:tblPr >
408 <w:tblInd w:w="0" w:type="dxa" ></w:tblInd>
409 <w:tblCellMar >
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>
414 </w:tblCellMar>
415 </w:tblPr>
416 </w:style>
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>
420 </w:style>
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>
424 <w:rPr >
425 <w:rFonts w:h-ansi="Courier New" w:ascii="Courier New" ></w:rFonts>
426 </w:rPr>
427 </w:style>
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>
433 <w:pPr >
434 <w:pStyle w:val="EndnoteText" ></w:pStyle>
435 </w:pPr>
436 <w:rPr >
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>
440 </w:rPr>
441 </w:style>
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>
447 <w:rPr >
448 <w:vertAlign w:val="superscript" ></w:vertAlign>
449 </w:rPr>
450 </w:style>
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>
455 <w:pPr >
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>
459 </w:pPr>
460 <w:rPr >
461 <w:b ></w:b>
462 </w:rPr>
463 </w:style>
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>
468 <w:pPr >
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>
472 </w:pPr>
473 <w:rPr >
474 <wx:font wx:val="Times New Roman" ></wx:font>
475 <w:b ></w:b>
476 </w:rPr>
477 </w:style>
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>
482 <w:pPr >
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>
486 </w:pPr>
487 <w:rPr >
488 <w:b ></w:b>
489 </w:rPr>
490 </w:style>
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>
495 <w:pPr >
496 <w:pStyle w:val="DefinitionTerm" ></w:pStyle>
497 </w:pPr>
498 <w:rPr >
499 <w:b ></w:b>
500 </w:rPr>
501 </w:style>
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>
506 <w:pPr >
507 <w:pStyle w:val="Definition" ></w:pStyle>
508 </w:pPr>
509 </w:style>
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>
513 </w:style>
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>
518 <w:pPr >
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>
522 </w:pPr>
523 </w:style>
524 </w:styles>
525 <w:docPr >
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>
539 <w:compat >
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>
545 </w:compat>
546 <w:footnotePr >
547 <w:footnote w:type="separator" >
548 <w:p >
549 <w:r >
550 <w:separator ></w:separator>
551 </w:r>
552 </w:p>
553 </w:footnote>
554 <w:footnote w:type="continuation-separator" >
555 <w:p >
556 <w:r >
557 <w:continuationSeparator ></w:continuationSeparator>
558 </w:r>
559 </w:p>
560 </w:footnote>
561 </w:footnotePr>
562 <w:endnotePr >
563 <w:numFmt w:val="decimal" ></w:numFmt>
564 <w:endnote w:type="separator" >
565 <w:p >
566 <w:r >
567 <w:separator ></w:separator>
568 </w:r>
569 </w:p>
570 </w:endnote>
571 <w:endnote w:type="continuation-separator" >
572 <w:p >
573 <w:r >
574 <w:continuationSeparator ></w:continuationSeparator>
575 </w:r>
576 </w:p>
577 </w:endnote>
578 </w:endnotePr>
579 </w:docPr>
580 <w:body >
581 <wx:sect >
582 <w:p>
583 <w:pPr>
584 <w:pStyle w:val="Heading1">
585 </w:pStyle>
586 </w:pPr>
587 <w:r>
588 <w:t>Just A Test</w:t>
589 </w:r>
590 </w:p>
591 <w:p>
592 <w:pPr>
593 <w:pStyle w:val="AuthorName">
594 </w:pStyle>
595 </w:pPr>
596 <w:r>
597 <w:t>Alan G. Isaac</w:t>
598 </w:r>
599 </w:p>
600 <w:p>
601 <w:pPr>
602 <w:pStyle w:val="AuthorContact">
603 </w:pStyle>
604 </w:pPr>
605 <w:hlink w:dest="mailto:aisaac@american.edu">
606 <w:r>
607 <w:rPr>
608 <w:rStyle w:val="Hyperlink">
609 </w:rStyle>
610 </w:rPr>
611 <w:t>aisaac@american.edu</w:t>
612 </w:r>
613 </w:hlink>
614 </w:p>
615 <w:p>
616 <w:pPr>
617 <w:pStyle w:val="BibliographMatter">
618 </w:pStyle>
619 </w:pPr>
620 <w:r>
621 <w:t>%date%</w:t>
622 </w:r>
623 </w:p>
624 <w:p>
625 <w:pPr>
626 <w:pStyle w:val="DefinitionTerm">
627 </w:pStyle>
628 </w:pPr>
629 <w:r>
630 <w:t>Term1</w:t>
631 </w:r>
632 </w:p>
633 <w:p>
634 <w:pPr>
635 <w:ind w:right="720" w:left="720">
636 </w:ind>
637 <w:pStyle w:val="Definition">
638 </w:pStyle>
639 </w:pPr>
640 <w:r>
641 <w:t>with a definition</w:t>
642 </w:r>
643 </w:p>
644 <w:p>
645 <w:pPr>
646 <w:ind w:right="720" w:left="720">
647 </w:ind>
648 <w:pStyle w:val="Definition">
649 </w:pStyle>
650 </w:pPr>
651 <w:r>
652 <w:t>with another definition</w:t>
653 </w:r>
654 </w:p>
655 <w:p>
656 <w:pPr>
657 <w:pStyle w:val="DefinitionTerm">
658 </w:pStyle>
659 </w:pPr>
660 <w:r>
661 <w:t>Term2</w:t>
662 </w:r>
663 </w:p>
664 <w:p>
665 <w:pPr>
666 <w:ind w:right="720" w:left="720">
667 </w:ind>
668 <w:pStyle w:val="Definition">
669 </w:pStyle>
670 </w:pPr>
671 <w:r>
672 <w:t>with a definition</w:t>
673 </w:r>
674 </w:p>
675 <w:p>
676 <w:r>
677 <w:t>Here is a citation reference: </w:t>
678 </w:r>
679 <w:r>
680 <w:rPr>
681 <w:rStyle w:val="CitationReference">
682 </w:rStyle>
683 </w:rPr>
684 <w:endnote w:suppressRef="on">
685 <w:p>
686 <w:pPr>
687 <w:pStyle w:val="EndnoteText">
688 </w:pStyle>
689 </w:pPr>
690 <w:r>
691 <w:rPr>
692 <w:rStyle w:val="CitationReference">
693 </w:rStyle>
694 </w:rPr>
695 <w:t>[mycite2007] </w:t>
696 </w:r>
697 <w:r>
698 <w:t>Citation text.</w:t>
699 </w:r>
700 </w:p>
701 </w:endnote>
702 <w:t>[mycite2007]</w:t>
703 </w:r>
704 <w:r>
705 <w:t>.</w:t>
706 </w:r>
707 </w:p>
708 <w:p>
709 <w:r>
710 <w:t>With a footnote. </w:t>
711 </w:r>
712 <w:r>
713 <w:rPr>
714 <w:rStyle w:val="EndnoteReference">
715 </w:rStyle>
716 </w:rPr>
717 <w:endnote>
718 <w:p>
719 <w:pPr>
720 <w:pStyle w:val="EndnoteText">
721 </w:pStyle>
722 </w:pPr>
723 <w:r>
724 <w:rPr>
725 <w:rStyle w:val="EndnoteReference">
726 </w:rStyle>
727 </w:rPr>
728 <w:endnoteRef>
729 </w:endnoteRef>
730 </w:r>
731 <w:r>
732 <w:t>The note.</w:t>
733 </w:r>
734 </w:p>
735 </w:endnote>
736 </w:r>
737 </w:p>
738 <w:p>
739 </w:p>
740 <w:p>
741 </w:p>
742 <BLANKLINE>
743 <w:sectPr >
744 <w:endnotePr >
745 <w:numFmt w:val="decimal" ></w:numFmt>
746 </w:endnotePr>
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>
751 </w:sectPr>
752 </wx:sect>
753 </w:body>
754 </w:wordDocument>
757 from docutils import core, io
758 import sys
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 )
763 print parts
765 def _test():
766 import doctest
767 import datetime
768 today = datetime.date.today().strftime("%Y-%m-%d")
769 m = sys.modules.get('__main__')
770 m.__doc__ = m.__doc__.replace( "%date%", today );
771 doctest.testmod()
773 if __name__ == "__main__":
774 _test()