Fix #338: re.sub() flag argument at wrong position.
[docutils.git] / sandbox / rst2wordml / tests / test3.py
blob58c962ca39c195741804101810fd36318fb5649c
1 #!C:/dev/python25/python.exe
2 # coding: utf-8
4 """
5 >>> test_wordml('''
6 ... *****
7 ... Title
8 ... *****
9 ...
10 ... --------
11 ... Subtitle
12 ... --------
13 ...
14 ... :Author: Alan G. Isaac
15 ... :Contact: aisaac@american.edu
16 ... :Organization: Department of Economics, American University
17 ...
18 ...
19 ... Introduction
20 ... ************
21 ...
22 ... Some text, up to a 'note'. [#note1]_
23 ... More text.
24 ...
25 ... Just unindent to see problem. Comment it out again by indenting.
26 ...
27 ... First Term
28 ... Some definitional text without a note.
29 ... No problem.
30 ...
31 ... Second Term
32 ... Some definitional text with a note.
33 ... This is a problem.
34 ... [#problem]_
35 ...
36 ... Another Section
37 ... ***************
38 ...
39 ... A paragraph with a note containing a reference.
40 ... No problem. [#notewithref]_
41 ...
42 ... .. figure :: test3.png
43 ...
44 ... Two waves doing *something*.
45 ...
46 ... Conclusion
47 ... **********
48 ...
49 ... That's all folks.
50 ...
51 ... . Links
52 ...
53 ... .. _Python: http://www.python.org
54 ...
55 ... .. [#notewithref]
56 ... Use Python_.
57 ...
58 ... .. [#note1]
59 ... A detailed discussion of the note.
60 ...
61 ... .. [#problem]
62 ... Details can be found in,
63 ... which contains a much cited algorithm for the Mersenne Twister.
64 ... ''')
65 <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" >
66 <w:ignoreElements w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2" ></w:ignoreElements>
67 <w:fonts >
68 <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>
69 <w:font w:name="Wingdings" >
70 <w:panose-1 w:val="05000000000000000000" ></w:panose-1>
71 <w:charset w:val="02" ></w:charset>
72 <w:family w:val="Auto" ></w:family>
73 <w:pitch w:val="variable" ></w:pitch>
74 <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>
75 </w:font>
76 </w:fonts>
77 <w:lists >
78 <w:listDef w:listDefId="0" >
79 <w:plt w:val="HybridMultilevel" ></w:plt>
80 <w:tmpl w:val="9C26005E" ></w:tmpl>
81 <w:lvl w:ilvl="0" w:tplc="0409000F" >
82 <w:start w:val="1" ></w:start>
83 <w:lvlText w:val="%1." ></w:lvlText>
84 <w:lvlJc w:val="left" ></w:lvlJc>
85 <w:pPr >
86 <w:tabs >
87 <w:tab w:val="list" w:pos="720" ></w:tab>
88 </w:tabs>
89 <w:ind w:hanging="360" w:left="720" ></w:ind>
90 </w:pPr>
91 </w:lvl>
92 <w:lvl w:ilvl="1" w:tplc="04090019" >
93 <w:start w:val="1" ></w:start>
94 <w:nfc w:val="4" ></w:nfc>
95 <w:lvlText w:val="%2." ></w:lvlText>
96 <w:lvlJc w:val="left" ></w:lvlJc>
97 <w:pPr >
98 <w:tabs >
99 <w:tab w:val="list" w:pos="1440" ></w:tab>
100 </w:tabs>
101 <w:ind w:hanging="360" w:left="1440" ></w:ind>
102 </w:pPr>
103 </w:lvl>
104 <w:lvl w:ilvl="2" w:tplc="0409001B" >
105 <w:start w:val="1" ></w:start>
106 <w:nfc w:val="2" ></w:nfc>
107 <w:lvlText w:val="%3." ></w:lvlText>
108 <w:lvlJc w:val="right" ></w:lvlJc>
109 <w:pPr >
110 <w:tabs >
111 <w:tab w:val="list" w:pos="2160" ></w:tab>
112 </w:tabs>
113 <w:ind w:hanging="180" w:left="2160" ></w:ind>
114 </w:pPr>
115 </w:lvl>
116 <w:lvl w:ilvl="3" w:tplc="0409000F" >
117 <w:start w:val="1" ></w:start>
118 <w:lvlText w:val="%4." ></w:lvlText>
119 <w:lvlJc w:val="left" ></w:lvlJc>
120 <w:pPr >
121 <w:tabs >
122 <w:tab w:val="list" w:pos="2880" ></w:tab>
123 </w:tabs>
124 <w:ind w:hanging="360" w:left="2880" ></w:ind>
125 </w:pPr>
126 </w:lvl>
127 <w:lvl w:ilvl="4" w:tplc="04090019" >
128 <w:start w:val="1" ></w:start>
129 <w:nfc w:val="4" ></w:nfc>
130 <w:lvlText w:val="%5." ></w:lvlText>
131 <w:lvlJc w:val="left" ></w:lvlJc>
132 <w:pPr >
133 <w:tabs >
134 <w:tab w:val="list" w:pos="3600" ></w:tab>
135 </w:tabs>
136 <w:ind w:hanging="360" w:left="3600" ></w:ind>
137 </w:pPr>
138 </w:lvl>
139 <w:lvl w:ilvl="5" w:tplc="0409001B" >
140 <w:start w:val="1" ></w:start>
141 <w:nfc w:val="2" ></w:nfc>
142 <w:lvlText w:val="%6." ></w:lvlText>
143 <w:lvlJc w:val="right" ></w:lvlJc>
144 <w:pPr >
145 <w:tabs >
146 <w:tab w:val="list" w:pos="4320" ></w:tab>
147 </w:tabs>
148 <w:ind w:hanging="180" w:left="4320" ></w:ind>
149 </w:pPr>
150 </w:lvl>
151 <w:lvl w:ilvl="6" w:tplc="0409000F" >
152 <w:start w:val="1" ></w:start>
153 <w:lvlText w:val="%7." ></w:lvlText>
154 <w:lvlJc w:val="left" ></w:lvlJc>
155 <w:pPr >
156 <w:tabs >
157 <w:tab w:val="list" w:pos="5040" ></w:tab>
158 </w:tabs>
159 <w:ind w:hanging="360" w:left="5040" ></w:ind>
160 </w:pPr>
161 </w:lvl>
162 <w:lvl w:ilvl="7" w:tplc="04090019" >
163 <w:start w:val="1" ></w:start>
164 <w:nfc w:val="4" ></w:nfc>
165 <w:lvlText w:val="%8." ></w:lvlText>
166 <w:lvlJc w:val="left" ></w:lvlJc>
167 <w:pPr >
168 <w:tabs >
169 <w:tab w:val="list" w:pos="5760" ></w:tab>
170 </w:tabs>
171 <w:ind w:hanging="360" w:left="5760" ></w:ind>
172 </w:pPr>
173 </w:lvl>
174 <w:lvl w:ilvl="8" w:tentative="on" w:tplc="0409001B" >
175 <w:start w:val="1" ></w:start>
176 <w:nfc w:val="2" ></w:nfc>
177 <w:lvlText w:val="%9." ></w:lvlText>
178 <w:lvlJc w:val="right" ></w:lvlJc>
179 <w:pPr >
180 <w:tabs >
181 <w:tab w:val="list" w:pos="6480" ></w:tab>
182 </w:tabs>
183 <w:ind w:hanging="180" w:left="6480" ></w:ind>
184 </w:pPr>
185 </w:lvl>
186 </w:listDef>
187 <w:listDef w:listDefId="1" >
188 <w:plt w:val="HybridMultilevel" ></w:plt>
189 <w:tmpl w:val="6DBC60EA" ></w:tmpl>
190 <w:lvl w:ilvl="0" w:tplc="04090001" >
191 <w:start w:val="1" ></w:start>
192 <w:nfc w:val="23" ></w:nfc>
193 <w:lvlText w:val="" ></w:lvlText>
194 <w:lvlJc w:val="left" ></w:lvlJc>
195 <w:pPr >
196 <w:tabs >
197 <w:tab w:val="list" w:pos="720" ></w:tab>
198 </w:tabs>
199 <w:ind w:hanging="360" w:left="720" ></w:ind>
200 </w:pPr>
201 <w:rPr >
202 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
203 </w:rPr>
204 </w:lvl>
205 <w:lvl w:ilvl="1" w:tplc="04090003" >
206 <w:start w:val="1" ></w:start>
207 <w:nfc w:val="23" ></w:nfc>
208 <w:lvlText w:val="o" ></w:lvlText>
209 <w:lvlJc w:val="left" ></w:lvlJc>
210 <w:pPr >
211 <w:tabs >
212 <w:tab w:val="list" w:pos="1440" ></w:tab>
213 </w:tabs>
214 <w:ind w:hanging="360" w:left="1440" ></w:ind>
215 </w:pPr>
216 <w:rPr >
217 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
218 </w:rPr>
219 </w:lvl>
220 <w:lvl w:ilvl="2" w:tplc="04090005" >
221 <w:start w:val="1" ></w:start>
222 <w:nfc w:val="23" ></w:nfc>
223 <w:lvlText w:val="" ></w:lvlText>
224 <w:lvlJc w:val="left" ></w:lvlJc>
225 <w:pPr >
226 <w:tabs >
227 <w:tab w:val="list" w:pos="2160" ></w:tab>
228 </w:tabs>
229 <w:ind w:hanging="360" w:left="2160" ></w:ind>
230 </w:pPr>
231 <w:rPr >
232 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
233 </w:rPr>
234 </w:lvl>
235 <w:lvl w:ilvl="3" w:tplc="04090001" >
236 <w:start w:val="1" ></w:start>
237 <w:nfc w:val="23" ></w:nfc>
238 <w:lvlText w:val="" ></w:lvlText>
239 <w:lvlJc w:val="left" ></w:lvlJc>
240 <w:pPr >
241 <w:tabs >
242 <w:tab w:val="list" w:pos="2880" ></w:tab>
243 </w:tabs>
244 <w:ind w:hanging="360" w:left="2880" ></w:ind>
245 </w:pPr>
246 <w:rPr >
247 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
248 </w:rPr>
249 </w:lvl>
250 <w:lvl w:ilvl="4" w:tplc="04090003" >
251 <w:start w:val="1" ></w:start>
252 <w:nfc w:val="23" ></w:nfc>
253 <w:lvlText w:val="o" ></w:lvlText>
254 <w:lvlJc w:val="left" ></w:lvlJc>
255 <w:pPr >
256 <w:tabs >
257 <w:tab w:val="list" w:pos="3600" ></w:tab>
258 </w:tabs>
259 <w:ind w:hanging="360" w:left="3600" ></w:ind>
260 </w:pPr>
261 <w:rPr >
262 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
263 </w:rPr>
264 </w:lvl>
265 <w:lvl w:ilvl="5" w:tplc="04090005" >
266 <w:start w:val="1" ></w:start>
267 <w:nfc w:val="23" ></w:nfc>
268 <w:lvlText w:val="" ></w:lvlText>
269 <w:lvlJc w:val="left" ></w:lvlJc>
270 <w:pPr >
271 <w:tabs >
272 <w:tab w:val="list" w:pos="4320" ></w:tab>
273 </w:tabs>
274 <w:ind w:hanging="360" w:left="4320" ></w:ind>
275 </w:pPr>
276 <w:rPr >
277 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
278 </w:rPr>
279 </w:lvl>
280 <w:lvl w:ilvl="6" w:tplc="04090001" >
281 <w:start w:val="1" ></w:start>
282 <w:nfc w:val="23" ></w:nfc>
283 <w:lvlText w:val="" ></w:lvlText>
284 <w:lvlJc w:val="left" ></w:lvlJc>
285 <w:pPr >
286 <w:tabs >
287 <w:tab w:val="list" w:pos="5040" ></w:tab>
288 </w:tabs>
289 <w:ind w:hanging="360" w:left="5040" ></w:ind>
290 </w:pPr>
291 <w:rPr >
292 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
293 </w:rPr>
294 </w:lvl>
295 <w:lvl w:ilvl="7" w:tplc="04090003" >
296 <w:start w:val="1" ></w:start>
297 <w:nfc w:val="23" ></w:nfc>
298 <w:lvlText w:val="o" ></w:lvlText>
299 <w:lvlJc w:val="left" ></w:lvlJc>
300 <w:pPr >
301 <w:tabs >
302 <w:tab w:val="list" w:pos="5760" ></w:tab>
303 </w:tabs>
304 <w:ind w:hanging="360" w:left="5760" ></w:ind>
305 </w:pPr>
306 <w:rPr >
307 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
308 </w:rPr>
309 </w:lvl>
310 <w:lvl w:ilvl="8" w:tplc="04090005" >
311 <w:start w:val="1" ></w:start>
312 <w:nfc w:val="23" ></w:nfc>
313 <w:lvlText w:val="" ></w:lvlText>
314 <w:lvlJc w:val="left" ></w:lvlJc>
315 <w:pPr >
316 <w:tabs >
317 <w:tab w:val="list" w:pos="6480" ></w:tab>
318 </w:tabs>
319 <w:ind w:hanging="360" w:left="6480" ></w:ind>
320 </w:pPr>
321 <w:rPr >
322 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
323 </w:rPr>
324 </w:lvl>
325 </w:listDef>
326 <BLANKLINE>
327 <BLANKLINE>
328 </w:lists>
329 <w:styles >
330 <w:versionOfBuiltInStylenames w:val="4" ></w:versionOfBuiltInStylenames>
331 <w:latentStyles w:latentStyleCount="156" w:defLockedState="off" ></w:latentStyles>
332 <w:style w:styleId="Normal" w:type="paragraph" w:default="on" >
333 <w:name w:val="Normal" ></w:name>
334 <w:pPr >
335 <w:spacing w:after="120" ></w:spacing>
336 </w:pPr>
337 <w:rPr >
338 <wx:font wx:val="Times New Roman" ></wx:font>
339 <w:sz-cs w:val="24" ></w:sz-cs>
340 <w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA" ></w:lang>
341 </w:rPr>
342 </w:style>
343 <w:style w:styleId="Hyperlink" w:type="character" >
344 <w:name w:val="Hyperlink" ></w:name>
345 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
346 <w:rPr >
347 <w:color w:val="0000FF" ></w:color>
348 <w:u w:val="single" ></w:u>
349 </w:rPr>
350 </w:style>
351 <w:style w:styleId="LiteralBlock" w:type="paragraph" >
352 <w:name w:val="LiteralBlock" ></w:name>
353 <w:basedOn w:val="Normal" ></w:basedOn>
354 <w:next w:val="Normal" ></w:next>
355 <w:pPr >
356 <w:pStyle w:val="LiteralBlock" ></w:pStyle>
357 <w:ind w:right="720" w:left="720" ></w:ind>
358 </w:pPr>
359 <w:rPr >
360 <w:rFonts w:h-ansi="Courier New" w:ascii="Courier New" ></w:rFonts>
361 <wx:font wx:val="Courier New" ></wx:font><w:sz w:val="20" ></w:sz>
362 </w:rPr>
363 </w:style>
364 <w:style w:styleId="Heading1" w:type="paragraph" >
365 <w:name w:val="heading 1" ></w:name>
366 <wx:uiName wx:val="Heading 1" ></wx:uiName>
367 <w:basedOn w:val="Normal" ></w:basedOn>
368 <w:next w:val="Normal" ></w:next>
369 <w:pPr >
370 <w:pStyle w:val="Heading1" ></w:pStyle>
371 <w:keepNext ></w:keepNext>
372 <w:spacing w:before="240" w:after="60" ></w:spacing>
373 <w:outlineLvl w:val="0" ></w:outlineLvl>
374 </w:pPr>
375 <w:rPr >
376 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
377 <wx:font wx:val="Arial" ></wx:font>
378 <w:b ></w:b>
379 <w:b-cs ></w:b-cs>
380 <w:kern w:val="32" ></w:kern>
381 <w:sz w:val="32" ></w:sz>
382 <w:sz-cs w:val="32" ></w:sz-cs>
383 </w:rPr>
384 </w:style>
385 <w:style w:styleId="Heading2" w:type="paragraph" >
386 <w:name w:val="heading 2" ></w:name>
387 <wx:uiName wx:val="Heading 2" ></wx:uiName>
388 <w:basedOn w:val="Normal" ></w:basedOn>
389 <w:next w:val="Normal" ></w:next>
390 <w:pPr >
391 <w:pStyle w:val="Heading2" ></w:pStyle>
392 <w:keepNext ></w:keepNext>
393 <w:spacing w:before="240" w:after="60" ></w:spacing>
394 <w:outlineLvl w:val="1" ></w:outlineLvl>
395 </w:pPr>
396 <w:rPr >
397 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
398 <wx:font wx:val="Arial" ></wx:font>
399 <w:b ></w:b>
400 <w:b-cs ></w:b-cs>
401 <w:i ></w:i>
402 <w:i-cs ></w:i-cs>
403 <w:sz w:val="28" ></w:sz>
404 <w:sz-cs w:val="28" ></w:sz-cs>
405 </w:rPr>
406 </w:style>
407 <w:style w:styleId="Heading3" w:type="paragraph" >
408 <w:name w:val="heading 3" ></w:name>
409 <wx:uiName wx:val="Heading 3" ></wx:uiName>
410 <w:basedOn w:val="Normal" ></w:basedOn>
411 <w:next w:val="Normal" ></w:next>
412 <w:pPr >
413 <w:pStyle w:val="Heading3" ></w:pStyle>
414 <w:keepNext ></w:keepNext>
415 <w:spacing w:before="240" w:after="60" ></w:spacing>
416 <w:outlineLvl w:val="2" ></w:outlineLvl>
417 </w:pPr>
418 <w:rPr >
419 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
420 <wx:font wx:val="Arial" ></wx:font>
421 <w:b ></w:b>
422 <w:b-cs ></w:b-cs>
423 <w:sz w:val="26" ></w:sz>
424 <w:sz-cs w:val="26" ></w:sz-cs>
425 </w:rPr>
426 </w:style>
427 <w:style w:styleId="DefaultParagraphFont" w:type="character" w:default="on" >
428 <w:name w:val="Default Paragraph Font" ></w:name>
429 <w:semiHidden ></w:semiHidden>
430 </w:style>
431 <w:style w:styleId="TableNormal" w:type="table" w:default="on" >
432 <w:name w:val="Normal Table" ></w:name>
433 <wx:uiName wx:val="Table Normal" ></wx:uiName>
434 <w:semiHidden ></w:semiHidden>
435 <w:rPr >
436 <wx:font wx:val="Times New Roman" ></wx:font>
437 </w:rPr>
438 <w:tblPr >
439 <w:tblInd w:w="0" w:type="dxa" ></w:tblInd>
440 <w:tblCellMar >
441 <w:top w:w="0" w:type="dxa" ></w:top>
442 <w:left w:w="108" w:type="dxa" ></w:left>
443 <w:bottom w:w="0" w:type="dxa" ></w:bottom>
444 <w:right w:w="108" w:type="dxa" ></w:right>
445 </w:tblCellMar>
446 </w:tblPr>
447 </w:style>
448 <w:style w:styleId="NoList" w:type="list" w:default="on" >
449 <w:name w:val="No List" ></w:name>
450 <w:semiHidden ></w:semiHidden>
451 </w:style>
452 <w:style w:styleId="Literal" w:type="character" >
453 <w:name w:val="Literal" ></w:name>
454 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
455 <w:rPr >
456 <w:rFonts w:h-ansi="Courier New" w:ascii="Courier New" ></w:rFonts>
457 </w:rPr>
458 </w:style>
459 <w:style w:styleId="EndnoteText" w:type="paragraph" >
460 <w:name w:val="endnote text" ></w:name>
461 <wx:uiName wx:val="Endnote Text" ></wx:uiName>
462 <w:basedOn w:val="Normal" ></w:basedOn>
463 <w:semiHidden ></w:semiHidden>
464 <w:pPr >
465 <w:pStyle w:val="EndnoteText" ></w:pStyle>
466 </w:pPr>
467 <w:rPr >
468 <wx:font wx:val="Times New Roman" ></wx:font>
469 <w:sz w:val="20" ></w:sz>
470 <w:sz-cs w:val="20" ></w:sz-cs>
471 </w:rPr>
472 </w:style>
473 <w:style w:styleId="EndnoteReference" w:type="character" >
474 <w:name w:val="endnote reference" ></w:name>
475 <wx:uiName wx:val="Endnote Reference" ></wx:uiName>
476 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
477 <w:semiHidden ></w:semiHidden>
478 <w:rPr >
479 <w:vertAlign w:val="superscript" ></w:vertAlign>
480 </w:rPr>
481 </w:style>
482 <w:style w:styleId="AuthorName" w:type="paragraph" >
483 <w:name w:val="AuthorName" ></w:name>
484 <w:basedOn w:val="Normal" ></w:basedOn>
485 <w:next w:val="Normal" ></w:next>
486 <w:pPr >
487 <w:pStyle w:val="AuthorName" ></w:pStyle>
488 <w:spacing w:before="240" w:after="240" ></w:spacing>
489 <w:jc w:val="center" ></w:jc>
490 </w:pPr>
491 <w:rPr >
492 <w:b ></w:b>
493 </w:rPr>
494 </w:style>
495 <w:style w:styleId="AuthorContact" w:type="paragraph" >
496 <w:name w:val="AuthorContact" ></w:name>
497 <w:basedOn w:val="Normal" ></w:basedOn>
498 <w:next w:val="Normal" ></w:next>
499 <w:pPr >
500 <w:pStyle w:val="AuthorContact" ></w:pStyle>
501 <w:spacing w:before="240" w:after="240" ></w:spacing>
502 <w:jc w:val="center" ></w:jc>
503 </w:pPr>
504 <w:rPr >
505 <wx:font wx:val="Times New Roman" ></wx:font>
506 <w:b ></w:b>
507 </w:rPr>
508 </w:style>
509 <w:style w:styleId="BibliographMatter" w:type="paragraph" >
510 <w:name w:val="BibliographMatter" ></w:name>
511 <w:basedOn w:val="Normal" ></w:basedOn>
512 <w:next w:val="Normal" ></w:next>
513 <w:pPr >
514 <w:pStyle w:val="BibliographMatter" ></w:pStyle>
515 <w:spacing w:before="240" w:after="240" ></w:spacing>
516 <w:jc w:val="center" ></w:jc>
517 </w:pPr>
518 <w:rPr >
519 <w:b ></w:b>
520 </w:rPr>
521 </w:style>
522 <w:style w:styleId="DefinitionTerm" w:type="paragraph" >
523 <w:name w:val="DefinitionTerm" ></w:name>
524 <w:basedOn w:val="Normal" ></w:basedOn>
525 <w:next w:val="Normal" ></w:next>
526 <w:pPr >
527 <w:pStyle w:val="DefinitionTerm" ></w:pStyle>
528 </w:pPr>
529 <w:rPr >
530 <w:b ></w:b>
531 </w:rPr>
532 </w:style>
533 <w:style w:styleId="Definition" w:type="paragraph" >
534 <w:name w:val="Definition" ></w:name>
535 <w:basedOn w:val="Normal" ></w:basedOn>
536 <w:next w:val="Normal" ></w:next>
537 <w:pPr >
538 <w:pStyle w:val="Definition" ></w:pStyle>
539 </w:pPr>
540 </w:style>
541 <w:style w:styleId="CitationReference" w:type="character" >
542 <w:name w:val="CitationReference" ></w:name>
543 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
544 </w:style>
545 <w:style w:styleId="Topic" w:type="paragraph" >
546 <w:name w:val="Topic" ></w:name>
547 <w:basedOn w:val="Normal" ></w:basedOn>
548 <w:next w:val="Normal" ></w:next>
549 <w:pPr >
550 <w:pStyle w:val="Topic" ></w:pStyle>
551 <w:ind w:right="1440" w:left="1440" ></w:ind>
552 <w:jc w:val="both" ></w:jc>
553 </w:pPr>
554 </w:style>
555 </w:styles>
556 <w:docPr >
557 <w:view w:val="print" ></w:view>
558 <w:zoom w:percent="100" ></w:zoom>
559 <w:doNotEmbedSystemFonts ></w:doNotEmbedSystemFonts>
560 <w:proofState w:grammar="clean" w:spelling="clean" ></w:proofState>
561 <w:attachedTemplate w:val="" ></w:attachedTemplate>
562 <w:defaultTabStop w:val="720" ></w:defaultTabStop>
563 <w:punctuationKerning ></w:punctuationKerning>
564 <w:characterSpacingControl w:val="DontCompress" ></w:characterSpacingControl>
565 <w:optimizeForBrowser ></w:optimizeForBrowser>
566 <w:validateAgainstSchema ></w:validateAgainstSchema>
567 <w:saveInvalidXML w:val="off" ></w:saveInvalidXML>
568 <w:ignoreMixedContent w:val="off" ></w:ignoreMixedContent>
569 <w:alwaysShowPlaceholderText w:val="off" ></w:alwaysShowPlaceholderText>
570 <w:compat >
571 <w:breakWrappedTables ></w:breakWrappedTables>
572 <w:snapToGridInCell ></w:snapToGridInCell>
573 <w:wrapTextWithPunct ></w:wrapTextWithPunct>
574 <w:useAsianBreakRules ></w:useAsianBreakRules>
575 <w:useWord2002TableStyleRules ></w:useWord2002TableStyleRules>
576 </w:compat>
577 <w:footnotePr >
578 <w:footnote w:type="separator" >
579 <w:p >
580 <w:r >
581 <w:separator ></w:separator>
582 </w:r>
583 </w:p>
584 </w:footnote>
585 <w:footnote w:type="continuation-separator" >
586 <w:p >
587 <w:r >
588 <w:continuationSeparator ></w:continuationSeparator>
589 </w:r>
590 </w:p>
591 </w:footnote>
592 </w:footnotePr>
593 <w:endnotePr >
594 <w:numFmt w:val="decimal" ></w:numFmt>
595 <w:endnote w:type="separator" >
596 <w:p >
597 <w:r >
598 <w:separator ></w:separator>
599 </w:r>
600 </w:p>
601 </w:endnote>
602 <w:endnote w:type="continuation-separator" >
603 <w:p >
604 <w:r >
605 <w:continuationSeparator ></w:continuationSeparator>
606 </w:r>
607 </w:p>
608 </w:endnote>
609 </w:endnotePr>
610 </w:docPr>
611 <w:body >
612 <wx:sect >
613 <w:p>
614 <w:pPr>
615 <w:pStyle w:val="Heading1">
616 </w:pStyle>
617 </w:pPr>
618 <w:r>
619 <w:t>Title</w:t>
620 </w:r>
621 </w:p>
622 <w:p>
623 <w:pPr>
624 <w:pStyle w:val="Heading2">
625 </w:pStyle>
626 </w:pPr>
627 <w:r>
628 <w:t>Subtitle</w:t>
629 </w:r>
630 </w:p>
631 <w:p>
632 <w:pPr>
633 <w:pStyle w:val="AuthorName">
634 </w:pStyle>
635 </w:pPr>
636 <w:r>
637 <w:t>Alan G. Isaac</w:t>
638 </w:r>
639 </w:p>
640 <w:p>
641 <w:pPr>
642 <w:pStyle w:val="AuthorContact">
643 </w:pStyle>
644 </w:pPr>
645 <w:hlink w:dest="mailto:aisaac@american.edu">
646 <w:r>
647 <w:rPr>
648 <w:rStyle w:val="Hyperlink">
649 </w:rStyle>
650 </w:rPr>
651 <w:t>aisaac@american.edu</w:t>
652 </w:r>
653 </w:hlink>
654 </w:p>
655 <w:p>
656 <w:pPr>
657 <w:pStyle w:val="BibliographMatter">
658 </w:pStyle>
659 </w:pPr>
660 <w:r>
661 <w:t>Department of Economics, American University</w:t>
662 </w:r>
663 </w:p>
664 <aml:annotation aml:id="1001" w:name="introduction" w:type="Word.Bookmark.Start">
665 </aml:annotation>
666 <aml:annotation aml:id="1001" w:name="introduction" w:type="Word.Bookmark.End">
667 </aml:annotation>
668 <w:p>
669 <w:pPr>
670 <w:pStyle w:val="Heading2">
671 </w:pStyle>
672 </w:pPr>
673 <w:r>
674 <w:t>Introduction</w:t>
675 </w:r>
676 </w:p>
677 <w:p>
678 <w:r>
679 <w:t>Some text, up to a 'note'. </w:t>
680 </w:r>
681 <w:r>
682 <w:rPr>
683 <w:rStyle w:val="EndnoteReference">
684 </w:rStyle>
685 </w:rPr>
686 <w:endnote>
687 <w:p>
688 <w:pPr>
689 <w:pStyle w:val="EndnoteText">
690 </w:pStyle>
691 </w:pPr>
692 <w:r>
693 <w:rPr>
694 <w:rStyle w:val="EndnoteReference">
695 </w:rStyle>
696 </w:rPr>
697 <w:endnoteRef>
698 </w:endnoteRef>
699 </w:r>
700 <w:r>
701 <w:t>A detailed discussion of the note.</w:t>
702 </w:r>
703 </w:p>
704 </w:endnote>
705 </w:r>
706 <w:r>
707 <w:t> More text.</w:t>
708 </w:r>
709 </w:p>
710 <w:p>
711 <w:r>
712 <w:t>Just unindent to see problem. Comment it out again by indenting.</w:t>
713 </w:r>
714 </w:p>
715 <w:p>
716 <w:pPr>
717 <w:pStyle w:val="DefinitionTerm">
718 </w:pStyle>
719 </w:pPr>
720 <w:r>
721 <w:t>First Term</w:t>
722 </w:r>
723 </w:p>
724 <w:p>
725 <w:pPr>
726 <w:ind w:right="720" w:left="720">
727 </w:ind>
728 <w:pStyle w:val="Definition">
729 </w:pStyle>
730 </w:pPr>
731 <w:r>
732 <w:t>Some definitional text without a note. No problem.</w:t>
733 </w:r>
734 </w:p>
735 <w:p>
736 <w:pPr>
737 <w:pStyle w:val="DefinitionTerm">
738 </w:pStyle>
739 </w:pPr>
740 <w:r>
741 <w:t>Second Term</w:t>
742 </w:r>
743 </w:p>
744 <w:p>
745 <w:pPr>
746 <w:ind w:right="720" w:left="720">
747 </w:ind>
748 <w:pStyle w:val="Definition">
749 </w:pStyle>
750 </w:pPr>
751 <w:r>
752 <w:t>Some definitional text with a note. This is a problem. </w:t>
753 </w:r>
754 <w:r>
755 <w:rPr>
756 <w:rStyle w:val="EndnoteReference">
757 </w:rStyle>
758 </w:rPr>
759 <w:endnote>
760 <w:p>
761 <w:pPr>
762 <w:pStyle w:val="EndnoteText">
763 </w:pStyle>
764 </w:pPr>
765 <w:r>
766 <w:rPr>
767 <w:rStyle w:val="EndnoteReference">
768 </w:rStyle>
769 </w:rPr>
770 <w:endnoteRef>
771 </w:endnoteRef>
772 </w:r>
773 <w:r>
774 <w:t>Details can be found in, which contains a much cited algorithm for the Mersenne Twister.</w:t>
775 </w:r>
776 </w:p>
777 </w:endnote>
778 </w:r>
779 </w:p>
780 <aml:annotation aml:id="1002" w:name="another-section" w:type="Word.Bookmark.Start">
781 </aml:annotation>
782 <aml:annotation aml:id="1002" w:name="another-section" w:type="Word.Bookmark.End">
783 </aml:annotation>
784 <w:p>
785 <w:pPr>
786 <w:pStyle w:val="Heading2">
787 </w:pStyle>
788 </w:pPr>
789 <w:r>
790 <w:t>Another Section</w:t>
791 </w:r>
792 </w:p>
793 <w:p>
794 <w:r>
795 <w:t>A paragraph with a note containing a reference. No problem. </w:t>
796 </w:r>
797 <w:r>
798 <w:rPr>
799 <w:rStyle w:val="EndnoteReference">
800 </w:rStyle>
801 </w:rPr>
802 <w:endnote>
803 <w:p>
804 <w:pPr>
805 <w:pStyle w:val="EndnoteText">
806 </w:pStyle>
807 </w:pPr>
808 <w:r>
809 <w:rPr>
810 <w:rStyle w:val="EndnoteReference">
811 </w:rStyle>
812 </w:rPr>
813 <w:endnoteRef>
814 </w:endnoteRef>
815 </w:r>
816 <w:r>
817 <w:t>Use </w:t>
818 </w:r>
819 <w:hlink w:dest="http://www.python.org">
820 <w:r>
821 <w:rPr>
822 <w:rStyle w:val="Hyperlink">
823 </w:rStyle>
824 </w:rPr>
825 <w:t>Python</w:t>
826 </w:r>
827 </w:hlink>
828 <w:r>
829 <w:t>.</w:t>
830 </w:r>
831 </w:p>
832 </w:endnote>
833 </w:r>
834 </w:p>
835 <w:p>
836 <w:pPr>
837 <w:jc w:val="center">
838 </w:jc>
839 </w:pPr>
840 <w:pict>
841 <v:shape style="position:absolute;left:0;text-align:left;margin-left:0;margin-top:0;width:800px;height:600px;z-index:1;mso-position-horizontal:center" o:spt="100" path="" coordsize="" adj="0,,0" id="1003" stroked="f">
842 <v:imagedata src="test3.png">
843 </v:imagedata>
844 <w10:wrap type="square">
845 </w10:wrap>
846 </v:shape>
847 </w:pict>
848 <w:r>
849 <w:rPr>
850 <w:rStyle w:val="Caption">
851 </w:rStyle>
852 </w:rPr>
853 <w:t>Figure 1 </w:t>
854 </w:r>
855 <w:r>
856 <w:rPr>
857 <w:rStyle w:val="Caption">
858 </w:rStyle>
859 </w:rPr>
860 <w:t>Two waves doing </w:t>
861 </w:r>
862 <w:r>
863 <w:rPr>
864 <w:rStyle w:val="Caption">
865 </w:rStyle>
866 <w:i>
867 </w:i>
868 </w:rPr>
869 <w:t>something</w:t>
870 </w:r>
871 <w:r>
872 <w:rPr>
873 <w:rStyle w:val="Caption">
874 </w:rStyle>
875 </w:rPr>
876 <w:t>.</w:t>
877 </w:r>
878 </w:p>
879 <aml:annotation aml:id="1005" w:name="conclusion" w:type="Word.Bookmark.Start">
880 </aml:annotation>
881 <aml:annotation aml:id="1005" w:name="conclusion" w:type="Word.Bookmark.End">
882 </aml:annotation>
883 <w:p>
884 <w:pPr>
885 <w:pStyle w:val="Heading2">
886 </w:pStyle>
887 </w:pPr>
888 <w:r>
889 <w:t>Conclusion</w:t>
890 </w:r>
891 </w:p>
892 <w:p>
893 <w:r>
894 <w:t>That's all folks.</w:t>
895 </w:r>
896 </w:p>
897 <w:p>
898 <w:r>
899 <w:t>. Links</w:t>
900 </w:r>
901 </w:p>
902 <w:p>
903 <w:hlink w:dest="http://www.python.org">
904 </w:hlink>
905 </w:p>
906 <w:p>
907 </w:p>
908 <w:p>
909 </w:p>
910 <BLANKLINE>
911 <w:sectPr >
912 <w:endnotePr >
913 <w:numFmt w:val="decimal" ></w:numFmt>
914 </w:endnotePr>
915 <w:pgSz w:w="12240" w:h="15840" ></w:pgSz>
916 <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>
917 <w:cols w:space="720" ></w:cols>
918 <w:docGrid w:line-pitch="360" ></w:docGrid>
919 </w:sectPr>
920 </wx:sect>
921 </w:body>
922 </w:wordDocument>
925 from docutils import core, io
927 def test_wordml( input_string ):
928 overrides = { 'template' : '../template.xml' }
929 parts = core.publish_string( input_string, writer_name='docutils_wordml', settings_overrides=overrides )
930 print parts
932 def _test():
933 import doctest
934 doctest.testmod()
936 if __name__ == "__main__":
937 _test()