/usr/share/acl2-6.3/books/xdoc/topics.cert is in acl2-books-certs 6.3-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | (IN-PACKAGE "ACL2")
"ACL2 Version 6.3"
:BEGIN-PORTCULLIS-CMDS
(INCLUDE-BOOK "str/portcullis" :DIR :SYSTEM)
(INCLUDE-BOOK "oslib/portcullis" :DIR :SYSTEM)
(INCLUDE-BOOK "centaur/bridge/portcullis" :DIR :SYSTEM)
:END-PORTCULLIS-CMDS
:EXPANSION-ALIST
((2 RECORD-EXPANSION (DEFXDOC XDOC :SHORT "<i>XDOC</i> is a tool for documenting ACL2 books. You can use it to
access documentation about ACL2 and its books, to document your own books, and
to create custom web-based manuals. It is intended as a replacement for ACL2
facilities like @(see defdoc), @(':doc'), and so on." :LONG "<h3>Getting Documentation</h3>
<p>Most of the documentation below is about using XDOC to document your own
@(see acl2::books) and create manuals. If you just want to browse the
documentation, you probably don't need to read any of this! Instead, see
either:</p>
<ul>
<li><b>Online version.</b> If you expect to have an internet connection while
using the documentation, you may be happy with the <a
href='http://fv.centtech.com/acl2/latest/doc/'>online XDOC manual</a> hosted by
<a href='http://www.centtech.com/'>Centaur Technology</a>. This version covers
the latest released version of ACL2 and the corresponding version of the <a
href='http://code.google.com/p/acl2-books/'>ACL2 Community Books</a>.</li>
<li><b>Local version.</b> If you sometimes work without an internet connection,
or are using development snapshots of ACL2 and need up-to-date documentation,
you can build a local version of the documentation. You first need to build
ACL2(h), then certify the @('centaur/doc') book as follows:
@({
cd acl2-sources/books
make USE_QUICKLISP=1 centaur/doc.cert
})
After this is built, the manual should be available at:
@({acl2-sources/books/centaur/manual/index.html})</li>
</ul>
<h3>Documenting your Books</h3>
<p>To use XDOC to document your own books, the first step is:</p>
@({
(include-book \"xdoc/top\" :dir :system)
})
<p>This book loads very quickly, requires no ttags, and provides a (nearly)
complete interface to the XDOC system, including:</p>
<ul>
<li>@(see defxdoc) and @(see defsection), which are the basic commands for
adding documentation — the XDOC alternatives to ACL2's @(see defdoc)
command.</li>
<li>The @(see save) command, which can be used to create web-based manuals for
your libraries.</li>
</ul>
<p>The @('xdoc/top') book hijacks the @(':doc') command by installing a new
<see topic='@(url ld-keyword-aliases)'>LD keyword alias</see>. This way,
you (and your users) can see both ordinary ACL2 documentation and XDOC
documentation from the terminal by just using @(':doc'), without having to know
which documentation system was used to document which topic.</p>
<box><p><b><color rgb='#ff0000'>NEW</color></b> (experimental): When writing
documentation, you can now automatically have XDOC topics displayed as you
submit new @(see defxdoc) forms—just add:</p>
@({
(include-book \"xdoc/debug\" :dir :system)
})
<p>to your @(see acl2::acl2-customization) file, or include it while you are
developing your book. Afterward, whenever you submit each @(see defxdoc) form,
it will automatically be displayed in the terminal, showing you any markup
problems and giving you a quick, text-mode preview.</p></box>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS) (:SHORT . "<i>XDOC</i> is a tool for documenting ACL2 books. You can use it to
access documentation about ACL2 and its books, to document your own books, and
to create custom web-based manuals. It is intended as a replacement for ACL2
facilities like @(see defdoc), @(':doc'), and so on.") (:LONG . "<h3>Getting Documentation</h3>
<p>Most of the documentation below is about using XDOC to document your own
@(see acl2::books) and create manuals. If you just want to browse the
documentation, you probably don't need to read any of this! Instead, see
either:</p>
<ul>
<li><b>Online version.</b> If you expect to have an internet connection while
using the documentation, you may be happy with the <a
href='http://fv.centtech.com/acl2/latest/doc/'>online XDOC manual</a> hosted by
<a href='http://www.centtech.com/'>Centaur Technology</a>. This version covers
the latest released version of ACL2 and the corresponding version of the <a
href='http://code.google.com/p/acl2-books/'>ACL2 Community Books</a>.</li>
<li><b>Local version.</b> If you sometimes work without an internet connection,
or are using development snapshots of ACL2 and need up-to-date documentation,
you can build a local version of the documentation. You first need to build
ACL2(h), then certify the @('centaur/doc') book as follows:
@({
cd acl2-sources/books
make USE_QUICKLISP=1 centaur/doc.cert
})
After this is built, the manual should be available at:
@({acl2-sources/books/centaur/manual/index.html})</li>
</ul>
<h3>Documenting your Books</h3>
<p>To use XDOC to document your own books, the first step is:</p>
@({
(include-book \"xdoc/top\" :dir :system)
})
<p>This book loads very quickly, requires no ttags, and provides a (nearly)
complete interface to the XDOC system, including:</p>
<ul>
<li>@(see defxdoc) and @(see defsection), which are the basic commands for
adding documentation — the XDOC alternatives to ACL2's @(see defdoc)
command.</li>
<li>The @(see save) command, which can be used to create web-based manuals for
your libraries.</li>
</ul>
<p>The @('xdoc/top') book hijacks the @(':doc') command by installing a new
<see topic='@(url ld-keyword-aliases)'>LD keyword alias</see>. This way,
you (and your users) can see both ordinary ACL2 documentation and XDOC
documentation from the terminal by just using @(':doc'), without having to know
which documentation system was used to document which topic.</p>
<box><p><b><color rgb='#ff0000'>NEW</color></b> (experimental): When writing
documentation, you can now automatically have XDOC topics displayed as you
submit new @(see defxdoc) forms—just add:</p>
@({
(include-book \"xdoc/debug\" :dir :system)
})
<p>to your @(see acl2::acl2-customization) file, or include it while you are
developing your book. Afterward, whenever you submit each @(see defxdoc) form,
it will automatically be displayed in the terminal, showing you any markup
problems and giving you a quick, text-mode preview.</p></box>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC)))))) (4 RECORD-EXPANSION (DEFXDOC DEFXDOC :SHORT "Add documentation to the @(see xdoc) database." :LONG "<box><p>Note: @('defxdoc') is very basic. You will usually want to
use @(see defsection) or @(see cutil::define) instead.</p></box>
<p>@('Defxdoc') is the XDOC alternative to ACL2's built-in @('defdoc')
command.</p>
<p>General form:</p>
@({
(defxdoc name
[:parents parents]
[:short short]
[:long long])
})
<p>Example:</p>
@({
(defxdoc duplicity
:parents (std/lists defsort count no-duplicatesp)
:short \"@(call duplicity) counts how many times the
element @('a') occurs within the string @('x').\"
:long \"<p>This function is similar to ACL2's built-in
@('count') function but is more limited:</p> ...\")
})
<p>The @('name') of each documentation topic must be a symbol. All of the
keyword arguments are optional:</p>
<ul>
<li>@('parents') let you associate this documentation with other topics. A
topic may have many parents, but circular chains of parents are not allowed and
will lead to errors when generating manuals. If no @(':parents') are given
explicitly, the <see topic='@(url set-default-parents)'>default parents</see>
will be used.</li>
<li>@('short') should be a short description of this topic that is suitable for
inlining in other pages. For instance, it may be displayed in subtopic listing
and in \"hover\" text on navigation pages.</li>
<li>@('long') should be the full, detailed documentation for this topic.</li>
</ul>
<p>The @('short') and @('long') strings may be written using the XDOC @(see
markup) language, and may also use @(see preprocessor) commands to insert
function definitions, theorems, topic links, and so on.</p>
<p>Many examples of using XDOC can be found throughout the ACL2 books. See for
instance the @(see acl2::std), @(see acl2::str) or @(see acl2::osets)
libraries.</p>
<h3>Note for Advanced Users</h3>
<p>XDOC just stores its documentation in an ordinary ACL2 table, so if you want
to do something like automatically generate documentation from macros, you
might decide to bypass @('defxdoc') and just manipulate the table directly.</p>
<p>It is not possible to directly use @('defxdoc') from raw Lisp, but you can
use @(see defxdoc-raw) instead.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . DEFXDOC) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Add documentation to the @(see xdoc) database.") (:LONG . "<box><p>Note: @('defxdoc') is very basic. You will usually want to
use @(see defsection) or @(see cutil::define) instead.</p></box>
<p>@('Defxdoc') is the XDOC alternative to ACL2's built-in @('defdoc')
command.</p>
<p>General form:</p>
@({
(defxdoc name
[:parents parents]
[:short short]
[:long long])
})
<p>Example:</p>
@({
(defxdoc duplicity
:parents (std/lists defsort count no-duplicatesp)
:short \"@(call duplicity) counts how many times the
element @('a') occurs within the string @('x').\"
:long \"<p>This function is similar to ACL2's built-in
@('count') function but is more limited:</p> ...\")
})
<p>The @('name') of each documentation topic must be a symbol. All of the
keyword arguments are optional:</p>
<ul>
<li>@('parents') let you associate this documentation with other topics. A
topic may have many parents, but circular chains of parents are not allowed and
will lead to errors when generating manuals. If no @(':parents') are given
explicitly, the <see topic='@(url set-default-parents)'>default parents</see>
will be used.</li>
<li>@('short') should be a short description of this topic that is suitable for
inlining in other pages. For instance, it may be displayed in subtopic listing
and in \"hover\" text on navigation pages.</li>
<li>@('long') should be the full, detailed documentation for this topic.</li>
</ul>
<p>The @('short') and @('long') strings may be written using the XDOC @(see
markup) language, and may also use @(see preprocessor) commands to insert
function definitions, theorems, topic links, and so on.</p>
<p>Many examples of using XDOC can be found throughout the ACL2 books. See for
instance the @(see acl2::std), @(see acl2::str) or @(see acl2::osets)
libraries.</p>
<h3>Note for Advanced Users</h3>
<p>XDOC just stores its documentation in an ordinary ACL2 table, so if you want
to do something like automatically generate documentation from macros, you
might decide to bypass @('defxdoc') and just manipulate the table directly.</p>
<p>It is not possible to directly use @('defxdoc') from raw Lisp, but you can
use @(see defxdoc-raw) instead.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC DEFXDOC)))))) (5 RECORD-EXPANSION (DEFXDOC XDOC::MARKUP :SHORT "The <a href='http://en.wikipedia.org/wiki/Xml'>XML</a> markup
language that is the basis of XDOC documentation strings." :LONG "<p>XDOC uses an XML markup language that is similar to a subset of <a
href='http://en.wikipedia.org/wiki/HTML'>HTML</a>. Note that in XML, beginning
and ending tags really need to be balanced.</p>
<h3>Formatting Text</h3>
<p>Various tags allow you to control the font:</p>
<ul>
<li><b><b>bold</b></b></li>
<li><i><i>italics</i></i></li>
<li><u><u>underline</u></u></li>
<li><tt><tt>typewriter text</tt></tt></li>
<li><color rgb=\"#ff0000\"><color rgb="#ff0000">colored text</color></color></li>
<li><sf><sf>sans-serif</sf></sf></li>
</ul>
<h3>Displaying Source Code</h3>
<p>The @(see preprocessor) allows you to insert function definitions, theorems,
etc., from the ACL2 world. This can help you avoid having to copy and paste
definitions into your documentation, which can help to keep your documentation
up to date.</p>
<p>But sometimes you want to write other kinds of code fragments as examples.
The raw markup options are:</p>
<ul>
<li>Use the @('<tt>') tag for short, inline pieces of code, such as <tt>(+ 1
x)</tt>.</li>
<li>Use the @('<code>') tag for longer code examples that should be indented
and \"preformatted,\" i.e., newlines and spaces should be preserved.</li>
</ul>
<p><b>However</b>, it's often better to use the preprocessor's
<tt>@@('...')</tt> and <tt>@@({...})</tt> macros, respectively. These are nice
because they automatically escape special HTML characters like < into
&lt;, and also automatically add hyperlinks to documented functions.</p>
<p>Whenever you include Lisp code fragments in your documentation, you should
usually keep everything <b>indented one space</b> to prevent Emacs problems.
For instance:</p>
@({
|(defxdoc foo
| :long \"<h3>How to format @('<code>') blocks</h3>
|
|<p>GOOD -- the form is indented one space:</p>
|<code>
| (my-lisp-form (foo ...)
| (bar ...))
|</code>
|
|<p>BAD -- the form is directly on the left-margin:</p>
|<code>
|(my-lisp-form (foo ...)
| (bar ...))
|</code>
})
<p>Without this leading space, Emacs can become confused and think that
@('(my-lisp-form ...)'), rather than @('(defxdoc foo ...)'), is the top-level
expression. This can ruin syntax highlighting and also commands like @('C-t
e') for sending s-expressions to the @('*shell*') window.</p>
<h3>Hyperlinks</h3>
<p><i>Internal links</i> between documentation topics and <i>Emacs
tags-search links</i> into the source code are handled by the @(see
preprocessor).</p>
<p>You can add <i>external links</i> to web pages with ordinary HTML-style
links, e.g.,</p>
@({
<a href=\"http://www.centtech.com/\">Centaur Technology</a>
})
<p>Produces a link to <a href=\"http://www.centtech.com/\">Centaur
Technology</a>.</p>
<h3>Structuring Documents</h3>
<p>For section headings,</p>
<ul>
<li>@('<h1>') creates the biggest heading:<h1>H1 Example</h1></li>
<li>@('<h2>') the next biggest:<h2>H2 Example</h2></li>
<li>@('<h3>') a medium-sized heading:<h3>H3 Example</h3></li>
<li>@('<h4>') the second smallest:<h4>H4 Example</h4></li>
<li>@('<h5>') the smallest heading:<h5>H5 Example</h5></li>
</ul>
<p>@('<p>') tags should be put around paragraphs.</p>
<blockquote>@('<blockquote>') can be used to create indented paragraphs like
this one. (Let's put enough text here to make it word-wrap. Mumble mumble
mumble. Mumble. Mumble mumble.)</blockquote>
<p>@('<br/>') can be used<br/>
to write haikus and so on<br/>
but is discouraged</p>
<p>Bulleted and numbered lists work as in HTML. The list itself begins with
@('<ul>') (for bulleted lists) or @('<ol>') (for numbered lists). Each list
element is an @('<li>') tag. For instance,</p>
@({
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
})
<p>Produces:</p>
<box>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</box>
<p>You can also use definition lists, which are comprised of @('<dl>'),
@('<dt>'), and @('<dd>') tags. For instance,</p>
@({
<dl>
<dt>Inputs</dt>
<dd><tt>x</tt>, the list we are traversing</dd>
<dd><tt>max</tt>, limit on how many we can accumulate</dd>
<dd><tt>acc</tt>, accumulator for our results</dd>
</dl>
})
<p>Produces:</p>
<box>
<dl>
<dt>Inputs</dt>
<dd><tt>x</tt>, the list we are traversing</dd>
<dd><tt>max</tt>, limit on how many we can accumulate</dd>
<dd><tt>acc</tt>, accumulator for our results</dd>
</dl>
</box>
<p>These framed boxes are generated with the @('<box>') tag.</p>
<p>It's relatively easy to add new tags. We'll probably add some kind of image
support in the future, and maybe other tags that users want.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::MARKUP) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "The <a href='http://en.wikipedia.org/wiki/Xml'>XML</a> markup
language that is the basis of XDOC documentation strings.") (:LONG . "<p>XDOC uses an XML markup language that is similar to a subset of <a
href='http://en.wikipedia.org/wiki/HTML'>HTML</a>. Note that in XML, beginning
and ending tags really need to be balanced.</p>
<h3>Formatting Text</h3>
<p>Various tags allow you to control the font:</p>
<ul>
<li><b><b>bold</b></b></li>
<li><i><i>italics</i></i></li>
<li><u><u>underline</u></u></li>
<li><tt><tt>typewriter text</tt></tt></li>
<li><color rgb=\"#ff0000\"><color rgb="#ff0000">colored text</color></color></li>
<li><sf><sf>sans-serif</sf></sf></li>
</ul>
<h3>Displaying Source Code</h3>
<p>The @(see preprocessor) allows you to insert function definitions, theorems,
etc., from the ACL2 world. This can help you avoid having to copy and paste
definitions into your documentation, which can help to keep your documentation
up to date.</p>
<p>But sometimes you want to write other kinds of code fragments as examples.
The raw markup options are:</p>
<ul>
<li>Use the @('<tt>') tag for short, inline pieces of code, such as <tt>(+ 1
x)</tt>.</li>
<li>Use the @('<code>') tag for longer code examples that should be indented
and \"preformatted,\" i.e., newlines and spaces should be preserved.</li>
</ul>
<p><b>However</b>, it's often better to use the preprocessor's
<tt>@@('...')</tt> and <tt>@@({...})</tt> macros, respectively. These are nice
because they automatically escape special HTML characters like < into
&lt;, and also automatically add hyperlinks to documented functions.</p>
<p>Whenever you include Lisp code fragments in your documentation, you should
usually keep everything <b>indented one space</b> to prevent Emacs problems.
For instance:</p>
@({
|(defxdoc foo
| :long \"<h3>How to format @('<code>') blocks</h3>
|
|<p>GOOD -- the form is indented one space:</p>
|<code>
| (my-lisp-form (foo ...)
| (bar ...))
|</code>
|
|<p>BAD -- the form is directly on the left-margin:</p>
|<code>
|(my-lisp-form (foo ...)
| (bar ...))
|</code>
})
<p>Without this leading space, Emacs can become confused and think that
@('(my-lisp-form ...)'), rather than @('(defxdoc foo ...)'), is the top-level
expression. This can ruin syntax highlighting and also commands like @('C-t
e') for sending s-expressions to the @('*shell*') window.</p>
<h3>Hyperlinks</h3>
<p><i>Internal links</i> between documentation topics and <i>Emacs
tags-search links</i> into the source code are handled by the @(see
preprocessor).</p>
<p>You can add <i>external links</i> to web pages with ordinary HTML-style
links, e.g.,</p>
@({
<a href=\"http://www.centtech.com/\">Centaur Technology</a>
})
<p>Produces a link to <a href=\"http://www.centtech.com/\">Centaur
Technology</a>.</p>
<h3>Structuring Documents</h3>
<p>For section headings,</p>
<ul>
<li>@('<h1>') creates the biggest heading:<h1>H1 Example</h1></li>
<li>@('<h2>') the next biggest:<h2>H2 Example</h2></li>
<li>@('<h3>') a medium-sized heading:<h3>H3 Example</h3></li>
<li>@('<h4>') the second smallest:<h4>H4 Example</h4></li>
<li>@('<h5>') the smallest heading:<h5>H5 Example</h5></li>
</ul>
<p>@('<p>') tags should be put around paragraphs.</p>
<blockquote>@('<blockquote>') can be used to create indented paragraphs like
this one. (Let's put enough text here to make it word-wrap. Mumble mumble
mumble. Mumble. Mumble mumble.)</blockquote>
<p>@('<br/>') can be used<br/>
to write haikus and so on<br/>
but is discouraged</p>
<p>Bulleted and numbered lists work as in HTML. The list itself begins with
@('<ul>') (for bulleted lists) or @('<ol>') (for numbered lists). Each list
element is an @('<li>') tag. For instance,</p>
@({
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
})
<p>Produces:</p>
<box>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</box>
<p>You can also use definition lists, which are comprised of @('<dl>'),
@('<dt>'), and @('<dd>') tags. For instance,</p>
@({
<dl>
<dt>Inputs</dt>
<dd><tt>x</tt>, the list we are traversing</dd>
<dd><tt>max</tt>, limit on how many we can accumulate</dd>
<dd><tt>acc</tt>, accumulator for our results</dd>
</dl>
})
<p>Produces:</p>
<box>
<dl>
<dt>Inputs</dt>
<dd><tt>x</tt>, the list we are traversing</dd>
<dd><tt>max</tt>, limit on how many we can accumulate</dd>
<dd><tt>acc</tt>, accumulator for our results</dd>
</dl>
</box>
<p>These framed boxes are generated with the @('<box>') tag.</p>
<p>It's relatively easy to add new tags. We'll probably add some kind of image
support in the future, and maybe other tags that users want.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::MARKUP)))))) (6 RECORD-EXPANSION (DEFXDOC XDOC::PREPROCESSOR :SHORT "In addition to its @(see markup) language, XDOC includes a
preprocessor which can be used to interpret certain directives of the form
@('@(...)')." :LONG "<h3>Functions and Theorems</h3>
<p>To look up function definitions (or pieces of definitions) from the ACL2
world and insert them into your documentation, you can use:</p>
<ul>
<li>@('@(def fn)'), insert the definition of <i>fn</i><br/>
(also works for theorems, macros, ...)</li>
<li>@('@(body fn)'), just the body of <i>fn</i></li>
<li>@('@(formals fn)'), just the formals of <i>fn</i></li>
<li>@('@(measure fn)'), just the measure of <i>fn</i></li>
<li>@('@(call fn)'), a generic function call of <i>fn</i></li>
</ul>
<p>We expect that @('def') and @('body') directives will expand to large code
fragments, so they are automatically wrapped in @('<code>') blocks.</p>
<p>The @('call') directive is automatically wrapped in @('<tt>') tags, i.e.,
@('@(call fib)') might become @('<tt>(fib x)</tt>'). An alternative is to use
@('@(ccall fib)'), for \"code call,\" which inserts @('<code>') tags instead;
this could be more appropriate for functions with many arguments.</p>
<p>The other directives just become plain text, and you can wrap whatever
formatting commands you like around them and use them inline in paragraphs,
etc.</p>
<h3>Adding Examples or Code Fragments</h3>
<p>There's a special syntax to put in \"raw\" text. This is especially
useful for examples and code fragments.</p>
<ul>
<li><tt>@@('...')</tt> inserts @('...') into @('<tt>') tags.</li>
<li><tt>@@({...})</tt> inserts @('...') into @('<code>') tags.</li>
</ul>
<p>These have a special feature for automatically linking to documented topics.
For instance, <tt>@@('consp x')</tt> produces @('(consp x)'), and
<tt>@@({ (consp x) })</tt> produces:</p>
@({
(consp x)
})
<h3>Documentation Links</h3>
<p>The easiest way to link between topics is to use @('@(see name)'), which
expands into a link to @('name'). The text shown to the reader is just the
name of the topic, in lower case. Note also that @('@(csee name)') can be used
for links whose first letter should be capitalized.</p>
<p>For most purposes, @('@(see name)') is adequate and it is also recommended.
Finer-grained control (e.g., changing the link text) is also possible, but then
you have to understand how file names get mangled. The basic story is that
@('@(see name)') expands to:</p>
@({
<see topic=\"mangled-topic-name\">printed-topic-name</see>
})
<p>Where:</p>
<ul>
<li>@('mangled-topic-name') is a canonical, url/file-name friendly,
human-hostile mangling of @('name')'s package and symbol names, and</li>
<li>@('printed-topic-name') is an XML-escaped variant of @('name'), e.g., where
@('<') becomes @('<'), etc.; depending on the package of the current topic's
name, it may or may not include the package portion of @('name').</li>
</ul>
<p>So, to support custom links, we provide</p>
<ul>
<li>@('@(url name)'), which expands to @('mangled-topic-name')</li>
<li>@('@(sym name)'), which expands to @('printed-topic-name')</li>
<li>@('@(csym name)'), like @('sym'), but with the first letter capitalized</li>
</ul>
<p>You can use these to write your own @('<see>') tags. You should probably
<i>never</i> write a @('<see>') tag yourself without using @('@(url ...)').</p>
<h3>Emacs Links</h3>
<p>The @('@(srclink name)') directive inserts a source-code link for users who
have configured their web browser as described in @(see emacs-links).</p>
<p>It is often unnecessary to use @('srclink') directly, because these links
are automatically inserted by @('@(def fn)'). One good reason to use
@('srclink') is to link to macros like @(srclink defxdoc), which often are
written using backquote and hence do not display nicely.</p>
<p>Source links are sometimes inappropriate, e.g., for definitions or theorems
that are generated by macros. You can suppress the automatic source links on
@('def') commands by using @('@(gdef fn)') instead. This stands for
\"generated definition.\"</p>
<h3>Escaping of @</h3>
<p>Since @('@(') is intercepted by the preprocessor, you may occasionally need
to escape it. You can write @('@@') to generate a single @('@') sign.</p>
<p>Besides @('@(') and @('@@'), the preprocessor leaves any other uses of
@('@') in tact. So, most uses of @('@'), such as in email addresses, do not
need to be escaped.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::PREPROCESSOR) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "In addition to its @(see markup) language, XDOC includes a
preprocessor which can be used to interpret certain directives of the form
@('@(...)').") (:LONG . "<h3>Functions and Theorems</h3>
<p>To look up function definitions (or pieces of definitions) from the ACL2
world and insert them into your documentation, you can use:</p>
<ul>
<li>@('@(def fn)'), insert the definition of <i>fn</i><br/>
(also works for theorems, macros, ...)</li>
<li>@('@(body fn)'), just the body of <i>fn</i></li>
<li>@('@(formals fn)'), just the formals of <i>fn</i></li>
<li>@('@(measure fn)'), just the measure of <i>fn</i></li>
<li>@('@(call fn)'), a generic function call of <i>fn</i></li>
</ul>
<p>We expect that @('def') and @('body') directives will expand to large code
fragments, so they are automatically wrapped in @('<code>') blocks.</p>
<p>The @('call') directive is automatically wrapped in @('<tt>') tags, i.e.,
@('@(call fib)') might become @('<tt>(fib x)</tt>'). An alternative is to use
@('@(ccall fib)'), for \"code call,\" which inserts @('<code>') tags instead;
this could be more appropriate for functions with many arguments.</p>
<p>The other directives just become plain text, and you can wrap whatever
formatting commands you like around them and use them inline in paragraphs,
etc.</p>
<h3>Adding Examples or Code Fragments</h3>
<p>There's a special syntax to put in \"raw\" text. This is especially
useful for examples and code fragments.</p>
<ul>
<li><tt>@@('...')</tt> inserts @('...') into @('<tt>') tags.</li>
<li><tt>@@({...})</tt> inserts @('...') into @('<code>') tags.</li>
</ul>
<p>These have a special feature for automatically linking to documented topics.
For instance, <tt>@@('consp x')</tt> produces @('(consp x)'), and
<tt>@@({ (consp x) })</tt> produces:</p>
@({
(consp x)
})
<h3>Documentation Links</h3>
<p>The easiest way to link between topics is to use @('@(see name)'), which
expands into a link to @('name'). The text shown to the reader is just the
name of the topic, in lower case. Note also that @('@(csee name)') can be used
for links whose first letter should be capitalized.</p>
<p>For most purposes, @('@(see name)') is adequate and it is also recommended.
Finer-grained control (e.g., changing the link text) is also possible, but then
you have to understand how file names get mangled. The basic story is that
@('@(see name)') expands to:</p>
@({
<see topic=\"mangled-topic-name\">printed-topic-name</see>
})
<p>Where:</p>
<ul>
<li>@('mangled-topic-name') is a canonical, url/file-name friendly,
human-hostile mangling of @('name')'s package and symbol names, and</li>
<li>@('printed-topic-name') is an XML-escaped variant of @('name'), e.g., where
@('<') becomes @('<'), etc.; depending on the package of the current topic's
name, it may or may not include the package portion of @('name').</li>
</ul>
<p>So, to support custom links, we provide</p>
<ul>
<li>@('@(url name)'), which expands to @('mangled-topic-name')</li>
<li>@('@(sym name)'), which expands to @('printed-topic-name')</li>
<li>@('@(csym name)'), like @('sym'), but with the first letter capitalized</li>
</ul>
<p>You can use these to write your own @('<see>') tags. You should probably
<i>never</i> write a @('<see>') tag yourself without using @('@(url ...)').</p>
<h3>Emacs Links</h3>
<p>The @('@(srclink name)') directive inserts a source-code link for users who
have configured their web browser as described in @(see emacs-links).</p>
<p>It is often unnecessary to use @('srclink') directly, because these links
are automatically inserted by @('@(def fn)'). One good reason to use
@('srclink') is to link to macros like @(srclink defxdoc), which often are
written using backquote and hence do not display nicely.</p>
<p>Source links are sometimes inappropriate, e.g., for definitions or theorems
that are generated by macros. You can suppress the automatic source links on
@('def') commands by using @('@(gdef fn)') instead. This stands for
\"generated definition.\"</p>
<h3>Escaping of @</h3>
<p>Since @('@(') is intercepted by the preprocessor, you may occasionally need
to escape it. You can write @('@@') to generate a single @('@') sign.</p>
<p>Besides @('@(') and @('@@'), the preprocessor leaves any other uses of
@('@') in tact. So, most uses of @('@'), such as in email addresses, do not
need to be escaped.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::PREPROCESSOR)))))) (7 RECORD-EXPANSION (DEFXDOC XDOC::SAVE :SHORT "Saves the XDOC database into files for web browsers, etc." :LONG "<p>Once you have documented your library with @(see defxdoc), you may
wish to create a manual that can be viewed from a web browser.</p>
<h3>Saving a Manual</h3>
<p>The @('xdoc::save') command allows you to export all currently-loaded
documented topics from ACL2. Here's a basic example:</p>
@({
;; get documentation loaded
(include-book \"my-library1\")
(include-book \"my-library2\")
;; save the manual
(xdoc::save \"/home/jared/mylib-manual\")
})
<p>The only required argument is the name of a directory where the
documentation should be saved. If the directory does not exist, it will be
created. If there are files in the directory, they <color rgb=\"#ff0000\">may
be overwritten</color>.</p>
<h3>Types of Manuals</h3>
<p>XDOC can actually generate two kinds of manuals.</p>
<ul>
<li>By default, a @(see fancy-manual) is produced.</li>
<li>Alternately, you can create a @(see classic-manual) by using
@(':type :classic') in your save command.</li> </ul>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::SAVE) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Saves the XDOC database into files for web browsers, etc.") (:LONG . "<p>Once you have documented your library with @(see defxdoc), you may
wish to create a manual that can be viewed from a web browser.</p>
<h3>Saving a Manual</h3>
<p>The @('xdoc::save') command allows you to export all currently-loaded
documented topics from ACL2. Here's a basic example:</p>
@({
;; get documentation loaded
(include-book \"my-library1\")
(include-book \"my-library2\")
;; save the manual
(xdoc::save \"/home/jared/mylib-manual\")
})
<p>The only required argument is the name of a directory where the
documentation should be saved. If the directory does not exist, it will be
created. If there are files in the directory, they <color rgb=\"#ff0000\">may
be overwritten</color>.</p>
<h3>Types of Manuals</h3>
<p>XDOC can actually generate two kinds of manuals.</p>
<ul>
<li>By default, a @(see fancy-manual) is produced.</li>
<li>Alternately, you can create a @(see classic-manual) by using
@(':type :classic') in your save command.</li> </ul>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::SAVE)))))) (8 RECORD-EXPANSION (DEFXDOC XDOC::CLASSIC-MANUAL :PARENTS (XDOC::SAVE) :SHORT "Structure of a @(':type :classic') manual." :LONG "<p>If you run @(see save) with @(':type :classic'), it will write out
a manual in the \"classic\" format. In this case, the resulting manual
directory will include:</p>
<ul>
<li>@('xml/'), a subdirectory with a @('.xml') file for each topic and some
supporting files, and</li>
<li>@('Makefile'), a Makefile for converting these files into other formats,
and</li>
<li>@('preview.html'), a web page that lets you directly view the XML files
using your web browser.</li>
</ul>
<p>Many web browsers can directly display XML files, so you may be able to view
@('preview.html') without any additional steps.</p>
<h3>HTML and Other Formats</h3>
<p>You can generate a plain HTML or TEXT version of your manual by using
@('make html') or @('make text') from within the directory target of the above
mentioned @('xdoc::save') command (in this example, the @('mylib-manual')
directory). We might add support for TEXINFO or other formats in the
future.</p>
<p>After running @('make html'), you may wish to open @('frames2.html') and
@('frames3.html'), which allow you to navigate the HTML manual much like
@('preview.html') allows you to navigate the XML version. These pages accept
an optional argument named <tt>topic</tt> that tells the browser to
automatically go to a particular topic. For example, one can go to the
<tt>XDOC::save</tt> topic by using the url
<tt>frames3.html?topic=XDOC____SAVE.html</tt>.</p>
<p>Converting to HTML is a good idea because it ensures that all of your tags
are balanced on every page. Without this sanity check, your manual might
contain errors that will prevent some topics from being loaded in a web
browser.</p>
<p>Creating the HTML code requires Xalan-C++. Xalan is distributed with many
Linux distributions. For example, on Ubuntu, one can run <tt>sudo apt-get
install xalan</tt> to install it. Alternatively, see <a
href=\"http://xml.apache.org/xalan-c/\">Apache Xalan</a> to download. We have
accomodated the various versions of Xalan that we know about and use, but we
welcome modifications to file <tt>support/Makefile-trans</tt> if you wish to
use a version we do not currently support.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::CLASSIC-MANUAL) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC::SAVE) (:SHORT . "Structure of a @(':type :classic') manual.") (:LONG . "<p>If you run @(see save) with @(':type :classic'), it will write out
a manual in the \"classic\" format. In this case, the resulting manual
directory will include:</p>
<ul>
<li>@('xml/'), a subdirectory with a @('.xml') file for each topic and some
supporting files, and</li>
<li>@('Makefile'), a Makefile for converting these files into other formats,
and</li>
<li>@('preview.html'), a web page that lets you directly view the XML files
using your web browser.</li>
</ul>
<p>Many web browsers can directly display XML files, so you may be able to view
@('preview.html') without any additional steps.</p>
<h3>HTML and Other Formats</h3>
<p>You can generate a plain HTML or TEXT version of your manual by using
@('make html') or @('make text') from within the directory target of the above
mentioned @('xdoc::save') command (in this example, the @('mylib-manual')
directory). We might add support for TEXINFO or other formats in the
future.</p>
<p>After running @('make html'), you may wish to open @('frames2.html') and
@('frames3.html'), which allow you to navigate the HTML manual much like
@('preview.html') allows you to navigate the XML version. These pages accept
an optional argument named <tt>topic</tt> that tells the browser to
automatically go to a particular topic. For example, one can go to the
<tt>XDOC::save</tt> topic by using the url
<tt>frames3.html?topic=XDOC____SAVE.html</tt>.</p>
<p>Converting to HTML is a good idea because it ensures that all of your tags
are balanced on every page. Without this sanity check, your manual might
contain errors that will prevent some topics from being loaded in a web
browser.</p>
<p>Creating the HTML code requires Xalan-C++. Xalan is distributed with many
Linux distributions. For example, on Ubuntu, one can run <tt>sudo apt-get
install xalan</tt> to install it. Alternatively, see <a
href=\"http://xml.apache.org/xalan-c/\">Apache Xalan</a> to download. We have
accomodated the various versions of Xalan that we know about and use, but we
welcome modifications to file <tt>support/Makefile-trans</tt> if you wish to
use a version we do not currently support.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::CLASSIC-MANUAL)))))) (9 RECORD-EXPANSION (DEFXDOC XDOC::FANCY-MANUAL :PARENTS (XDOC::SAVE) :SHORT "Structure of a @(':type :fancy') manual." :LONG "<p>By default, @(see save) will create a manual in the new, \"fancy\"
format, which extensively uses JavaScript to provide rich documentation with
dynamic navigation, quick jump-to links, and so forth.</p>
<p>In many ways, a fancy manual is simpler than a @(see classic-manual).
Instead of generating thousands of files ahead of time, we basically just write
the XDOC database out into JSON format and then use JavaScript to do all of the
layout and organization.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::FANCY-MANUAL) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC::SAVE) (:SHORT . "Structure of a @(':type :fancy') manual.") (:LONG . "<p>By default, @(see save) will create a manual in the new, \"fancy\"
format, which extensively uses JavaScript to provide rich documentation with
dynamic navigation, quick jump-to links, and so forth.</p>
<p>In many ways, a fancy manual is simpler than a @(see classic-manual).
Instead of generating thousands of files ahead of time, we basically just write
the XDOC database out into JSON format and then use JavaScript to do all of the
layout and organization.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::FANCY-MANUAL)))))) (10 RECORD-EXPANSION (DEFXDOC XDOC::EMACS-LINKS :SHORT "Instructions for integrating XDOC web pages with <a
href='http://www.gnu.org/software/emacs/'>Emacs</a>." :LONG "<p>@(csee preprocessor) directives such as @('@(def get-xdoc-table)')
result in the introduction of special links for Emacs. Here's what these links
look like:</p>
@(def get-xdoc-table)
<p>Depending on your environment, it <b>may</b> be easy to configure your web
browser so that clicking on these links will cause Emacs to directly open up
the appropriate source file and jump to the named function.</p>
<p>The basic idea is:</p>
<ul>
<li>Each Emacs link generates a <a
href='https://en.wikipedia.org/wiki/Data_URI_scheme'>Data URIs</a> that tells
your web browser to download a new, generated file whose <a
href='https://en.wikipedia.org/wiki/Internet_media_type'>MIME type</a> is
@('application/x-acl2-xdoc-link').</li>
<li>You configure your web browser to send @('application/x-acl2-xdoc-link')
files to Emacs.</li>
<li>You configure your Emacs to carry out a tags search instead of loading
these files.</li>
</ul>
<p>The net effect is that clicking on these links will send you directly to the
desired function in the source code. This is <b>really slick</b> if you can
get it working.</p>
<h2>Configuring Emacs</h2>
<h4>Loading the XDOC Elisp</h4>
<p>The XDOC directory includes a file called @('xdoc.el'), which tells emacs
what to do with these xdoc-link files. To tell emacs to load this file at
startup, you can just add a command to your @('.emacs') file like:</p>
@({
(load \"/path/to/acl2/books/xdoc/xdoc.el\")
})
<h4>Managing your TAGS tables</h4>
<p>For emacs to make sense of the links you follow, it will need to have the
appropriate <a
href=\"http://www.gnu.org/software/emacs/manual/html_node/emacs/Tags.html\">tags
tables</a> loaded for all of the libraries you are using.</p>
<p>If you aren't familiar with tags, you basically just need to:</p>
<ul>
<li>Occasionally generate @('TAGS') files for your libraries, using the command
@('etags *.lisp') or similar.</li>
<li>Tell Emacs to \"visit\" these tags tables with @('visit-tags-table').</li>
</ul>
<h5>Jared's Approach:</h5>
<ul>
<li>I add a @('TAGS') target to my Makefiles, so that when I build my library
the @('etags *.lisp') command is re-run and the @('TAGS') file is kept up to
date. The Makefile syntax is:
@({
TAGS: $(wildcard *.lisp)
etags *.lisp
})</li>
<li>Then, in my @('.emacs') file, I have a series of commands like the
following:
@({
(ignore-errors (visit-tags-table \"/path/to/acl2/TAGS\"))
(ignore-errors (visit-tags-table \"/path/to/acl2/books/xdoc/TAGS\"))
(ignore-errors (visit-tags-table \"/path/to/my/stuff/TAGS\"))
})
This ensures that the relevant @('TAGS') files are loaded every time I start
Emacs. The use of @('ignore-errors') prevents Emacs from complaining if one of
these @('TAGS') files was deleted in a \"make clean\" or similar.</li>
<li>One final addition to the @('.emacs') file is:
@({
(setq tags-revert-without-query t)
})
which tells Emacs to go ahead and reload these files when they are rebuilt by
Make, instead of prompting you if you want to reload them.</li>
</ul>
<h4>Setting up Emacsclient (recommended)</h4>
<p>You can set things up so that links open up in <b>new instances</b> of
Emacs, or in <b>new buffers</b> of an already-running Emacs.</p>
<p>If you want everything to open up in a new instance of Emacs, you can skip
this section. But I prefer to use a single Emacs for everything, and just have
links open up in new buffers.</p>
<p>This is quite easy. First, add @('(server-start)') to your @('.emacs') file
and restart Emacs.</p>
<p>Next, to ensure everything is working properly, launch a separate terminal
and type:</p>
@({
emacsclient --no-wait my-file
})
<p>If all is well, @('my-file') will be loaded into your already-running emacs
as a new buffer.</p>
<h2>Configuring the Web Browser</h2>
<p>The last thing we need to do is instruct your web browser to send xdoc-link
files to Emacs.</p>
<p>How to do this depends on your web browser and/or operating system. In some
cases it may be hard to pass command-line options to emacs directly, so you may
find it useful to use the script @('emacsclient-wrapper.sh'), found in the xdoc
directory.</p>
<p>The basic starting point is probably to try to click on an emacs link like
@(srclink append) and try to tell your browser to open it with the
@('emacsclient-wrapper.sh') script. If your browser opens it with some other
program, you might need to edit the default file associations of your operating
system or window manager.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::EMACS-LINKS) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Instructions for integrating XDOC web pages with <a
href='http://www.gnu.org/software/emacs/'>Emacs</a>.") (:LONG . "<p>@(csee preprocessor) directives such as @('@(def get-xdoc-table)')
result in the introduction of special links for Emacs. Here's what these links
look like:</p>
@(def get-xdoc-table)
<p>Depending on your environment, it <b>may</b> be easy to configure your web
browser so that clicking on these links will cause Emacs to directly open up
the appropriate source file and jump to the named function.</p>
<p>The basic idea is:</p>
<ul>
<li>Each Emacs link generates a <a
href='https://en.wikipedia.org/wiki/Data_URI_scheme'>Data URIs</a> that tells
your web browser to download a new, generated file whose <a
href='https://en.wikipedia.org/wiki/Internet_media_type'>MIME type</a> is
@('application/x-acl2-xdoc-link').</li>
<li>You configure your web browser to send @('application/x-acl2-xdoc-link')
files to Emacs.</li>
<li>You configure your Emacs to carry out a tags search instead of loading
these files.</li>
</ul>
<p>The net effect is that clicking on these links will send you directly to the
desired function in the source code. This is <b>really slick</b> if you can
get it working.</p>
<h2>Configuring Emacs</h2>
<h4>Loading the XDOC Elisp</h4>
<p>The XDOC directory includes a file called @('xdoc.el'), which tells emacs
what to do with these xdoc-link files. To tell emacs to load this file at
startup, you can just add a command to your @('.emacs') file like:</p>
@({
(load \"/path/to/acl2/books/xdoc/xdoc.el\")
})
<h4>Managing your TAGS tables</h4>
<p>For emacs to make sense of the links you follow, it will need to have the
appropriate <a
href=\"http://www.gnu.org/software/emacs/manual/html_node/emacs/Tags.html\">tags
tables</a> loaded for all of the libraries you are using.</p>
<p>If you aren't familiar with tags, you basically just need to:</p>
<ul>
<li>Occasionally generate @('TAGS') files for your libraries, using the command
@('etags *.lisp') or similar.</li>
<li>Tell Emacs to \"visit\" these tags tables with @('visit-tags-table').</li>
</ul>
<h5>Jared's Approach:</h5>
<ul>
<li>I add a @('TAGS') target to my Makefiles, so that when I build my library
the @('etags *.lisp') command is re-run and the @('TAGS') file is kept up to
date. The Makefile syntax is:
@({
TAGS: $(wildcard *.lisp)
etags *.lisp
})</li>
<li>Then, in my @('.emacs') file, I have a series of commands like the
following:
@({
(ignore-errors (visit-tags-table \"/path/to/acl2/TAGS\"))
(ignore-errors (visit-tags-table \"/path/to/acl2/books/xdoc/TAGS\"))
(ignore-errors (visit-tags-table \"/path/to/my/stuff/TAGS\"))
})
This ensures that the relevant @('TAGS') files are loaded every time I start
Emacs. The use of @('ignore-errors') prevents Emacs from complaining if one of
these @('TAGS') files was deleted in a \"make clean\" or similar.</li>
<li>One final addition to the @('.emacs') file is:
@({
(setq tags-revert-without-query t)
})
which tells Emacs to go ahead and reload these files when they are rebuilt by
Make, instead of prompting you if you want to reload them.</li>
</ul>
<h4>Setting up Emacsclient (recommended)</h4>
<p>You can set things up so that links open up in <b>new instances</b> of
Emacs, or in <b>new buffers</b> of an already-running Emacs.</p>
<p>If you want everything to open up in a new instance of Emacs, you can skip
this section. But I prefer to use a single Emacs for everything, and just have
links open up in new buffers.</p>
<p>This is quite easy. First, add @('(server-start)') to your @('.emacs') file
and restart Emacs.</p>
<p>Next, to ensure everything is working properly, launch a separate terminal
and type:</p>
@({
emacsclient --no-wait my-file
})
<p>If all is well, @('my-file') will be loaded into your already-running emacs
as a new buffer.</p>
<h2>Configuring the Web Browser</h2>
<p>The last thing we need to do is instruct your web browser to send xdoc-link
files to Emacs.</p>
<p>How to do this depends on your web browser and/or operating system. In some
cases it may be hard to pass command-line options to emacs directly, so you may
find it useful to use the script @('emacsclient-wrapper.sh'), found in the xdoc
directory.</p>
<p>The basic starting point is probably to try to click on an emacs link like
@(srclink append) and try to tell your browser to open it with the
@('emacsclient-wrapper.sh') script. If your browser opens it with some other
program, you might need to edit the default file associations of your operating
system or window manager.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::EMACS-LINKS)))))) (11 RECORD-EXPANSION (DEFXDOC XDOC::GO.XDOC-LINK :PARENTS (XDOC::EMACS-LINKS) :SHORT "Trivial web service provided by @('fv.centtech.com') for resolving
@(see emacs-links)." :LONG "<p>Historically, @(see emacs-links) were implemented by writing out a
separate @('xdoc-link') file for every tags-search that we wanted to support.
To avoid writing out these thousands of files, we now just implement a simple
web service at @('fv.centtech.com').</p>
<p>The basic idea is that if you just go to:</p>
@('http://fv.centtech.com/cgi-bin/go.xdoc-link?name=append')
<p>Then it will generate an appropriate @('.xdoc-link') file that is flagged
with the right mime-type.</p>
<p>If you prefer to use your own web server, you can recreate this service by
putting the following, trivial script into your cgi-bin:</p>
@({
#!/usr/bin/perl
use warnings;
use strict;
use CGI qw(:standard);
my $name = param(\"name\") || \"APPEND\";
$| = 1;
print <<END;
Content-Type: application/x-acl2-xdoc-link .xdoc-link
; This is an XDOC Link file.
; Ordinarily, you should not see this file.
;
; If you are viewing this file in a web browser, you probably
; have not configured your web browser to send .xdoc-link files
; to Emacs.
;
; If you are viewing this file in Emacs, you probably have not
; loaded xdoc.el from the xdoc/ directory.
;
; Please see the XDOC manual for more information.
$name
END
})") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::GO.XDOC-LINK) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC::EMACS-LINKS) (:SHORT . "Trivial web service provided by @('fv.centtech.com') for resolving
@(see emacs-links).") (:LONG . "<p>Historically, @(see emacs-links) were implemented by writing out a
separate @('xdoc-link') file for every tags-search that we wanted to support.
To avoid writing out these thousands of files, we now just implement a simple
web service at @('fv.centtech.com').</p>
<p>The basic idea is that if you just go to:</p>
@('http://fv.centtech.com/cgi-bin/go.xdoc-link?name=append')
<p>Then it will generate an appropriate @('.xdoc-link') file that is flagged
with the right mime-type.</p>
<p>If you prefer to use your own web server, you can recreate this service by
putting the following, trivial script into your cgi-bin:</p>
@({
#!/usr/bin/perl
use warnings;
use strict;
use CGI qw(:standard);
my $name = param(\"name\") || \"APPEND\";
$| = 1;
print <<END;
Content-Type: application/x-acl2-xdoc-link .xdoc-link
; This is an XDOC Link file.
; Ordinarily, you should not see this file.
;
; If you are viewing this file in a web browser, you probably
; have not configured your web browser to send .xdoc-link files
; to Emacs.
;
; If you are viewing this file in Emacs, you probably have not
; loaded xdoc.el from the xdoc/ directory.
;
; Please see the XDOC manual for more information.
$name
END
})") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::GO.XDOC-LINK)))))) (12 RECORD-EXPANSION (DEFXDOC XDOC::EXTRACT-KEYWORD-FROM-ARGS :PARENTS (DEFSECTION) :SHORT "Get the value for a keyword argument like @(':foo value')." :LONG "<p>@(call extract-keyword-from-args) is given @('kwd'), which should
be a keyword symbol, and a list of @('args') which are typically the @('&rest
args') given to a macro. It scans the list of @('args'), looking for the
indicated keyword, and returns @('(kwd . value)'), or @('nil') if no such
keyword is found. For instance,</p>
@({
(extract-keyword-from-args :bar '(:foo 3 :bar 5 :baz 7))
-->
(:bar . 5)
})
<p>This function is mainly useful for writing macros that mix @('&rest') parts
with keyword arguments. See also @(see throw-away-keyword-parts).</p>
@(def extract-keyword-from-args)") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::EXTRACT-KEYWORD-FROM-ARGS) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS DEFSECTION) (:SHORT . "Get the value for a keyword argument like @(':foo value').") (:LONG . "<p>@(call extract-keyword-from-args) is given @('kwd'), which should
be a keyword symbol, and a list of @('args') which are typically the @('&rest
args') given to a macro. It scans the list of @('args'), looking for the
indicated keyword, and returns @('(kwd . value)'), or @('nil') if no such
keyword is found. For instance,</p>
@({
(extract-keyword-from-args :bar '(:foo 3 :bar 5 :baz 7))
-->
(:bar . 5)
})
<p>This function is mainly useful for writing macros that mix @('&rest') parts
with keyword arguments. See also @(see throw-away-keyword-parts).</p>
@(def extract-keyword-from-args)") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::EXTRACT-KEYWORD-FROM-ARGS)))))) (13 RECORD-EXPANSION (DEFXDOC XDOC::THROW-AWAY-KEYWORD-PARTS :PARENTS (DEFSECTION) :SHORT "Throw away any keyword arguments and their values from a macro
argument list." :LONG "<p>@(call throw-away-keyword-parts) is given a list of arguments that
are typically the @('&rest args') given to a macro. It scans the arguments for
any keyword symbols such as @(':foo'), and throws away both the keyword and the
argument that follows it. For instance,</p>
@({
(throw-away-keyword-parts '(x y z :foo 3 :bar 5 blah blah blah))
-->
'(x y z blah blah blah)
})
<p>This function is mainly useful for writing macros that mix @('&rest') parts
with keyword arguments. See also @(see extract-keyword-from-args).</p>
@(def throw-away-keyword-parts)") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::THROW-AWAY-KEYWORD-PARTS) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS DEFSECTION) (:SHORT . "Throw away any keyword arguments and their values from a macro
argument list.") (:LONG . "<p>@(call throw-away-keyword-parts) is given a list of arguments that
are typically the @('&rest args') given to a macro. It scans the arguments for
any keyword symbols such as @(':foo'), and throws away both the keyword and the
argument that follows it. For instance,</p>
@({
(throw-away-keyword-parts '(x y z :foo 3 :bar 5 blah blah blah))
-->
'(x y z blah blah blah)
})
<p>This function is mainly useful for writing macros that mix @('&rest') parts
with keyword arguments. See also @(see extract-keyword-from-args).</p>
@(def throw-away-keyword-parts)") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::THROW-AWAY-KEYWORD-PARTS)))))) (14 RECORD-EXPANSION (DEFXDOC DEFSECTION :SHORT "Fancy @('(encapsulate nil ...)') with a name and @(see xdoc)
support." :LONG "<p>The main reasons to use @('defsection') instead of @('(encapsulate
nil ...)')</p>
<ul>
<li>It is easier to identify in the @(':pbt') history,</li>
<li>It indents more nicely than @('encapsulate') in a vanilla emacs,</li>
<li>It settles the question of where to put the @(see defxdoc) command, and</li>
<li>It can automatically add the definitions/theorems you supply into the
documentation for your section.</li>
</ul>
<p>General form:</p>
@({
(defsection name
[:parents parents]
[:short short]
[:long long]
[:autodoc autodoc]
[:extension topic]
... events ...)
})
<p>Example:</p>
@({
(defsection foo
:parents (parent1 parent2 ...)
:short \"@(call foo) is like @(see bar), but better when...\"
:long \"<p>The main differences between @('foo') and @('bar') are ...</p>\"
(defund foo (x) ...)
(local (in-theory (enable foo)))
(defthm foo-thm1 ...)
(defthm foo-thm2 ...))
})
<box><p>Note: this example might be better written as a @(see cutil::define),
which is much like a @('defsection') but has additional features.</p></box>
<h3>Ordinary Sections</h3>
<p>The @(':parents'), @(':short'), and @(':long') keywords are optional. If
any of these keywords are provided, they will be used to introduce a @(see
defxdoc) command; otherwise no documentation will be generated.</p>
<p>By default, the @(':long') string you give will be automatically extended
with a \"Definitions and Theorems\" part that lists all the (non-local)
definitions and theorems introduced in the section. This makes it easy to keep
the documentation up-to-date as you add and remove theorems to the section. In
the above example, the @(':long') field would be extended with:</p>
@({
<h3>Definition and Theorems</h3>
@(def foo)
@(thm foo-thm1)
@(thm foo-thm2)
})
<p>If you do not want this automatic documentation, you can turn it off with
@(':autodoc nil').</p>
<h3>Extended Sections</h3>
<p>The @(':extension') keyword allows you to say that this section is a
continuation of a previously introduced concept. When @(':extension topic') is
provided, then @('topic') must be the name of a previously documented @(see
xdoc) section, and you are not allowed to use @(':parents') or @(':short')
since the topic already exists.</p>
<p>The main purpose of an @(':extension') section is to add additional
documentation, either via the @(':long') string or via the automatic
documentation generation features of @('defsection'). The documentation
obtained this way is just appended onto the existing @(':long') for the
topic.</p>
<p>For example, if we have already given the section @('foo') with basic
theorems, above we now want to add a bunch of additional \"advanced\" theorems
about it, we might write something like this:</p>
@({
(defsection advanced-theorems-about-foo
:extension foo
(defthm foo-thm3 ...)
(defthm foo-thm4 ...))
})
<p>This will then append the definitions of @('foo-thm3') and @('foo-thm4')
onto the end of the documentation for @('foo').</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . DEFSECTION) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Fancy @('(encapsulate nil ...)') with a name and @(see xdoc)
support.") (:LONG . "<p>The main reasons to use @('defsection') instead of @('(encapsulate
nil ...)')</p>
<ul>
<li>It is easier to identify in the @(':pbt') history,</li>
<li>It indents more nicely than @('encapsulate') in a vanilla emacs,</li>
<li>It settles the question of where to put the @(see defxdoc) command, and</li>
<li>It can automatically add the definitions/theorems you supply into the
documentation for your section.</li>
</ul>
<p>General form:</p>
@({
(defsection name
[:parents parents]
[:short short]
[:long long]
[:autodoc autodoc]
[:extension topic]
... events ...)
})
<p>Example:</p>
@({
(defsection foo
:parents (parent1 parent2 ...)
:short \"@(call foo) is like @(see bar), but better when...\"
:long \"<p>The main differences between @('foo') and @('bar') are ...</p>\"
(defund foo (x) ...)
(local (in-theory (enable foo)))
(defthm foo-thm1 ...)
(defthm foo-thm2 ...))
})
<box><p>Note: this example might be better written as a @(see cutil::define),
which is much like a @('defsection') but has additional features.</p></box>
<h3>Ordinary Sections</h3>
<p>The @(':parents'), @(':short'), and @(':long') keywords are optional. If
any of these keywords are provided, they will be used to introduce a @(see
defxdoc) command; otherwise no documentation will be generated.</p>
<p>By default, the @(':long') string you give will be automatically extended
with a \"Definitions and Theorems\" part that lists all the (non-local)
definitions and theorems introduced in the section. This makes it easy to keep
the documentation up-to-date as you add and remove theorems to the section. In
the above example, the @(':long') field would be extended with:</p>
@({
<h3>Definition and Theorems</h3>
@(def foo)
@(thm foo-thm1)
@(thm foo-thm2)
})
<p>If you do not want this automatic documentation, you can turn it off with
@(':autodoc nil').</p>
<h3>Extended Sections</h3>
<p>The @(':extension') keyword allows you to say that this section is a
continuation of a previously introduced concept. When @(':extension topic') is
provided, then @('topic') must be the name of a previously documented @(see
xdoc) section, and you are not allowed to use @(':parents') or @(':short')
since the topic already exists.</p>
<p>The main purpose of an @(':extension') section is to add additional
documentation, either via the @(':long') string or via the automatic
documentation generation features of @('defsection'). The documentation
obtained this way is just appended onto the existing @(':long') for the
topic.</p>
<p>For example, if we have already given the section @('foo') with basic
theorems, above we now want to add a bunch of additional \"advanced\" theorems
about it, we might write something like this:</p>
@({
(defsection advanced-theorems-about-foo
:extension foo
(defthm foo-thm3 ...)
(defthm foo-thm4 ...))
})
<p>This will then append the definitions of @('foo-thm3') and @('foo-thm4')
onto the end of the documentation for @('foo').</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC DEFSECTION)))))) (15 RECORD-EXPANSION (DEFXDOC DEFSECTION-PROGN :SHORT "Fancy @('(progn ...)') with a name and @(see xdoc) support." :LONG "<p>The @('defsection-progn') macro is like @(see defsection) except
that it generates @({(progn ...)}) instead of an @({(encapsulate nil ...)})</p>
<p>This has a number of consequences, mostly having to do with the scope of
@('local') events within the section. In short, a @('defsection-progn') does
not introduce a new local scope, but a @('defsection') does.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . DEFSECTION-PROGN) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Fancy @('(progn ...)') with a name and @(see xdoc) support.") (:LONG . "<p>The @('defsection-progn') macro is like @(see defsection) except
that it generates @({(progn ...)}) instead of an @({(encapsulate nil ...)})</p>
<p>This has a number of consequences, mostly having to do with the scope of
@('local') events within the section. In short, a @('defsection-progn') does
not introduce a new local scope, but a @('defsection') does.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC DEFSECTION-PROGN)))))) (16 RECORD-EXPANSION (DEFXDOC UNDOCUMENTED :SHORT "Placeholder for undocumented topics.") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . UNDOCUMENTED) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Placeholder for undocumented topics.") (:LONG) (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC UNDOCUMENTED)))))) (17 RECORD-EXPANSION (DEFXDOC XDOC::TEST-OF-ENTITIES :SHORT "Placeholder topic for testing out HTML entity support in XDOC." :LONG "<p>Here are the entities that XDOC allows:</p>
<p>Normal XML entities:</p>
<ul>
<li>@('&') becomes &</li>
<li>@('<') becomes <</li>
<li>@('>') becomes ></li>
<li>@('"') becomes "</li>
<li>@(''') becomes '</li>
</ul>
<p>Additional entities allowed by XDOC:</p>
<ul>
<li>@(' ') becomes (this one can be hard to see)</li>
<li>@('—') becomes —</li>
<li>@('→') becomes →</li>
</ul>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . XDOC::TEST-OF-ENTITIES) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Placeholder topic for testing out HTML entity support in XDOC.") (:LONG . "<p>Here are the entities that XDOC allows:</p>
<p>Normal XML entities:</p>
<ul>
<li>@('&') becomes &</li>
<li>@('<') becomes <</li>
<li>@('>') becomes ></li>
<li>@('"') becomes "</li>
<li>@(''') becomes '</li>
</ul>
<p>Additional entities allowed by XDOC:</p>
<ul>
<li>@(' ') becomes (this one can be hard to see)</li>
<li>@('—') becomes —</li>
<li>@('→') becomes →</li>
</ul>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC XDOC::TEST-OF-ENTITIES)))))) (18 RECORD-EXPANSION (DEFXDOC SET-DEFAULT-PARENTS :SHORT "Set up default parents to use for @(see xdoc)." :LONG "<p>When documenting a book of inter-related functions, you may
sometimes wish to use the same @(':parents') across many @(see defxdoc) or
@(see defsection) commands. This can sometimes get tedious.</p>
<p>The macro @(call set-default-parents) can be used to set up a default list
of parent topics to be automatically used by commands such as @(see defxdoc)
and @(see defsection).</p>
<p>Basic Example:</p>
@({
(local (set-default-parents fox-p))
(defxdoc make-fox ;; use default :parents, (fox-p)
:short ...
:long ...)
(defsection feed-fox ;; use default :parents, (fox-p)
:short ...
:long ...)
(defsection chase-mouse ;; use explicit :parents, (fox-p mouse-p)
:parents (fox-p mouse-p)
:short ...
:long ...)
(local (set-default-parents fox-p hawk-p))
(defsection bother-hawk ;; use default :parents, (fox-p hawk-p)
:short ...
:long ...)
(local (set-default-parents nil))
(defxdoc zebra-p ;; use default :parents, nil
:short ...
:long ...)
})
<p>Note that @('set-default-parents') is just a macro that expands to a @(see
table) event. It's good practice to only <b>locally</b> set the default
parents—otherwise the default parents can \"leak\" from your book and
lead you to inadvertently set the parents of other, unrelated topics.</p>") (WITH-OUTPUT :OFF (EVENT SUMMARY) (PROGN (TABLE XDOC (QUOTE DOC) (CONS (QUOTE ((:NAME . SET-DEFAULT-PARENTS) (:BASE-PKG . XDOC::ACL2-PKG-WITNESS) (:PARENTS XDOC) (:SHORT . "Set up default parents to use for @(see xdoc).") (:LONG . "<p>When documenting a book of inter-related functions, you may
sometimes wish to use the same @(':parents') across many @(see defxdoc) or
@(see defsection) commands. This can sometimes get tedious.</p>
<p>The macro @(call set-default-parents) can be used to set up a default list
of parent topics to be automatically used by commands such as @(see defxdoc)
and @(see defsection).</p>
<p>Basic Example:</p>
@({
(local (set-default-parents fox-p))
(defxdoc make-fox ;; use default :parents, (fox-p)
:short ...
:long ...)
(defsection feed-fox ;; use default :parents, (fox-p)
:short ...
:long ...)
(defsection chase-mouse ;; use explicit :parents, (fox-p mouse-p)
:parents (fox-p mouse-p)
:short ...
:long ...)
(local (set-default-parents fox-p hawk-p))
(defsection bother-hawk ;; use default :parents, (fox-p hawk-p)
:short ...
:long ...)
(local (set-default-parents nil))
(defxdoc zebra-p ;; use default :parents, nil
:short ...
:long ...)
})
<p>Note that @('set-default-parents') is just a macro that expands to a @(see
table) event. It's good practice to only <b>locally</b> set the default
parents—otherwise the default parents can \"leak\" from your book and
lead you to inadvertently set the parents of other, unrelated topics.</p>") (:FROM . "[books]/xdoc/topics.lisp"))) (XDOC::GET-XDOC-TABLE WORLD))) (VALUE-TRIPLE (QUOTE (DEFXDOC SET-DEFAULT-PARENTS)))))))
(("/usr/share/acl2-6.3/books/centaur/bridge/portcullis.lisp" "centaur/bridge/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 661758845) ("/usr/share/acl2-6.3/books/oslib/portcullis.lisp" "oslib/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 197838065) ("/usr/share/acl2-6.3/books/std/osets/portcullis.lisp" "std/osets/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1689687557) ("/usr/share/acl2-6.3/books/xdoc/portcullis.lisp" "xdoc/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1473208573) ("/usr/share/acl2-6.3/books/str/portcullis.lisp" "str/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 2077071243))
(("/usr/share/acl2-6.3/books/xdoc/topics.lisp" "topics" "topics" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 912747616) ("/usr/share/acl2-6.3/books/xdoc/import-acl2doc.lisp" "import-acl2doc" "import-acl2doc" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1928793510) ("/usr/share/acl2-6.3/books/tools/bstar.lisp" "tools/bstar" "bstar" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1482974359) ("/usr/share/acl2-6.3/books/tools/pack.lisp" "pack" "pack" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1797170439) ("/usr/share/acl2-6.3/books/system/origin.lisp" "system/origin" "origin" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1321433970) ("/usr/share/acl2-6.3/books/xdoc/top.lisp" "xdoc/top" "top" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1214825095) ("/usr/share/acl2-6.3/books/xdoc/book-thms.lisp" "book-thms" "book-thms" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1105796063) ("/usr/share/acl2-6.3/books/xdoc/base.lisp" "base" "base" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 454271148) ("/usr/share/acl2-6.3/books/xdoc/portcullis.lisp" "portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1473208573) ("/usr/share/acl2-6.3/books/xdoc/write-acl2-xdoc.lisp" "write-acl2-xdoc" "write-acl2-xdoc" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 962390655) ("/usr/share/acl2-6.3/books/centaur/bridge/portcullis.lisp" "centaur/bridge/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 661758845) ("/usr/share/acl2-6.3/books/oslib/portcullis.lisp" "oslib/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 197838065) ("/usr/share/acl2-6.3/books/std/osets/portcullis.lisp" "std/osets/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1689687557) ("/usr/share/acl2-6.3/books/xdoc/portcullis.lisp" "xdoc/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 1473208573) ("/usr/share/acl2-6.3/books/str/portcullis.lisp" "str/portcullis" "portcullis" ((:SKIPPED-PROOFSP) (:AXIOMSP) (:TTAGS)) . 2077071243))
2132316512
|