summaryrefslogtreecommitdiff
path: root/test/functional/expected/standalone_rst_latex.tex
blob: 6e652c0c66aaeb40d255effa89c99a4869796f8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
\documentclass[a4paper]{article}
% generated by Docutils <http://docutils.sourceforge.net/>
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
\usepackage{cmap} % fix search and cut-and-paste in Acrobat
\usepackage{ifthen}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[british,french,ngerman,english]{babel}
% Prevent side-effects if French hyphenation patterns are not loaded:
\frenchbsetup{StandardLayout}
\AtBeginDocument{\selectlanguage{english}\noextrasfrench}
\usepackage{color}
\usepackage{float} % float configuration
\floatplacement{figure}{H} % place figures here definitely
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{pifont}
\setcounter{secnumdepth}{0}
\usepackage{longtable,ltcaption,array}
\setlength{\extrarowheight}{2pt}
\newlength{\DUtablewidth} % internal use in tables
\usepackage{tabularx}
\usepackage{textcomp} % text symbol macros

%%% Custom LaTeX preamble
% PDF Standard Fonts
\usepackage{mathptmx} % Times
\usepackage[scaled=.90]{helvet}
\usepackage{courier}

%%% User specified packages and stylesheets

%%% Fallback definitions for Docutils-specific commands

% providelength (provide a length variable and set default, if it is new)
\providecommand*{\DUprovidelength}[2]{
  \ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{}
}

% abstract title
\providecommand*{\DUtitleabstract}[1]{\centering\textbf{#1}}

% admonition (specially marked topic)
\providecommand{\DUadmonition}[2][class-arg]{%
  % try \DUadmonition#1{#2}:
  \ifcsname DUadmonition#1\endcsname%
    \csname DUadmonition#1\endcsname{#2}%
  \else
    \begin{center}
      \fbox{\parbox{0.9\textwidth}{#2}}
    \end{center}
  \fi
}

\makeatletter
\@namedef{DUrolealign-center}{\centering}
\makeatother


% dedication topic
\providecommand{\DUtopicdedication}[1]{\begin{center}#1\end{center}}

% docinfo (width of docinfo table)
\DUprovidelength{\DUdocinfowidth}{0.9\textwidth}

% error admonition title
\providecommand*{\DUtitleerror}[1]{\DUtitle{\color{red}#1}}

% fieldlist environment
\ifthenelse{\isundefined{\DUfieldlist}}{
  \newenvironment{DUfieldlist}%
    {\quote\description}
    {\enddescription\endquote}
}{}
% numeric or symbol footnotes with hyperlinks
\providecommand*{\DUfootnotemark}[3]{%
  \raisebox{1em}{\hypertarget{#1}{}}%
  \hyperlink{#2}{\textsuperscript{#3}}%
}
\providecommand{\DUfootnotetext}[4]{%
  \begingroup%
  \renewcommand{\thefootnote}{%
    \protect\raisebox{1em}{\protect\hypertarget{#1}{}}%
    \protect\hyperlink{#2}{#3}}%
  \footnotetext{#4}%
  \endgroup%
}

% inline markup (custom roles)
% \DUrole{#1}{#2} tries \DUrole#1{#2}
\providecommand*{\DUrole}[2]{%
  \ifcsname DUrole#1\endcsname%
    \csname DUrole#1\endcsname{#2}%
  \else% backwards compatibility: try \docutilsrole#1{#2}
    \ifcsname docutilsrole#1\endcsname%
      \csname docutilsrole#1\endcsname{#2}%
    \else%
      #2%
    \fi%
  \fi%
}

% legend environment
\ifthenelse{\isundefined{\DUlegend}}{
  \newenvironment{DUlegend}{\small}{}
}{}

% lineblock environment
\DUprovidelength{\DUlineblockindent}{2.5em}
\ifthenelse{\isundefined{\DUlineblock}}{
  \newenvironment{DUlineblock}[1]{%
    \list{}{\setlength{\partopsep}{\parskip}
            \addtolength{\partopsep}{\baselineskip}
            \setlength{\topsep}{0pt}
            \setlength{\itemsep}{0.15\baselineskip}
            \setlength{\parsep}{0pt}
            \setlength{\leftmargin}{#1}}
    \raggedright
  }
  {\endlist}
}{}

% optionlist environment
\providecommand*{\DUoptionlistlabel}[1]{\bf #1 \hfill}
\DUprovidelength{\DUoptionlistindent}{3cm}
\ifthenelse{\isundefined{\DUoptionlist}}{
  \newenvironment{DUoptionlist}{%
    \list{}{\setlength{\labelwidth}{\DUoptionlistindent}
            \setlength{\rightmargin}{1cm}
            \setlength{\leftmargin}{\rightmargin}
            \addtolength{\leftmargin}{\labelwidth}
            \addtolength{\leftmargin}{\labelsep}
            \renewcommand{\makelabel}{\DUoptionlistlabel}}
  }
  {\endlist}
}{}

% rubric (informal heading)
\providecommand*{\DUrubric}[2][class-arg]{%
  \subsubsection*{\centering\textit{\textmd{#2}}}}

% sidebar (text outside the main text flow)
\providecommand{\DUsidebar}[2][class-arg]{%
  \begin{center}
    \colorbox[gray]{0.80}{\parbox{0.9\textwidth}{#2}}
  \end{center}
}

% subtitle (for topic/sidebar)
\providecommand*{\DUsubtitle}[2][class-arg]{\par\emph{#2}\smallskip}

% title for topics, admonitions, unsupported section levels, and sidebar
\providecommand*{\DUtitle}[2][class-arg]{%
  % call \DUtitle#1{#2} if it exists:
  \ifcsname DUtitle#1\endcsname%
    \csname DUtitle#1\endcsname{#2}%
  \else
    \smallskip\noindent\textbf{#2}\smallskip%
  \fi
}

% titlereference role
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}

% topic (quote with heading)
\providecommand{\DUtopic}[2][class-arg]{%
  \ifcsname DUtopic#1\endcsname%
    \csname DUtopic#1\endcsname{#2}%
  \else
    \begin{quote}#2\end{quote}
  \fi
}

% transition (break, fancybreak, anonymous section)
\providecommand*{\DUtransition}[1][class-arg]{%
  \hspace*{\fill}\hrulefill\hspace*{\fill}
  \vskip 0.5\baselineskip
}

% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
  \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
  \urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
\hypersetup{
  pdftitle={reStructuredText Test Document},
  pdfauthor={David Goodger;Me;Myself;I}
}

%%% Title Data
\title{\phantomsection%
  reStructuredText Test Document%
  \label{restructuredtext-test-document}%
  \label{doctitle}%
  \\ % subtitle%
  \large{Examples of Syntax Constructs}%
  \label{examples-of-syntax-constructs}%
  \label{subtitle}}
\author{}
\date{}

%%% Body
\begin{document}
\maketitle

% Docinfo
\begin{center}
\begin{tabularx}{\DUdocinfowidth}{lX}
\textbf{Author}: &
	David Goodger \\
\textbf{Address}: &
	{\raggedright
123 Example Street\\
Example, EX  Canada\\
A1B 2C3 } \\
\textbf{Contact}: &
	\href{mailto:goodger@python.org}{goodger@python.org} \\
\textbf{Author}: &
	Me \\
\textbf{Author}: &
	Myself \\
\textbf{Author}: &
	I \\
\textbf{Organization}: &
	humankind \\
\textbf{Date}: &
	Now, or yesterday.  Or maybe even \emph{before} yesterday. \\
\textbf{Status}: &
	This is a “work in progress” \\
\textbf{Revision}: &
	is managed by a version control system. \\
\textbf{Version}: &
	1 \\
\textbf{Copyright}: &
	This document has been placed in the public domain. You
may do with it as you wish. You may copy, modify,
redistribute, reattribute, sell, buy, rent, lease,
destroy, or improve it, quote it at length, excerpt,
incorporate, collate, fold, staple, or mutilate it, or do
anything else to it that your or anyone else’s heart
desires. \\
\textbf{field name}: &
This is a “generic bibliographic field”.
\\
\textbf{field name “2”}: &
Generic bibliographic fields may contain multiple body elements.

Like this.
\\
\end{tabularx}
\end{center}

\DUtopic[dedication]{
\DUtitle[dedication]{Dedication}

For Docutils users \& co-developers.
}

\DUtopic[abstract]{
\DUtitle[abstract]{Abstract}

This is a test document, containing at least one example of each
reStructuredText construct.
}

% This is a comment. Note how any initial comments are moved by
% transforms to after the document title, subtitle, and docinfo.

% Above is the document title, and below is the subtitle.
% They are transformed from section titles after parsing.

% bibliographic fields (which also require a transform):

\pagebreak[4] % start ToC on new page

\phantomsection\label{table-of-contents}
\pdfbookmark[1]{Table of Contents}{table-of-contents}
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents



\section{1~~~Structural Elements%
  \label{structural-elements}%
}


\subsection{1.1~~~Section Title%
  \label{section-title}%
}
\subsubsection*{Section Subtitle}

Lone subsections are converted to a section subtitle by a transform
activated with the \texttt{-{}-section-subtitles} command line option or the
\texttt{sectsubtitle-xform} configuration value.


\subsection{1.2~~~Empty Section%
  \label{empty-section}%
}


\subsection{1.3~~~Transitions%
  \label{transitions}%
}

Here’s a transition:


%___________________________________________________________________________
\DUtransition


It divides the section.  Transitions may also occur between sections:


%___________________________________________________________________________
\DUtransition



\section{2~~~Body Elements%
  \label{body-elements}%
}


\subsection{2.1~~~Paragraphs%
  \label{paragraphs}%
}

A paragraph.


\subsubsection{2.1.1~~~Inline Markup%
  \label{inline-markup}%
}

Paragraphs contain text and may contain inline markup: \emph{emphasis},
\textbf{strong emphasis}, \texttt{inline literals}, standalone hyperlinks
(\url{http://www.python.org}), external hyperlinks (\href{http://www.python.org/}{Python}\DUfootnotemark{id30}{id29}{5}), internal
cross-references (\hyperref[example]{example}), external hyperlinks with embedded URIs
(\href{http://www.python.org}{Python web site}), \href{http://www.python.org/}{anonymous hyperlink
references}\DUfootnotemark{id38}{id29}{5} (\href{http://docutils.sourceforge.net/}{a second reference}\DUfootnotemark{id40}{id39}{8}), footnote references (manually
numbered\DUfootnotemark{id1}{id8}{1}, anonymous auto-numbered\DUfootnotemark{id2}{id12}{3}, labeled auto-numbered\DUfootnotemark{id3}{label}{2}, or symbolic\DUfootnotemark{id4}{id13}{*}), citation references (\hyperlink{cit2002}{[CIT2002]}),
substitution references (\includegraphics{../../../docs/user/rst/images/biohazard.png}), and %
\phantomsection\label{inline-hyperlink-targets}inline hyperlink targets
(see \hyperref[targets]{Targets} below for a reference back to here).  Character-level
inline markup is also possible (although exceedingly ugly!) in \emph{re}\texttt{Structured}\emph{Text}.  Problems are indicated by %
\raisebox{1em}{\hypertarget{id28}{}}\hyperlink{id27}{\textbf{\color{red}|problematic|}} text
(generated by processing errors; this one is intentional).  Here is a
reference to the \hyperref[doctitle]{doctitle} and the \hyperref[subtitle]{subtitle}.

The default role for interpreted text is \DUroletitlereference{Title Reference}.  Here are
some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/dev/peps/pep-0287}{PEP 287}); an
RFC reference (\href{http://www.faqs.org/rfcs/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym
(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print \textquotedbl{}hello world\textquotedbl{}}}); a \textsubscript{subscript};
a \textsuperscript{superscript} and explicit roles for \DUroletitlereference{Docutils}’
\emph{standard} \textbf{inline} \texttt{markup}.

% DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!

Let’s test wrapping and whitespace significance in inline literals:
\texttt{This is an example of -{}-inline-literal -{}-text, -{}-including some-{}-
strangely-{}-hyphenated-words. ~Adjust-the-width-of-your-browser-window
to see how the text is wrapped. ~-{}- -{}-{}-{}- -{}-{}-{}-{}-{}-{}-{}- ~Now note ~ ~the
spacing ~ ~between the ~ ~words of ~ ~this sentence ~ ~(words
should ~ ~be grouped ~ ~in pairs).}

If the \texttt{-{}-pep-references} option was supplied, there should be a
live link to PEP 258 here.


\subsection{2.2~~~Bullet Lists%
  \label{bullet-lists}%
}
%
\begin{itemize}

\item A bullet list
%
\begin{itemize}

\item Nested bullet list.

\item Nested item 2.

\end{itemize}

\item Item 2.

Paragraph 2 of item 2.
%
\begin{itemize}

\item Nested bullet list.

\item Nested item 2.
%
\begin{itemize}

\item Third level.

\item Item 2.

\end{itemize}

\item Nested item 3.

\item This nested list should be compacted by the HTML writer.
%
\phantomsection\label{target}
% Even if this item contains a target and a comment.

\end{itemize}

\end{itemize}


\subsection{2.3~~~Enumerated Lists%
  \label{enumerated-lists}%
}
\newcounter{listcnt0}
\begin{list}{\arabic{listcnt0}.}
{
\usecounter{listcnt0}
\setlength{\rightmargin}{\leftmargin}
}

\item Arabic numerals.
\newcounter{listcnt1}
\begin{list}{\alph{listcnt1})}
{
\usecounter{listcnt1}
\setlength{\rightmargin}{\leftmargin}
}

\item lower alpha)
\newcounter{listcnt2}
\begin{list}{(\roman{listcnt2})}
{
\usecounter{listcnt2}
\setlength{\rightmargin}{\leftmargin}
}

\item (lower roman)
\newcounter{listcnt3}
\begin{list}{\Alph{listcnt3}.}
{
\usecounter{listcnt3}
\setlength{\rightmargin}{\leftmargin}
}

\item upper alpha.
\newcounter{listcnt4}
\begin{list}{\Roman{listcnt4})}
{
\usecounter{listcnt4}
\setlength{\rightmargin}{\leftmargin}
}

\item upper roman)
\end{list}
\end{list}
\end{list}
\end{list}

\item Lists that don’t start at 1:
\setcounter{listcnt1}{0}
\begin{list}{\arabic{listcnt1}.}
{
\usecounter{listcnt1}
\addtocounter{listcnt1}{2}
\setlength{\rightmargin}{\leftmargin}
}

\item Three

\item Four
\end{list}
\setcounter{listcnt1}{0}
\begin{list}{\Alph{listcnt1}.}
{
\usecounter{listcnt1}
\addtocounter{listcnt1}{2}
\setlength{\rightmargin}{\leftmargin}
}

\item C

\item D
\end{list}
\setcounter{listcnt1}{0}
\begin{list}{\roman{listcnt1}.}
{
\usecounter{listcnt1}
\addtocounter{listcnt1}{2}
\setlength{\rightmargin}{\leftmargin}
}

\item iii

\item iv
\end{list}
\end{list}


\subsection{2.4~~~Definition Lists%
  \label{definition-lists}%
}
%
\begin{description}
\item[{Term}] \leavevmode 
Definition

\item[{Term}] \leavevmode (\textbf{classifier})

Definition paragraph 1.

Definition paragraph 2.

\item[{Term}] \leavevmode 
Definition

\item[{Term}] \leavevmode (\textbf{classifier one})
(\textbf{classifier two})

Definition

\end{description}


\subsection{2.5~~~Field Lists%
  \label{field-lists}%
}
%
\begin{DUfieldlist}
\item[{what:}]
Field lists map field names to field bodies, like database
records.  They are often part of an extension syntax.  They are
an unambiguous variant of RFC 2822 fields.

\item[{how arg1 arg2:}]
The field marker is a colon, the field name, and a colon.

The field body may contain one or more body elements, indented
relative to the field marker.

\item[{credits:}]
\DUrole{credits}{This paragraph has the \DUroletitlereference{credits} class set.  (This is actually not
about credits but just for ensuring that the class attribute
doesn’t get stripped away.)}

\end{DUfieldlist}


\subsection{2.6~~~Option Lists%
  \label{option-lists}%
}

For listing command-line options:
%
\begin{DUoptionlist}

\item[-a]  command-line option “a”

\item[-b file]  options can have arguments
and long descriptions

\item[-{}-long]  options can be long also

\item[-{}-input=file]  long options can also have
arguments

\item[-{}-very-long-option]  The description can also start on the next line.

The description may contain multiple body elements,
regardless of where it starts.

\item[-x, -y, -z]  Multiple options are an “option group”.

\item[-v, -{}-verbose]  Commonly-seen: short \& long options.

\item[-1 file, -{}-one=file, -{}-two file]  Multiple options with arguments.

\item[/V]  DOS/VMS-style options too

\end{DUoptionlist}

There must be at least two spaces between the option and the
description.


\subsection{2.7~~~Literal Blocks%
  \label{literal-blocks}%
}

Literal blocks are indicated with a double-colon (“::”) at the end of
the preceding paragraph (over there \texttt{-{}->}).  They can be indented:
%
\begin{quote}{\ttfamily \raggedright \noindent
if~literal\_block:\\
~~~~text~=~'is~left~as-is'\\
~~~~spaces\_and\_linebreaks~=~'are~preserved'\\
~~~~markup\_processing~=~None
}
\end{quote}

Or they can be quoted without indentation:
%
\begin{quote}{\ttfamily \raggedright \noindent
>{}>~Great~idea!\\
>\\
>~Why~didn't~I~think~of~that?
}
\end{quote}


\subsection{2.8~~~Line Blocks%
  \label{line-blocks}%
}

This section tests line blocks.  Line blocks are body elements which
consist of lines and other line blocks.  Nested line blocks cause
indentation.

\begin{DUlineblock}{0em}
\item[] This is a line block.  It ends with a blank line.
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] New lines begin with a vertical bar (“|”).
\item[] Line breaks and initial indent are significant, and preserved.
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] Continuation lines are also possible.  A long line that is intended
to wrap should begin with a space in place of the vertical bar.
\end{DUlineblock}
\item[] The left edge of a continuation line need not be aligned with
the left edge of the text above it.
\end{DUlineblock}
\end{DUlineblock}

\begin{DUlineblock}{0em}
\item[] This is a second line block.
\item[] 
\item[] Blank lines are permitted internally, but they must begin with a “|”.
\end{DUlineblock}

Another line block, surrounded by paragraphs:

\begin{DUlineblock}{0em}
\item[] And it’s no good waiting by the window
\item[] It’s no good waiting for the sun
\item[] Please believe me, the things you dream of
\item[] They don’t fall in the lap of no-one
\end{DUlineblock}

Take it away, Eric the Orchestra Leader!
%
\begin{quote}

\begin{DUlineblock}{0em}
\item[] A one, two, a one two three four
\item[] 
\item[] Half a bee, philosophically,
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] must, \emph{ipso facto}, half not be.
\end{DUlineblock}
\item[] But half the bee has got to be,
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] \emph{vis a vis} its entity.  D’you see?
\item[] 
\end{DUlineblock}
\item[] But can a bee be said to be
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] or not to be an entire bee,
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] when half the bee is not a bee,
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] due to some ancient injury?
\item[] 
\end{DUlineblock}
\end{DUlineblock}
\end{DUlineblock}
\item[] Singing…
\end{DUlineblock}

\end{quote}

A line block, like the following poem by Christian Morgenstern, can
also be centre-aligned:

\begin{DUlineblock}{0em}
\foreignlanguage{ngerman}{\DUrole{align-center}{
\item[] \textbf{Die Trichter}
\item[] 
\item[] Zwei Trichter wandeln durch die Nacht.
\item[] Durch ihres Rumpfs verengten Schacht
\item[] fließt weißes Mondlicht
\item[] still und heiter
\item[] auf ~ ihren
\item[] Waldweg
\item[] u. s.
\item[] w.
\item[] 
}}
\end{DUlineblock}


\subsection{2.9~~~Block Quotes%
  \label{block-quotes}%
}

Block quotes consist of indented body elements:
%
\begin{quote}

My theory by A. Elk.  Brackets Miss, brackets.  This theory goes
as follows and begins now.  All brontosauruses are thin at one
end, much much thicker in the middle and then thin again at the
far end.  That is my theory, it is mine, and belongs to me and I
own it, and what it is too.
\nopagebreak

\raggedleft —Anne Elk (Miss)

\end{quote}

The language of a quote (like any other object) can be specified by
a class attribute:

% 
%
\begin{quote}
\foreignlanguage{french}{
ReStructuredText est un langage de balisage léger utilisé
notamment dans la documentation du langage Python.
}
\end{quote}


\subsection{2.10~~~Doctest Blocks%
  \label{doctest-blocks}%
}
%
\begin{quote}{\ttfamily \raggedright \noindent
>{}>{}>~print~'Python-specific~usage~examples;~begun~with~\textquotedbl{}>{}>{}>\textquotedbl{}'\\
Python-specific~usage~examples;~begun~with~\textquotedbl{}>{}>{}>\textquotedbl{}\\
>{}>{}>~print~'(cut~and~pasted~from~interactive~Python~sessions)'\\
(cut~and~pasted~from~interactive~Python~sessions)
}
\end{quote}


\subsection{2.11~~~Footnotes%
  \label{footnotes}%
}
%
\DUfootnotetext{id8}{id1}{1}{%
A footnote contains body elements, consistently indented by at
least 3 spaces.

This is the footnote’s second paragraph.
}
%
\DUfootnotetext{label}{id3}{2}{\phantomsection\label{label}%
Footnotes may be numbered, either manually (as in\DUfootnotemark{id9}{id8}{1}) or
automatically using a “\#”-prefixed label.  This footnote has a
label so it can be referred to from multiple places, both as a
footnote reference (\DUfootnotemark{id10}{label}{2}) and as a \hyperref[label]{hyperlink reference}.
}
%
\DUfootnotetext{id12}{id2}{3}{%
This footnote is numbered automatically and anonymously using a
label of “\#” only.

This is the second paragraph.

And this is the third paragraph.
}
%
\DUfootnotetext{id13}{id4}{*}{%
Footnotes may also use symbols, specified with a “*” label.
Here’s a reference to the next footnote:\DUfootnotemark{id14}{id15}{†}.
}
%
\DUfootnotetext{id15}{id14}{†}{%
This footnote shows the next symbol in the sequence.
}
%
\DUfootnotetext{id16}{id16}{4}{%
Here’s an unreferenced footnote, with a reference to a
nonexistent footnote:%
\raisebox{1em}{\hypertarget{id46}{}}%
\raisebox{1em}{\hypertarget{id17}{}}\hyperlink{id45}{\textbf{\color{red}{[}5{]}\_}}.
}


\subsection{2.12~~~Citations%
  \label{citations}%
}
\begin{figure}[b]\raisebox{1em}{\hypertarget{cit2002}{}}[CIT2002]
Citations are text-labeled footnotes. They may be
rendered separately and differently from footnotes.
\end{figure}

Here’s a reference to the above, \hyperlink{cit2002}{[CIT2002]}, and a %
\raisebox{1em}{\hypertarget{id48}{}}%
\raisebox{1em}{\hypertarget{id19}{}}\hyperlink{id47}{\textbf{\color{red}{[}nonexistent{]}\_}}
citation.


\subsection{2.13~~~Targets%
  \label{targets}%
  \label{another-target}%
}

\phantomsection\label{example}
This paragraph is pointed to by the explicit “example” target. A
reference can be found under \hyperref[inline-markup]{Inline Markup}, above. \hyperref[inline-hyperlink-targets]{Inline
hyperlink targets} are also possible.

Section headers are implicit targets, referred to by name. See
\hyperref[targets]{Targets}, which is a subsection of \hyperref[body-elements]{Body Elements}.

Explicit external targets are interpolated into references such as
“\href{http://www.python.org/}{Python}\DUfootnotemark{id31}{id29}{5}”.

Targets may be indirect and anonymous.  Thus \hyperref[targets]{this phrase} may also
refer to the \hyperref[targets]{Targets} section.

Here’s a %
\raisebox{1em}{\hypertarget{id50}{}}\hyperlink{id49}{\textbf{\color{red}`hyperlink reference without a target`\_}}, which generates an
error.


\subsubsection{2.13.1~~~Duplicate Target Names%
  \label{duplicate-target-names}%
}

Duplicate names in section headers or other implicit targets will
generate “info” (level-1) system messages.  Duplicate names in
explicit targets will generate “warning” (level-2) system messages.


\subsubsection{2.13.2~~~Duplicate Target Names%
  \label{id21}%
}

Since there are two “Duplicate Target Names” section headers, we
cannot uniquely refer to either of them by name.  If we try to (like
this: %
\raisebox{1em}{\hypertarget{id52}{}}\hyperlink{id51}{\textbf{\color{red}`Duplicate Target Names`\_}}), an error is generated.


\subsection{2.14~~~Directives%
  \label{directives}%
}

\phantomsection\label{contents}
These are just a sample of the many reStructuredText Directives.  For
others, please see
\url{http://docutils.sourceforge.net/docs/ref/rst/directives.html}.


\subsubsection{2.14.1~~~Document Parts%
  \label{document-parts}%
}

An example of the “contents” directive can be seen above this section
(a local, untitled table of \hyperref[contents]{contents}) and at the beginning of the
document (a document-wide \hyperref[table-of-contents]{table of contents}).


\subsubsection{2.14.2~~~Images and Figures%
  \label{images-and-figures}%
}

An image directive (also clickable – a hyperlink reference):

\hyperref[directives]{\includegraphics{../../../docs/user/rst/images/title.png}}

Image with multiple IDs:

\includegraphics{../../../docs/user/rst/images/title.png}
\phantomsection\label{image-target-3}\label{image-target-2}\label{image-target-1}

A centered image:

\noindent\makebox[\textwidth][c]{\includegraphics{../../../docs/user/rst/images/biohazard.png}}

A left-aligned image:

\noindent{\includegraphics{../../../docs/user/rst/images/biohazard.png}\hfill}

This paragraph might flow around the image.
The specific behavior depends upon the style sheet and
the browser or rendering software used.

A right-aligned image:

\noindent{\hfill\includegraphics{../../../docs/user/rst/images/biohazard.png}}

This paragraph might flow around the image.
The specific behavior depends upon the style sheet and
the browser or rendering software used.

For inline images see \hyperref[substitution-definitions]{Substitution Definitions}.

Image size:

An image 2 em wide:

\includegraphics[width=2em]{../../../docs/user/rst/images/biohazard.png}

An image 2 em wide and 15 pixel high:

\includegraphics[height=15px,width=2em]{../../../docs/user/rst/images/biohazard.png}

An image occupying 50\% of the line width:

\includegraphics[width=0.500\linewidth]{../../../docs/user/rst/images/title.png}

An image 2 cm high:

\includegraphics[height=2cm]{../../../docs/user/rst/images/biohazard.png}

A \emph{figure} is an image with a caption and/or a legend.  With page-based output
media, figures might float to a different position if this helps the page
layout.

\begin{figure}
\noindent\makebox[\textwidth][c]{\includegraphics[width=258bp]{../../../docs/user/rst/images/title.png}}
\caption{Plaintext markup syntax and parser system.}
\begin{DUlegend}
\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.156\DUtablewidth}|p{0.563\DUtablewidth}|}
\hline

re
 & 
Revised, revisited, based on ‘re’ module.
 \\
\hline

Structured
 & 
Structure-enhanced text, structuredtext.
 \\
\hline

Text
 & 
Well it is, isn’t it?
 \\
\hline
\end{longtable*}

This paragraph is also part of the legend.
\end{DUlegend}
\end{figure}

A left-aligned figure:

\begin{figure} % align = "left"
\noindent\makebox[\textwidth][c]{\includegraphics[width=40px]{../../../docs/user/rst/images/biohazard.png}}
\caption{This is the caption.}
\begin{DUlegend}
This is the legend.

The legend may consist of several paragraphs.
\end{DUlegend}
\end{figure}

This paragraph might flow around the figure.

The specific behavior depends upon the style sheet and the browser or
rendering software used.

A centered figure:

\begin{figure}
\noindent\makebox[\textwidth][c]{\includegraphics[width=40px]{../../../docs/user/rst/images/biohazard.png}}
\caption{This is the caption.}
\begin{DUlegend}
This is the legend.

The legend may consist of several paragraphs.
\end{DUlegend}
\end{figure}

This paragraph might flow around the figure.

The specific behavior depends upon the style sheet and the browser or
rendering software used.

A right-aligned figure:

\begin{figure} % align = "right"
\noindent\makebox[\textwidth][c]{\includegraphics[width=40px]{../../../docs/user/rst/images/biohazard.png}}
\caption{This is the caption.}
\begin{DUlegend}
This is the legend.

The legend may consist of several paragraphs.
\end{DUlegend}
\end{figure}

This paragraph might flow around the figure. The specific behavior depends
upon the style sheet and the browser or rendering software used.


\subsubsection{2.14.3~~~Admonitions%
  \label{admonitions}%
}

\DUadmonition[attention]{
\DUtitle[attention]{Attention!}

Directives at large.
}

\DUadmonition[caution]{
\DUtitle[caution]{Caution!}

Don’t take any wooden nickels.
}

\DUadmonition[danger]{
\DUtitle[danger]{!DANGER!}

Mad scientist at work!
}

\DUadmonition[error]{
\DUtitle[error]{Error}

Does not compute.
}

\DUadmonition[hint]{
\DUtitle[hint]{Hint}

It’s bigger than a bread box.
}

\DUadmonition[important]{
\DUtitle[important]{Important}
%
\begin{itemize}

\item Wash behind your ears.

\item Clean up your room.

\item Call your mother.

\item Back up your data.

\end{itemize}
}

\DUadmonition[note]{
\DUtitle[note]{Note}

This is a note.
}

\DUadmonition[tip]{
\DUtitle[tip]{Tip}

15\% if the service is good.
}

\DUadmonition[warning]{
\DUtitle[warning]{Warning}

Strong prose may provoke extreme mental exertion.
Reader discretion is strongly advised.
}

\DUadmonition[admonition-and-by-the-way]{
\DUtitle[admonition-and-by-the-way]{And, by the way…}

You can make up your own admonition too.
}


\subsubsection{2.14.4~~~Topics, Sidebars, and Rubrics%
  \label{topics-sidebars-and-rubrics}%
}

\emph{Sidebars} are like miniature, parallel documents.

\DUsidebar{
\DUtitle[title]{Sidebar Title}

\DUsubtitle[sidebar]{Optional Subtitle}

This is a sidebar.  It is for text outside the flow of the main
text.

\DUrubric{This is a rubric inside a sidebar}

Sidebars often appear beside the main text with a border and a different
background or font color.
}

A \emph{topic} is like a block quote with a title, or a self-contained section
with no subsections.

\DUtopic[]{
\DUtitle[title]{Topic Title}

This is a topic.
}

A \emph{rubric} is like an informal heading that doesn’t correspond to the
document’s structure. It is typically highlighted in red (hence the name).

\DUrubric{This is a rubric}

Topics and rubrics can be used at places where a \hyperref[section-title]{section title} is not
allowed (e.g. inside a directive).


\subsubsection{2.14.5~~~Target Footnotes%
  \label{target-footnotes}%
}
%
\DUfootnotetext{id29}{id30}{5}{%
\url{http://www.python.org/}
}
%
\DUfootnotetext{id33}{id34}{6}{%
\url{http://pygments.org/}
}
%
\DUfootnotetext{id35}{id36}{7}{%
\url{ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf}
}
%
\DUfootnotetext{id39}{id40}{8}{%
\url{http://docutils.sourceforge.net/}
}
%
\DUfootnotetext{id41}{id42}{9}{%
\url{A:DOS\\path\\}
}


\subsubsection{2.14.6~~~Replacement Text%
  \label{replacement-text}%
}

I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\DUfootnotemark{id32}{id29}{5}.


\subsubsection{2.14.7~~~Compound Paragraph%
  \label{compound-paragraph}%
}

Compound 1, paragraph 1.

Compound 1, paragraph 2.
%
\begin{itemize}

\item Compound 1, list item one.

\item Compound 1, list item two.

\end{itemize}

Another compound statement:

Compound 2, a literal block:
%
\begin{quote}{\ttfamily \raggedright \noindent
Compound~2,~literal.
}
\end{quote}
Compound 2, this is a test.

Compound 3, only consisting of one paragraph.
%
\begin{quote}{\ttfamily \raggedright \noindent
Compound~4.\\
This~one~starts~with~a~literal~block.
}
\end{quote}
Compound 4, a paragraph.

Now something \emph{really} perverted – a nested compound block.  This is
just to test that it works at all; the results don’t have to be
meaningful.

Compound 5, block 1 (a paragraph).

Compound 6, block 2 in compound 5.

Compound 6, another paragraph.

Compound 5, block 3 (a paragraph).

Compound 7, with a table inside:

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.249\DUtablewidth}|p{0.249\DUtablewidth}|p{0.249\DUtablewidth}|}
\hline

Left cell, first
paragraph.

Left cell, second
paragraph.
 & 
Middle cell,
consisting of
exactly one
paragraph.
 & 
Right cell.

Paragraph 2.

Paragraph 3.
 \\
\hline
\end{longtable*}
Compound 7, a paragraph after the table.

Compound 7, another paragraph.


\subsubsection{2.14.8~~~Parsed Literal Blocks%
  \label{parsed-literal-blocks}%
}
%
\begin{quote}{\ttfamily \raggedright \noindent
This~is~a~parsed~literal~block.\\
~~~~This~line~is~indented.~~The~next~line~is~blank.\\
~\\
Inline~markup~is~supported,~e.g.~\emph{emphasis},~\textbf{strong},~\texttt{literal\\
text},~footnotes\DUfootnotemark{id22}{id8}{1},~%
\phantomsection\label{hyperlink-targets}hyperlink~targets,~and~\href{http://www.python.org/}{references}.
}
\end{quote}


\subsubsection{2.14.9~~~Code%
  \label{code}%
}

Blocks of source code can be set with the \DUroletitlereference{code} directive. If the code
language is specified, the content is parsed and tagged by the \href{http://pygments.org/}{Pygments}\DUfootnotemark{id34}{id33}{6}
syntax highlighter and can be formatted with a style sheet. (Code parsing
is turned off using the \texttt{syntax-highlight} config setting in the test
conversions in order to get identical results with/without installed
Pygments highlighter.)
%
\begin{quote}{\ttfamily \raggedright \noindent
print~'This~is~Python~code.'
}
\end{quote}

The \texttt{:number-lines:} option (with optional start value) generates line
numbers:
%
\begin{quote}{\ttfamily \raggedright \noindent
\DUrole{ln}{~8~}\#~print~integers~from~0~to~9:\\
\DUrole{ln}{~9~}for~i~in~range(10):\\
\DUrole{ln}{10~}~~~~print~i
}
\end{quote}

For inline code snippets, there is the \DUroletitlereference{code} role, which can be used
directly (the code will not be parsed/tagged, as the language is not known)
or as base for special code roles, e.g. the LaTeX code in the next
paragraph.

Docutils uses LaTeX syntax for math directives and roles:
\texttt{\DUrole{code}{\DUrole{tex}{\textbackslash{}alpha = f(x)}}} prints $\alpha = f(x)$.

The \texttt{:code:} option of the \DUroletitlereference{include} directive sets the included content
as a code block, here the rst file \texttt{header\_footer.txt} with line numbers:
%
\begin{quote}{\ttfamily \raggedright \noindent
\DUrole{ln}{1~}..~header::~Document~header\\
\DUrole{ln}{2~}..~footer::~Document~footer
}
\end{quote}


\subsection{2.15~~~Substitution Definitions%
  \label{substitution-definitions}%
}

An inline image (\includegraphics{../../../docs/user/rst/images/biohazard.png}) example:

(Substitution definitions are not visible in the HTML source.)


\subsection{2.16~~~Comments%
  \label{comments}%
}

Here’s one:

% Comments begin with two dots and a space. Anything may
% follow, except for the syntax of footnotes, hyperlink
% targets, directives, or substitution definitions.
% 
% Double-dashes -- "--" -- must be escaped somehow in HTML output.
% 
% Comments may contain non-ASCII characters: ä ö ü æ ø å

(View the HTML source to see the comment.)


\subsection{2.17~~~Raw text%
  \label{raw-text}%
}

This does not necessarily look nice, because there may be missing white space.

It’s just there to freeze the behavior.

A test.

Second test.

\DUrole{myclass}{Another test with myclass set.}

This is the \DUrole{myrawroleclass}{fourth test} with myrawroleclass set.

Fifth test in LaTeX.\\Line two.


\subsection{2.18~~~Container%
  \label{container}%
}

paragraph 1

paragraph 2

% currently not implemented in LaTeX:
% .. include:: data/header_footer.txt


\subsection{2.19~~~Colspanning tables%
  \label{colspanning-tables}%
}

This table has a cell spanning two columns:

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.075\DUtablewidth}|p{0.075\DUtablewidth}|p{0.086\DUtablewidth}|}
\hline
\multicolumn{2}{|p{0.15\DUtablewidth}|}{\textbf{%
Inputs
}} & \textbf{%
Output
} \\
\hline
\textbf{%
A
} & \textbf{%
B
} & \textbf{%
A or B
} \\
\hline
\endfirsthead
\hline
\multicolumn{2}{|p{0.15\DUtablewidth}|}{\textbf{%
Inputs
}} & \textbf{%
Output
} \\
\hline
\textbf{%
A
} & \textbf{%
B
} & \textbf{%
A or B
} \\
\hline
\endhead
\multicolumn{3}{c}{\hfill ... continued on next page} \\
\endfoot
\endlastfoot

False
 & 
False
 & 
False
 \\
\hline

True
 & 
False
 & 
True
 \\
\hline

False
 & 
True
 & 
True
 \\
\hline

True
 & 
True
 & 
True
 \\
\hline
\end{longtable*}


\subsection{2.20~~~Rowspanning tables%
  \label{rowspanning-tables}%
}

Here’s a table with cells spanning several rows:

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.296\DUtablewidth}|p{0.156\DUtablewidth}|p{0.226\DUtablewidth}|}
\hline
\textbf{%
Header row, column 1
(header rows optional)
} & \textbf{%
Header 2
} & \textbf{%
Header 3
} \\
\hline
\endfirsthead
\hline
\textbf{%
Header row, column 1
(header rows optional)
} & \textbf{%
Header 2
} & \textbf{%
Header 3
} \\
\hline
\endhead
\multicolumn{3}{c}{\hfill ... continued on next page} \\
\endfoot
\endlastfoot

body row 1, column 1
 & 
column 2
 & 
column 3
 \\
\hline

body row 2
 & \multirow{2}{0.16\DUtablewidth}{%
Cells may
span rows.
} & \multirow{2}{0.23\DUtablewidth}{%
Another
rowspanning
cell.
} \\
\cline{1-1}

body row 3
 &  \\
\hline
\end{longtable*}


\subsection{2.21~~~Custom Roles%
  \label{custom-roles}%
}
%
\begin{itemize}

\item A role based on an existing role.

\texttt{\DUrole{custom}{one}} \texttt{\DUrole{custom}{two}} \texttt{\DUrole{custom}{three}}

\item A new role.

\DUrole{customnew}{one two three}

\item A role with class attribute.

\DUrole{special}{interpreted text}

\item A language-switching role:

Let’s count in German \foreignlanguage{ngerman}{eins zwei drei}.

\item A role with multiple class attributes, styled with raw directives:

\newcommand{\DUrolegreen}[1]{\textcolor{green}{#1}}
\newcommand{\DUrolesc}[1]{\textsc{#1}}

The following works in most browsers but does not validate
(\texttt{<style>} is only allowed in the document head):
%
\begin{quote}{\ttfamily \raggedright \noindent
..~raw::~html\\
~\\
~~<style~type=\textquotedbl{}text/css\textquotedbl{}><!-{}-\\
~~~.green~\{color:~green;\}\\
~~~.sc~\{font-variant:~small-caps;\}\\
~~~-{}-></style>
}
\end{quote}

\DUrole{green}{\DUrole{sc}{\foreignlanguage{british}{British colourful text in small-caps}}}.

\end{itemize}


\subsection{2.22~~~Mathematics%
  \label{mathematics}%
}

Docutils supports inline math with the prefix or postfix \texttt{:math:}
role specificator, $n! + \sin(x_n^2)$ and $A_\text{c} =
\frac{\pi}{4} d^2$, as well as displayed math via the
\DUroletitlereference{math} directive:
%
\begin{equation*}
f(\epsilon) = \frac{1}{1 + \exp\left(\frac{\varepsilon}{k_\text{B}T}\right)}
\end{equation*}
Content may start on the first line of the directive, e.g.
%
\begin{equation*}
N = \frac{\text{number of apples}}{7}
\end{equation*}
Equations can be labeled with a reference name using the \texttt{:name:} option.
See \hyperref[eq-m]{eq:M} and \hyperref[eq-schrodinger]{eq:schrödinger} below.

The determinant of the matrix
%
\begin{equation*}
\mathbf{M} = \left(\begin{matrix}a&b\\c&d\end{matrix}\right)
\phantomsection
\label{eq-m}
\end{equation*}
is $|\mathbf{M}| = ad - bc$.

More than one display math block can be put in one math directive.
For example, the following sum and integral with limits:
%
\begin{equation*}
\int_0^1 x^n dx = \frac{1}{n + 1}
\end{equation*}%
\begin{equation*}
\sum_{n=1}^m n = \frac{m(m+1)}{2}
\end{equation*}
LaTeX-supported Unicode math symbols can be used in math roles and
directives:

The Schrödinger equation
%
\begin{equation*}
i\hbar \frac{\partial }{\partial t}\Psi  = \hat{H}\Psi ,
\phantomsection
\label{eq-schrodinger}
\end{equation*}
with the \emph{wave function} $\Psi $, describes how the quantum state of a
physical system changes in time.
%
\begin{description}
\item[{Math-Accents:}] \leavevmode 
\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{p{0.315\DUtablewidth}p{0.315\DUtablewidth}p{0.315\DUtablewidth}}

$\acute{a}$      \texttt{\textbackslash{}acute\{a\}}
 & 
$\dot{t}$        \texttt{\textbackslash{}dot\{t\}}
 & 
$\hat{\gamma}$   \texttt{\textbackslash{}hat\{\textbackslash{}gamma\}}
 \\

$\grave{a}$      \texttt{\textbackslash{}grave\{a\}}
 & 
$\ddot{t}$       \texttt{\textbackslash{}ddot\{t\}}
 & 
$\tilde{\alpha}$ \texttt{\textbackslash{}tilde\{\textbackslash{}alpha\}}
 \\

$\breve{x}$      \texttt{\textbackslash{}breve\{x\}}
 & 
$\dddot{t}$      \texttt{\textbackslash{}dddot\{t\}}
 & 
$\vec{\imath}$   \texttt{\textbackslash{}vec\{\textbackslash{}imath\}}
 \\

$\check{a}$      \texttt{\textbackslash{}check\{a\}}
 & 
$\bar{a}$        \texttt{\textbackslash{}bar\{a\}}
 & 
$\vec{R}$        \texttt{\textbackslash{}vec\{R\}}
 \\
\end{longtable*}

\end{description}

% \widetilde{xxx}
% \widehat{xxx}

Modulation Transfer Function:
%
\begin{equation*}
\text{MTF} = \left|\frac{\mathcal{F}\{s(x)\}}
                        {\mathcal{F}\{ s(x)\} |_{\omega _{x}=0}}\right|
           = \mathrm{abs}\left(\frac
                 {\int _{-\infty }^{\infty }s(x) \mathrm{e}^{\mathrm{i}\omega _{x}x}\mathrm{d}{x}}
                 {\int _{-\infty }^{\infty }s(x)\mathrm{d}{x}}
             \right).
\end{equation*}
Math split over two lines: If a double backslash is detected outside a
\texttt{\textbackslash{}begin\{...\} \textbackslash{}end\{...\}} pair, the math code is wrapped in an \href{ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf}{AMSmath}\DUfootnotemark{id36}{id35}{7}
\texttt{align} environment:
%
\begin{align*}
s_{\mathrm{out}}(x) & = s_{\mathrm{in}}(x') * s_\delta (x-x') \\
                    & = \int  s_{\mathrm{in}}(x')s_\delta (x-x')\mathrm{d}x'
\end{align*}
Cases (“manually”, with \texttt{matrix} environment):
%
\begin{equation*}
\mathrm{sgn}(x) = \left\{\begin{matrix}
                    -1 & x<0\\
                    1 & x>0
                  \end{matrix}\right.
\end{equation*}
Cases with the \href{ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf}{AMSmath}\DUfootnotemark{id37}{id35}{7} \texttt{cases} environment (not (yet) supported by
HTML writers with \texttt{-{}-math-output=MathML}):
%
\begin{equation*}
\mathrm{sgn}(x) = \begin{cases}
                    -1 & x<0\\
                     1 & x>0
                  \end{cases}
\end{equation*}

\section{3~~~Tests for the LaTeX writer%
  \label{tests-for-the-latex-writer}%
}

Test syntax elements which may cause trouble for the LaTeX writer but might
not need to be tested with other writers (e.g. the HTML writer).


\subsection{3.1~~~Custom Roles in LaTeX%
  \label{custom-roles-in-latex}%
}
%
\begin{itemize}

\item Role names and class arguments are converted to conform to the
regular expression \texttt{{[}a-z{]}{[}-a-z0-9{]}*} (letters are downcased,
accents and similar decoration is stripped, non-conforming
characters are replaced by a hyphen).

Class arguments may contain numbers and hyphens, which need special
treatment in LaTeX command names.

\DUrole{large}{\DUrole{custom4}{\DUrole{small-caps}{\DUrole{custom-role}{\DUrole{custom-role}{Interpreted Text}}}}}

\item With LaTeX, roles can be styled within the document using the \DUroletitlereference{raw}
directive.

\newcommand{\DUrolelarge}[1]{{\large #1}}
\makeatletter
\@namedef{DUrolesmall-caps}{\textsc}
\@namedef{DUrolecustom4}{\textbf}
\makeatother

\DUrole{large}{\DUrole{custom4}{\DUrole{small-caps}{\DUrole{custom-role}{\DUrole{custom-role}{Interpreted Text}}}}} in large, bold, small-caps.

\item Custom roles can be based on standard roles:

This is a \emph{\DUrole{custom-emphasis}{customized emphasis text role}}

This is a \texttt{\DUrole{custom-literal}{customized literal text role}}

This is a \textbf{\DUrole{custom-strong}{customized strong text role}}

This is a \textsubscript{\DUrole{custom-subscript}{customized subscript text role}}

This is a \textsuperscript{\DUrole{custom-superscript}{customized superscript text role}}

This is a \DUroletitlereference{\DUrole{custom-title-reference}{customized title-reference text role}}

\end{itemize}


\subsection{3.2~~~More Tables%
  \label{more-tables}%
}

A multicolumn table with multi-paragraph rowspanning cells:

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.133\DUtablewidth}|p{0.179\DUtablewidth}|p{0.179\DUtablewidth}|p{0.110\DUtablewidth}|p{0.121\DUtablewidth}|p{0.145\DUtablewidth}|}
\hline

test
 & 
\textbf{bold hd}
 & \multicolumn{3}{p{0.41\DUtablewidth}|}{
multicolumn 1

With a second paragraph
} & 
\emph{emph hd}
 \\
\hline
\multicolumn{2}{|p{0.31\DUtablewidth}|}{
multicolumn 2

With a second paragraph
} & 
cell
 & 
cell
 & 
cell
 & 
cell
 \\
\hline

cell
 & \multicolumn{2}{p{0.36\DUtablewidth}|}{
multicolumn 3 (one line,
but very very very very
very looooong)
} & 
cell
 & 
cell
 & 
cell
 \\
\hline

cell
 & 
cell
 & 
cell
 & \multicolumn{3}{p{0.38\DUtablewidth}|}{
Short multicolumn 4
} \\
\hline
\end{longtable*}

A table with multirow header
%
\begin{quote}

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.156\DUtablewidth}|p{0.238\DUtablewidth}|}
\hline
\multirow{2}{0.16\DUtablewidth}{%
\textbf{%
XXX
}} & \textbf{%
Variable Summary
} \\
\cline{2-2}
 & \textbf{%
Description
} \\
\hline
\endfirsthead
\hline
\multirow{2}{0.16\DUtablewidth}{%
\textbf{%
XXX
}} & \textbf{%
Variable Summary
} \\
\cline{2-2}
 & \textbf{%
Description
} \\
\hline
\endhead
\multicolumn{2}{c}{\hfill ... continued on next page} \\
\endfoot
\endlastfoot
\multicolumn{2}{|p{0.39\DUtablewidth}|}{
multirow header breaks latex
} \\
\hline
\end{longtable*}

\end{quote}

% This file is used by the standalone_rst_latex test.


\subsection{3.3~~~Option lists%
  \label{id23}%
}

The LaTeX-2e description environment is used for definition lists.
The definition is continued on the same line as the term, this should
not happen if a option-list is at the top of the definition.

If the option list is not at the first element in the definition, it
is contained in a quote
%
\begin{quote}
%
\begin{DUoptionlist}

\item[-{}-help]  show help

\item[-v]  verbose

\end{DUoptionlist}

\end{quote}
%
\begin{description}
\item[{In a definition list:}] \leavevmode %
\begin{DUoptionlist}

\item[-{}-help]  show help

\item[-v]  verbose

\end{DUoptionlist}

\end{description}


\subsection{3.4~~~Monospaced non-alphanumeric characters%
  \label{monospaced-non-alphanumeric-characters}%
}

These are all ASCII characters except a-zA-Z0-9 and space:

\texttt{!!!\textquotedbl{}\textquotedbl{}\textquotedbl{}\#\#\#\$\$\$\%\%\%\&\&\&'{}'{}'((()))***+++,{},{},-{}-{}-...///:::}

\texttt{;;;<{}<{}<===>{}>{}>???@@@{[}{[}{[}\textbackslash{}\textbackslash{}\textbackslash{}{]}{]}{]}\textasciicircum{}\textasciicircum{}\textasciicircum{}\_\_\_`{}`{}`\{\{\{|||\}\}\}\textasciitilde{}\textasciitilde{}\textasciitilde{}}

\texttt{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}

The two lines of non-alphanumeric characters should both have the same
width as the third line.


\subsection{3.5~~~Non-ASCII characters%
  \label{non-ascii-characters}%
}

Punctuation and footnote symbols

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.028\DUtablewidth}|p{0.424\DUtablewidth}|}
\hline

–
 & 
en-dash
 \\
\hline

—
 & 
em-dash
 \\
\hline

‘
 & 
single turned comma quotation mark
 \\
\hline

’
 & 
single comma quotation mark
 \\
\hline

‚
 & 
low single comma quotation mark
 \\
\hline

“
 & 
double turned comma quotation mark
 \\
\hline

”
 & 
double comma quotation mark
 \\
\hline

„
 & 
low double comma quotation mark
 \\
\hline

†
 & 
dagger
 \\
\hline

‡
 & 
double dagger
 \\
\hline

\ding{169}
 & 
black diamond suit
 \\
\hline

\ding{170}
 & 
black heart suit
 \\
\hline

$\spadesuit$
 & 
black spade suit
 \\
\hline

$\clubsuit$
 & 
black club suit
 \\
\hline

…
 & 
ellipsis
 \\
\hline

™
 & 
trade mark sign
 \\
\hline

$\Leftrightarrow$
 & 
left-right double arrow
 \\
\hline
\end{longtable*}

The \DUroletitlereference{Latin-1 extended} Unicode block

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.051\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|p{0.028\DUtablewidth}|}
\hline

% 
 & 
0
 & 
1
 & 
2
 & 
3
 & 
4
 & 
5
 & 
6
 & 
7
 & 
8
 & 
9
 \\
\hline

160
 &  & 
¡
 & 
¢
 & 
£
 &  & 
¥
 & 
¦
 & 
§
 & 
¨
 & 
©
 \\
\hline

170
 & 
ª
 & 
«
 & 
¬
 & 
\-
 & 
®
 & 
¯
 & 
°
 & 
±
 & 
²
 & 
³
 \\
\hline

180
 & 
´
 & 
µ
 & 
¶
 & 
·
 & 
¸
 & 
¹
 & 
º
 & 
»
 & 
¼
 & 
½
 \\
\hline

190
 & 
¾
 & 
¿
 & 
À
 & 
Á
 & 
Â
 & 
Ã
 & 
Ä
 & 
Å
 & 
Æ
 & 
Ç
 \\
\hline

200
 & 
È
 & 
É
 & 
Ê
 & 
Ë
 & 
Ì
 & 
Í
 & 
Î
 & 
Ï
 & 
Ð
 & 
Ñ
 \\
\hline

210
 & 
Ò
 & 
Ó
 & 
Ô
 & 
Õ
 & 
Ö
 & 
×
 & 
Ø
 & 
Ù
 & 
Ú
 & 
Û
 \\
\hline

220
 & 
Ü
 & 
Ý
 & 
Þ
 & 
ß
 & 
à
 & 
á
 & 
â
 & 
ã
 & 
ä
 & 
å
 \\
\hline

230
 & 
æ
 & 
ç
 & 
è
 & 
é
 & 
ê
 & 
ë
 & 
ì
 & 
í
 & 
î
 & 
ï
 \\
\hline

240
 & 
ð
 & 
ñ
 & 
ò
 & 
ó
 & 
ô
 & 
õ
 & 
ö
 & 
÷
 & 
ø
 & 
ù
 \\
\hline

250
 & 
ú
 & 
û
 & 
ü
 & 
ý
 & 
þ
 & 
ÿ
 &  &  &  &  \\
\hline
\end{longtable*}
%
\begin{itemize}

\item The following line should not be wrapped, because it uses
no-break spaces (\textbackslash{}u00a0):

X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X

\item Line wrapping with/without breakpoints marked by soft hyphens
(\textbackslash{}u00ad):

pdn\-derd\-mdtd\-ri\-schpdn\-derd\-mdtd\-ri\-schpdn\-derd\-mdtd\-ri\-schpdn\-derd\-mdtd\-ri\-schpdn\-derd\-mdtd\-ri\-sch

pdnderdmdtdrischpdnderdmdtdrischpdnderdmdtdrischpdnderdmdtdrischpdnderdmdtdrisch

\item The currency sign (\textbackslash{}u00a4) is not supported by all fonts
(some have an Euro sign at its place). You might see an error
like:
%
\begin{quote}{\ttfamily \raggedright \noindent
!~Package~textcomp~Error:~Symbol~\textbackslash{}textcurrency~not~provided~by\\
(textcomp)~~~~~~~~~~~~~~~~font~family~ptm~in~TS1~encoding.\\
(textcomp)~~~~~~~~~~~~~~~~Default~family~used~instead.
}
\end{quote}

(which in case of font family ptm is a false positive). Add either
%
\begin{DUfieldlist}
\item[{warn:}]
turn the error in a warning, use the default symbol (bitmap), or

\item[{force,almostfull:}]
use the symbol provided by the font at the users
risk,

\end{DUfieldlist}

to the document options or use a different font package.

\end{itemize}


\subsection{3.6~~~Encoding special chars%
  \label{encoding-special-chars}%
}

The LaTeX Info pages lists under “2.18 Special Characters”
%
\begin{quote}

The following characters play a special role in LaTeX and are called
“special printing characters”, or simply “special characters”.
%
\begin{quote}

\# \$ \% \& \textasciitilde{} \_ \textasciicircum{} \textbackslash{} \{ \}

\end{quote}

\end{quote}

The special chars verbatim:
%
\begin{quote}{\ttfamily \raggedright \noindent
\#~\$~\%~\&~\textasciitilde{}~\_~\textasciicircum{}~\textbackslash{}~\{~\}
}
\end{quote}

However also \emph{square brackets} {[}{]} need special care.
%
\begin{quote}

item and all the other commands with optional arguments check
if the token right after the macro name is an opening bracket.
In that case the contents between that bracket and the following
closing bracket on the same grouping level are taken as the
optional argument. What makes this unintuitive is the fact that
the square brackets aren’t grouping characters themselves, so in
your last example item{[}{[}…{]}{]} the optional argument consists of
{[}… (without the closing bracket).

\end{quote}

Compare the items in the following lists:
%
\begin{itemize}

\item simple item

\item {[}bracketed{]} item

\end{itemize}
%
\begin{description}
\item[{simple}] \leavevmode 
description term

\item[{{[}bracketed{]}}] \leavevmode 
description term

\end{description}

The OT1 font-encoding has different characters for the less-than,
greater-than and bar, < | >, except for typewriter font \DUroletitlereference{cmtt}:
%
\begin{quote}{\ttfamily \raggedright \noindent
<~|~>
}
\end{quote}


\subsection{3.7~~~Hyperlinks and -targets%
  \label{hyperlinks-and-targets}%
}

In LaTeX, we must set an explicit anchor (\texttt{\textbackslash{}phantomsection}) for a
%
\phantomsection\label{hypertarget-in-plain-text}hypertarget in plain text or in a figure but not in a longtable or
caption:

\setlength{\DUtablewidth}{\linewidth}
\begin{longtable}[c]{|p{0.075\DUtablewidth}|p{0.075\DUtablewidth}|p{0.075\DUtablewidth}|}
\caption{Table with %
\label{hypertarget-in-table-title}hypertarget in table title.}\\
\hline

False
 & 
True
 & 
None
 \\
\hline
\end{longtable}
\label{table-label}

\begin{figure}
\phantomsection\label{figure-label}
\noindent\makebox[\textwidth][c]{\includegraphics{../../../docs/user/rst/images/biohazard.png}}
\caption{Figure with %
\label{hypertarget-in-figure-caption}hypertarget in figure caption.}
\begin{DUlegend}
Legend with %
\phantomsection\label{hypertarget-in-figure-legend}hypertarget in figure legend.
\end{DUlegend}
\end{figure}

\includegraphics{../../../docs/user/rst/images/biohazard.png}
\phantomsection\label{image-label}

See \hyperref[hypertarget-in-plain-text]{hypertarget in plain text},
\hyperref[table-label]{table label}, \hyperref[hypertarget-in-table-title]{hypertarget in table title},
\hyperref[figure-label]{figure label}, \hyperref[hypertarget-in-figure-caption]{hypertarget in figure caption},
\hyperref[hypertarget-in-figure-legend]{hypertarget in figure legend}, and
\hyperref[image-label]{image label}.


\subsection{3.8~~~External references%
  \label{external-references}%
}

Long URLs should be wrapped in the PDF.
This can be achieved with the url command which is used by the LaTeX writer
whenever the content (name) of a reference node equals the link URL.
%
\begin{description}
\item[{Example:}] \leavevmode 
a long URL that should wrap in the output
\url{http://docutils.sourceforge.net/docs/user/latex.html\#id79}

\end{description}

If the argument contains any “\%”, “\#”, or “\textasciicircum{}\textasciicircum{}”, or ends with \texttt{\textbackslash{}}, it can’t
be used in the argument to another command. The argument must not contain
unbalanced braces.

The characters \textasciicircum{}, \{, \}, and \texttt{\textbackslash{}} are invalid in a “http:” or “ftp:” URL
and not recognized as part of it:

\begin{DUlineblock}{0em}
\item[] \url{http://www.example.org}/strange\textasciicircum{}\textasciicircum{}name
\item[] \url{http://www.example.org}\textbackslash{}using\textbackslash{}DOS\textbackslash{}paths\textbackslash{}
\item[] \url{http://www.example.org/XML}/strange\{n\}ame
\end{DUlineblock}

They can, however be used in paths and/or filenames.

Handling by the LaTeX writer:
%
\begin{itemize}

\item \texttt{\#}, \texttt{\textbackslash{}} and \texttt{\%} are escaped:

\begin{DUlineblock}{0em}
\item[] \href{http://www.w3.org/XML/Schema\#dev}{URL with \#}
\url{http://www.w3.org/XML/Schema\#dev}
\item[] \href{http://www.w3.org/XML/Schema\%dev}{URL with \%}
\url{http://example.org/Schema\%dev}
\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{id42}{id41}{9} \url{A:DOS\\path\\}\DUfootnotemark{id43}{id41}{9}
\end{DUlineblock}

\DUadmonition[note]{
\DUtitle[note]{Note}

These URLs are typeset inside a LaTeX command without error.

\begin{DUlineblock}{0em}
\item[] \url{http://www.w3.org/XML/Schema\#dev}
\item[] \url{http://example.org/Schema\%dev}
\item[] \url{A:DOS\\path\\}\DUfootnotemark{id44}{id41}{9}
\end{DUlineblock}
}

\end{itemize}
%
\begin{itemize}

\item \textasciicircum{}\textasciicircum{} LaTeX’s special syntax for characters results in “strange” replacements
(both with href and url). A warning is given.

\href{../strange^^name}{file with \textasciicircum{}\textasciicircum{}}:
\url{../strange^^name}

\item Unbalanced braces, \{ or \}, will fail (both with href and url):
%
\begin{quote}{\ttfamily \raggedright \noindent
`file~with~\{~<../strange\{name>`\_\_\\
`<../strange\{name>`\_\_
}
\end{quote}

while balanced braces are suported:

\begin{DUlineblock}{0em}
\item[] \url{../strange{n}ame}
\item[] \url{../st{r}ange{n}ame}
\item[] \url{../{st{r}ange{n}ame}}
\end{DUlineblock}

\end{itemize}


\subsection{3.9~~~Section titles with \hyperref[inline-markup]{inline markup}%
  \label{section-titles-with-inline-markup}%
}


\subsubsection{3.9.1~~~\emph{emphasized}, H\textsubscript{2}O and $x^2$%
  \label{emphasized-h2o-and-x-2}%
}


\subsubsection{3.9.2~~~Substitutions work%
  \label{substitutions-fail}%
}


\subsection{3.10~~~Deeply nested sections%
  \label{deeply-nested-sections}%
}

In LaTeX and HTML,


\subsubsection{3.10.1~~~Level 3%
  \label{level-3}%
}

nested sections


\paragraph{3.10.1.1~~~level 4%
  \label{level-4}%
}

reach at some level


\subparagraph{3.10.1.1.1~~~level 5%
  \label{level-5}%
}

(depending on the document class)


\DUtitle[sectionVI]{3.10.1.1.1.1~~~level 6%
  \label{level-6}%
}

an unsupported level.

% unusual combinations (from newlatex, for interactive testing)
% .. include:: data/latex.txt

% Preface for System Messages:


\section{4~~~Error Handling%
  \label{error-handling}%
}

Any errors caught during processing will generate system messages.

There should be five messages in the following, auto-generated
section, “Docutils System Messages”:

% section should be added by Docutils automatically


\section[Docutils System Messages]{\color{red}Docutils System Messages%
}

\DUadmonition[system-message]{
\DUtitle[system-message]{system-message}
\raisebox{1em}{\hypertarget{id27}{}}

{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~104

\hyperlink{id28}{
Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}.
}}

\DUadmonition[system-message]{
\DUtitle[system-message]{system-message}
\raisebox{1em}{\hypertarget{id45}{}}

{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~391

\hyperlink{id46}{
Unknown target name: \textquotedbl{}5\textquotedbl{}.
}}

\DUadmonition[system-message]{
\DUtitle[system-message]{system-message}
\raisebox{1em}{\hypertarget{id47}{}}

{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~400

\hyperlink{id48}{
Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}.
}}

\DUadmonition[system-message]{
\DUtitle[system-message]{system-message}
\raisebox{1em}{\hypertarget{id49}{}}

{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~427

\hyperlink{id50}{
Unknown target name: \textquotedbl{}hyperlink reference without a target\textquotedbl{}.
}}

\DUadmonition[system-message]{
\DUtitle[system-message]{system-message}
\raisebox{1em}{\hypertarget{id51}{}}

{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~440

\hyperlink{id52}{
Duplicate target name, cannot be used as a unique reference: \textquotedbl{}duplicate target names\textquotedbl{}.
}}

\end{document}