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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08+5 of 2005-11-30">
<STYLE type="text/css">
.toc{list-style:none;}
.title{margin:auto;text-align:center}
.center{text-align:center;margin-left:auto;margin-right:auto;}
.flushleft{text-align:left;margin-left:0ex;margin-right:auto;}
.flushright{text-align:right;margin-left:auto;margin-right:0ex;}
DIV TABLE{margin-left:inherit;margin-right:inherit;}
PRE{text-align:left;margin-left:0ex;margin-right:auto;}
BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
.part{margin:auto;text-align:center}
</STYLE>
</HEAD>
<BODY >
<!--HEVEA command line is: /usr/local/bin/hevea -entities -I /home/remy/lib/tex -exec xxdate.exe -fix -o whizzytex.html manual.tex -->
<!--HTMLHEAD-->
<!--ENDHTML-->
<!--PREFIX <ARG ></ARG>-->
<!--CUT DEF section 1 -->
<link rel="Top" href="index.html">
<link rel="Up" href="#htoc">
<link rel="Contents" href="#htoc">
<link rel="Section" title="Installation" href="#install">
<link rel="Section" title="Using WhizzyTeX" href="#using">
<link rel="Section" title="Manual" href="#manual">
<link rel="Section" title="Viewers" href="#viewers">
<link rel="Section" title="Customizing" href="#custom">
<link rel="Section" title="WhizzyEditing" href="#edit">
<link rel="Section" title="Implementation" href="#impl">
<BR>
<TABLE CLASS="title">
<TR><TD>
<H1 CLASS="titlemain">
<FONT SIZE=6><B><FONT COLOR="blue">WhizzyT<sub>E</sub>X</FONT></B></FONT><SUP><A NAME="text1" HREF="#note1"><FONT SIZE=6>1</FONT></A></SUP><BR>
<EM>An <B>Emacs</B> minor-mode<BR>
for <B>incremental viewing of</B><BR>
<B>L<sup>A</sup>T<sub>E</sub>X documents</B>
</EM>
</H1>
<H3 CLASS="titlerest">Didier Rmy</H3>
<H3 CLASS="titlerest">Version 1.3.0, January 12, 2006</H3></TD>
</TR></TABLE>
<BLOCKQUOTE CLASS="abstract"><B>Abstract: </B>
<B><FONT COLOR="blue">WhizzyT<sub>E</sub>X</FONT></B>
is an Emacs minor mode for incrementally
viewing L<sup>A</sup>T<sub>E</sub>X documents that you are editing.
It works under Unix with <TT>gv</TT> and <TT>xdvi</TT> viewers, but
the <A HREF="http://pauillac.inria.fr/advi/">ActiveDVI</A> viewer will
provide much better visual effects and offer more functionalities.<BR>
<BR>
In addition, when used with ActiveDVI, <B><FONT COLOR="blue">WhizzyT<sub>E</sub>X</FONT></B> allows for mouse
edition of dimensions and floats, which can be used to adjust spaces,
move or resize objects visually.
</BLOCKQUOTE>
<!--TOC section Contents-->
<H2 CLASS="section">Contents</H2><!--SEC END -->
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc1">1 Installation</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc2">1.1 Requirements</A>
<LI CLASS="li-toc"><A HREF="#htoc3">1.2 Get the source</A>
<LI CLASS="li-toc"><A HREF="#htoc4">1.3 Warning!</A>
<LI CLASS="li-toc"><A HREF="#htoc5">1.4 Automatic installation</A>
<LI CLASS="li-toc"><A HREF="#htoc6">1.5 Customizing the installation</A>
<LI CLASS="li-toc"><A HREF="#htoc7">1.6 Manual installation</A>
<LI CLASS="li-toc"><A HREF="#htoc8">1.7 Automatic upgrading (depreciated)</A>
</UL>
<LI CLASS="li-toc"><A HREF="#htoc9">2 Using WhizzyT<sub>E</sub>X</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc10">2.1 Loading <TT>whizzytex.el</TT></A>
<LI CLASS="li-toc"><A HREF="#htoc11">2.2 Quick start</A>
<LI CLASS="li-toc"><A HREF="#htoc12">2.3 Editing</A>
</UL>
<LI CLASS="li-toc"><A HREF="#htoc13">3 Error recovery and debugging</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc14">3.1 Errors while WhizzyT<sub>E</sub>X-ing</A>
<LI CLASS="li-toc"><A HREF="#htoc15">3.2 Error during initialization</A>
<LI CLASS="li-toc"><A HREF="#htoc16">3.3 Errors while editing</A>
<LI CLASS="li-toc"><A HREF="#htoc17">3.4 Debugging</A>
</UL>
<LI CLASS="li-toc"><A HREF="#htoc18">4 On line help</A>
<LI CLASS="li-toc"><A HREF="#htoc19">5 Configuration</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc20">5.1 Emacs global configuration</A>
<LI CLASS="li-toc"><A HREF="#htoc21">5.2 File-based configuration</A>
<LI CLASS="li-toc"><A HREF="#htoc22">5.3 Modes</A>
<LI CLASS="li-toc"><A HREF="#htoc23">5.4 Viewer types</A>
<LI CLASS="li-toc"><A HREF="#htoc24">5.5 Watching other files</A>
<LI CLASS="li-toc"><A HREF="#htoc25">5.6 Frequency of recompilation</A>
<LI CLASS="li-toc"><A HREF="#htoc26">5.7 WhizzyT<sub>E</sub>X-ing macro files</A>
<LI CLASS="li-toc"><A HREF="#htoc27">5.8 Cross-references, page and section numbers</A>
<LI CLASS="li-toc"><A HREF="#htoc28">5.9 Per session L<sup>A</sup>T<sub>E</sub>X customization</A>
<LI CLASS="li-toc"><A HREF="#htoc29">5.10 System, user, and local customization</A>
</UL>
<LI CLASS="li-toc"><A HREF="#htoc30">6 Viewers</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc31">6.1 Viewing with ActiveDVI</A>
<LI CLASS="li-toc"><A HREF="#htoc32">6.2 Defining your own previewer</A>
<LI CLASS="li-toc"><A HREF="#htoc33">6.3 Viewing with <TT>xpdf</TT></A>
</UL>
<LI CLASS="li-toc"><A HREF="#htoc34">7 Whizzy Effects</A>
<LI CLASS="li-toc"><A HREF="#htoc35">8 WhizzyEditing</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc36">8.1 Enabling edition with the <TT>\adviedit</TT> macro</A>
<LI CLASS="li-toc"><A HREF="#htoc37">8.2 Performing mouse edition under ActiveDVI control</A>
<LI CLASS="li-toc"><A HREF="#htoc38">8.3 Examples</A>
<LI CLASS="li-toc"><A HREF="#htoc39">8.4 Writing whizzy-editable macros</A>
</UL>
<LI CLASS="li-toc"><A HREF="#htoc40">9 A quick overview of the implementation</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc41">9.1 Emacs code</A>
<LI CLASS="li-toc"><A HREF="#htoc42">9.2 L<sup>A</sup>T<sub>E</sub>X code</A>
<LI CLASS="li-toc"><A HREF="#htoc43">9.3 Bash code</A>
<LI CLASS="li-toc"><A HREF="#htoc44">9.4 Interaction between the components</A>
<LI CLASS="li-toc"><A HREF="#htoc45">9.5 Whizzy edition</A>
</UL>
</UL>
<A NAME="install"></A><BR>
<BR>
<!--TOC section Installation-->
<H2 CLASS="section"><A NAME="htoc1">1</A> Installation</H2><!--SEC END -->
<!--TOC subsection Requirements-->
<H3 CLASS="subsection"><A NAME="htoc2">1.1</A> Requirements</H3><!--SEC END -->
WhizzyT<sub>E</sub>X is designed for <CODE>Unix</CODE> plateforms<SUP><A NAME="text2" HREF="#note2">2</A></SUP>.<BR>
<BR>
To use WhizzyT<sub>E</sub>X, you need <TT>Emacs</TT> or <TT>XEmacs</TT>, some standard
<TT>latex</TT> distribution,
<TT>bash</TT>, and at least one DVI, Postscript or PDF previewer, such as
<TT>advi</TT>, <TT>xdvi</TT>, or <TT>dvips</TT> combined with <TT>gv</TT>, or
<TT>xpdf</TT>.<BR>
<BR>
WhizzyT<sub>E</sub>X has been developed under Linux but has not been extensively tested
on other platforms. However, L<sup>A</sup>T<sub>E</sub>X and Emacs are quite portable and
possible compatibility problem with the bash shell-script should be minor
and easily fixable. Hence WhizzyT<sub>E</sub>X should work with all distributions of
<TT>latex</TT> that are compliant to the standard. <BR>
<BR>
<!--TOC subsection Get the source-->
<H3 CLASS="subsection"><A NAME="htoc3">1.2</A> Get the source</H3><!--SEC END -->
Get the source <TT>whizzytex-1.3.0.tgz</TT>
from the <A HREF="http://pauillac.inria.fr/whizzytex">distribution</A>,
uncompress and untar it in some working directory, as follows:
<BLOCKQUOTE CLASS="quote">
<TT>
gunzip whizzytex-1.3.0.tgz<BR>
tar -xvf whizztex-1.3.0.tar<BR>
cd whizzytex-1.3.0</TT>
</BLOCKQUOTE>
Then, the installation can be automatic (default or customized), or manual.<BR>
<BR>
<!--TOC subsection Warning!-->
<H3 CLASS="subsection"><A NAME="htoc4">1.3</A> Warning!</H3><!--SEC END -->
Many Linux installations make <CODE>xdvi</CODE> a shell-script that erroneously
end with the line <CODE>xdvi.bin "$@"</CODE> instead of
<CODE>exec xdvi.bin "$@"</CODE>. The later is needed to preserve the process
id, so that signals sent to <CODE>xdvi</CODE> are correctly received and
handled by <CODE>xdvi.bin</CODE>. <BR>
<BR>
Since correct signal handling is crucial for WhizzyT<sub>E</sub>X, and this problem
is so common we provide a script to check your configuration with the command
<BLOCKQUOTE CLASS="quote">
<TT>
./checkconfig
</TT>
</BLOCKQUOTE>
By default, this check is performed by automatic installation below.<BR>
<BR>
<!--TOC subsection Automatic installation-->
<H3 CLASS="subsection"><A NAME="htoc5">1.4</A> Automatic installation</H3><!--SEC END -->
<A NAME="install/automatic"></A>
By default, shell-script <CODE>whizzytex</CODE> will be installed in
<CODE>/usr/local/bin/</CODE> and, library files in
a subdirectory of <CODE>/usr/local/share/whizzytex/</CODE> and the documentation in
<CODE>/usr/local/share/doc/whizzytex/</CODE>. Moreover, Emacs-lisp code will not
be byte-compiled.<BR>
<BR>
For default installation, just type:
<BLOCKQUOTE CLASS="quote">
<TT>
make all
</TT>
</BLOCKQUOTE>
This will create a <CODE>Makefile.config</CODE> file (only if nonexistent) by
taking a copy of the template <CODE>Makefile.config.in</CODE>. This will also check
the <CODE>Makefile.config</CODE> (whether it is the default or a modified version)
against the software installed on your machine. If you wish to change the
default configuration, or if your configuration is rejected, see Section
<A HREF="#customizing">1.5</A>. This will also prepared configured
versions of the files for installation.<BR>
<BR>
Finally, to install files, become superuser (unless you are making
an installation for yourself) and do:
<BLOCKQUOTE CLASS="quote">
<TT>
umask 022
make install
</TT>
</BLOCKQUOTE>
The first line ensures that you give read and execute permission to all.<BR>
<BR>
See <B>Using WhizzyT<sub>E</sub>X</B> (Section <A HREF="#using">2</A>) to test your
installation.<BR>
<BR>
<!--TOC subsection Customizing the installation-->
<H3 CLASS="subsection"><A NAME="htoc6">1.5</A> Customizing the installation</H3><!--SEC END -->
<A NAME="customizing"></A>
To customize the installation, you can edit
<CODE>Makefile.config</CODE>, manually.
You may also use either the command
<BLOCKQUOTE CLASS="quote">
<TT>
./configure
</TT>
</BLOCKQUOTE>
This command may be passed arguments to customize your installation.
Call it with the option <CODE>-help</CODE> to see a list of all options.
By default, the configuration is not interactive. However, you may call it
with option <CODE>-helpme</CODE> to have the script do more guessing for you and
prompt for choices if needed.<BR>
<BR>
Note that by default, the Emacs-lisp code whizzytex.el is not
byte-compiled. You need to pass the option <CODE>-elc</CODE> to <CODE>configure</CODE> in
order to byte-compiled it.<BR>
<BR>
<!--TOC paragraph Checking <TT>Makefile.config</TT>-->
<H5 CLASS="paragraph">Checking <TT>Makefile.config</TT></H5><!--SEC END -->
A misconfiguration of your installation, or —much more subttle— a
misconfiguration of other commands (it appears that some installations wrap
scripts around standard commands that are sometimes incorrect and break
their normal advertized interface) may lead to systematic errors when
launching WhizzyT<sub>E</sub>X. To prevent delaying such obvious errors, some sanity
checks are done after <CODE>Makefile.config</CODE> has been produced and before
building other files. These include checking for mandatory bindings (useful
for manual configuration) and for the conformance of <TT>initex</TT>, <TT>latex</TT>, and viewers commands to their expected interface.<BR>
<BR>
Checking viewers interface implies simulating a small WhizzyT<sub>E</sub>X session: a
small test file is created for which a specializled version of latex format
is built and used to run L<sup>A</sup>T<sub>E</sub>X on the test file; finally, required
viewers are tested on the DVI output, which opens windows, temporarily.<BR>
<BR>
If the sanity check fails, at least part of your configuration is
suspicious. If some windows remain opened, your confirguration is likely to
be erronesous (and so, even if not detected by the script). <BR>
<BR>
However, if you really know what you are doing, you may bypass the check by
typing <CODE>make config.force</CODE>, which will stamp your <CODE>Makefile.config</CODE>
as correct without checking it. Checking compliance to viewers interface
is also bypassed if you you do not have a connection to X. Conversely, you
may force checking manually by typing <CODE>./checkconfig</CODE>.<BR>
<BR>
At the end of customization, proceed as described in Section <A HREF="#install/automatic">1.4</A>.<BR>
<BR>
<!--TOC paragraph Customization notes-->
<H5 CLASS="paragraph">Customization notes</H5><!--SEC END -->
By default, WhizzyT<sub>E</sub>X assumes the standard convention that
<CODE>latex</CODE> is the command name used to call L<sup>A</sup>T<sub>E</sub>X,
<CODE>initex</CODE> the command name used to build a new format, and
<CODE>latex</CODE> is the predefined latex format.<BR>
<BR>
If your implementation of L<sup>A</sup>T<sub>E</sub>X uses other names, you may redefine the
variables <CODE>INITEX</CODE>, <CODE>LATEX</CODE>, and <CODE>FORMAT</CODE> accordingly in the
file <CODE>Makefile.config</CODE>.
For instance, <CODE>platex</CODE> could be use the default configuration
<BLOCKQUOTE CLASS="quote">
<TT>
INITEX = iniptex<BR>
LATEX = platex<BR>
FORMAT = platex<BR>
BIBTEX = jbibtex
</TT>
</BLOCKQUOTE>
This would be produced directly with the configuration line:
<BLOCKQUOTE CLASS="quote">
<TT>
./configure -initex iniptex -latex platex -format latex -bibtex jbibtex
</TT>
</BLOCKQUOTE>
If you wish to run WhizzyT<sub>E</sub>X with several configurations, you must still
choose a default configuration, but you will still be able to call WhizzyT<sub>E</sub>X
with another configuration from Emacs (see Section <A HREF="#configuration.tex">5.2</A>
below).<BR>
<BR>
It is possible to load this setup dynamically by creating, for example,
by including the following lines:
<BLOCKQUOTE CLASS="quote">
<TT>
INITEX = iniptex<BR>
LATEX = platex<BR>
FORMAT = platex<BR>
BIBTEX = jbibtex
</TT>
</BLOCKQUOTE>
in a configuration file (see Section <A HREF="#configuration">5.2</A>).<BR>
<BR>
During the configuration, you must at least choose one default previewer
type among <CODE>advi</CODE>, <CODE>xdvi</CODE>, and <CODE>ps</CODE>, and at most one default
previewer for each previewer type you chose. You will still be able to call
WhizzyT<sub>E</sub>X with other previewers from Emacs, via Emacs configuration (see
Section
<A HREF="#configuration.viewers">5.1</A>). <BR>
<BR>
<!--TOC subsection Manual installation-->
<H3 CLASS="subsection"><A NAME="htoc7">1.6</A> Manual installation</H3><!--SEC END -->
Since WhizzyT<sub>E</sub>X only need three files to run, installation can also be done
manually:
<UL CLASS="itemize"><LI CLASS="li-itemize"><TT>whizzytex.el</TT><BR>
<BR>
This could be installed in a directory visible by Emacs, but does not need
to, since you can always use the full path when you load it or declare
autoload. <BR>
<BR>
No default location.<BR>
<BR>
<LI CLASS="li-itemize"><TT>whizzytex</TT><BR>
<BR>
This file is a bash-shell script that should be executable. There is not
reason to have it visible from the executable path, since it should not be
used but with WhizzyT<sub>E</sub>X.<BR>
<BR>
The variable <TT>whizzytex-command-name</TT> defined in <TT>whizzytex.el</TT>
contains its full path (or just its name if visible from the executable
path). <BR>
<BR>
Default value is <CODE>/usr/local/bin/whizzytex</CODE><BR>
<BR>
You may need to adjust the path of <CODE>bash</CODE> in the very first line of the
script, as well as some variables in the manual configuration section of the
script. <BR>
<BR>
<LI CLASS="li-itemize"><TT>whizzytex.sty</TT><BR>
<BR>
This file are <TT>latex2e</TT> macros. There is no reason to put this visible
from L<sup>A</sup>T<sub>E</sub>X path, since it should not be used but with WhizzyT<sub>E</sub>X.<BR>
<BR>
Variable variable <TT>PACKAGE</TT> defined in <TT>whizzytex</TT>
the full path (or just the name if the path is visible from L<sup>A</sup>T<sub>E</sub>X. <BR>
<BR>
Default value is <CODE>/usr/local/share/whizzytex/latex/whizzytex.sty</CODE></UL>
<!--TOC subsection Automatic upgrading (depreciated)-->
<H3 CLASS="subsection"><A NAME="htoc8">1.7</A> Automatic upgrading (depreciated)</H3><!--SEC END -->
For convenience, the distribution also offers a facility to download and
upgrade new versions of WhizzyT<sub>E</sub>X (this requires <CODE>wget</CODE> to be
installed). If automatic upgrading does not work, just do it manually.<BR>
<BR>
All operations should be performed in the WhizzyT<sub>E</sub>X top directory, <EM>i.e.</EM> where you untar whizzytex for the first time, that is right above the
directory from were you made the installation. We assume that have
created a link to the current version subdirectory:
<BLOCKQUOTE CLASS="quote">
<TT>
ln -s whizzytex-1.3.0 whizzytex
</TT>
</BLOCKQUOTE>
(the manager will then update this link when version changes).
Alternatively, you can also use the full name <TT>whizzytex-1.3.0</TT> in
place of <TT>whizzytex</TT> below. The main commands are:
<BLOCKQUOTE CLASS="quote">
<TT>
make -f whizzytex/Manager upgrade<BR>
make -f whizzytex/Manager install
</TT>
</BLOCKQUOTE>
The command <CODE>upgrade</CODE> will successively download the newest version,
unpack it, copy the configuration of the current version to the newest
version, and bring the newest version up-to-date. The command <CODE>install</CODE>
will install files of the newest version. <BR>
<BR>
The following command will (re-)install an old version:
<BLOCKQUOTE CLASS="quote">
<TT>
make VERSION=<version> download downgrade install
</TT>
</BLOCKQUOTE>
<A NAME="using"></A>
<!--TOC section Using WhizzyT<sub>E</sub>X-->
<H2 CLASS="section"><A NAME="htoc9">2</A> Using WhizzyT<sub>E</sub>X</H2><!--SEC END -->
<A NAME="using"></A>
<!--TOC subsection Loading <TT>whizzytex.el</TT>-->
<H3 CLASS="subsection"><A NAME="htoc10">2.1</A> Loading <TT>whizzytex.el</TT></H3><!--SEC END -->
Maybe, <TT>whizzytex</TT> is already installed on your (X)Emacs system, which
you may check by typing:
<BLOCKQUOTE CLASS="quote">
<TT>
ESC x whizzytex-mode RET
</TT>
</BLOCKQUOTE>
If the command is understood, skip this section.
Otherwise, you should first load the library <CODE>whizzytex.el</CODE> or, better,
declare it autoload. To do this permanently, include the following
declaration in your Emacs startup file (which probably is <CODE>~/.emacs</CODE> if
you are using <CODE>Emacs</CODE>):
<BLOCKQUOTE CLASS="quote"><TT>
(autoload 'whizzytex-mode<BR>
"whizzytex"<BR>
"WhizzyTeX, a minor-mode WYSIWIG environment for LaTeX" t)
</TT>
</BLOCKQUOTE>
This asumes that <CODE>whizzytex.el</CODE> has been installed in your (X)Emacs
<TT>load-path</TT>. Otherwise, you may either adjust the load-path
appropriately, or replace <CODE>whizzytex</CODE> by the full path to the file
<CODE>whizzytex.el</CODE>, which depends on your installation and can be
obtained by typing <TT>make where</TT> in the installation root directory. For
instance, if you are using Emacs, the default location for
<CODE>whizzytex.el</CODE> is
<CODE>/usr/local/share/whizzytex/lisp/whizzytex.el</CODE> (but it will be different
if you are using XEmacs or a customized installation).<BR>
<BR>
<!--TOC subsection Quick start-->
<H3 CLASS="subsection"><A NAME="htoc11">2.2</A> Quick start</H3><!--SEC END -->
WhizzyT<sub>E</sub>X runs as a minor mode of Emacs to be launched on a L<sup>A</sup>T<sub>E</sub>X Emacs
buffer. The extension of the buffer should be
<CODE>.tex</CODE>. WhizzyT<sub>E</sub>X also understands <CODE>.ltx</CODE> extensions, but gives
priority to the former when it has to guess the extension. Other extensions
are possible but not recommended.
<BLOCKQUOTE CLASS="quote"><EM>The file attached to the buffer must exists and either be a well-formed
L<sup>A</sup>T<sub>E</sub>X source file, or be </EM>mastered<EM>, </EM>i.e.<EM> loaded by another
L<sup>A</sup>T<sub>E</sub>X source file. Thus, whenever the buffer does not contain a
</EM><CODE><EM>\begin{document}</EM></CODE><EM> command), WhizzyT<sub>E</sub>X will search for its master file,
asking the user if need be, so as to first launch itself on a buffer
visiting the master file. In particular, an empty buffer will be considered
as beeing mastered, which may not be what you intend.
</EM></BLOCKQUOTE>
To start WhizzyT<sub>E</sub>X on either kind of buffer, type:
<BLOCKQUOTE CLASS="quote">
<TT>
ESC x whizzytex-mode RET
</TT>
</BLOCKQUOTE>
By default, this should add new bindings so that you can later turn mode
on and off with key strokes <TT>C-c C-w</TT>. This will also add a new menu
<TT>Whizzy</TT> in the menu bar call “the” menu below. (If you are using
the <TT>auctex</TT>, your may use other configuration key strokes to avoid
clashes (see online emacs-help). <BR>
<BR>
When <TT>whizzytex-mode</TT> is started for the first time on a new buffer, it
attempts to configure buffer local variables automatically by examining
the content of file, and using default values of global bindings.<BR>
<BR>
You may customize default settings globally by running appropriate
hooks or locally by inserting appropriate comments in the source file —see
the manual below. <BR>
<BR>
You may also change the settings interactively using the menu, or tell
whizzytex-mode to prompt the user for confirmation of file configuration by
passing prefix argument 4 (using, for instance, key sequence
<CODE>C-u C-c C-w</CODE>). <BR>
<BR>
<!--TOC subsection Editing-->
<H3 CLASS="subsection"><A NAME="htoc12">2.3</A> Editing</H3><!--SEC END -->
Once <TT>whizzytex-mode</TT> is on, just type in as usual. WhizzyT<sub>E</sub>X should work
transparently, refreshing the presentation as you type or move into your
L<sup>A</sup>T<sub>E</sub>X buffer. <BR>
<BR>
Additionally, a gray overlay is put outside of the current slice (the <EM>slice</EM> is the region of your buffer under focus, which is automatically
determined by WhizzyT<sub>E</sub>X). When a L<sup>A</sup>T<sub>E</sub>X error occurs and it can be
localized in the source buffer, a yellow overlay also is put on the region
around the error, and removed when the error is fixed.<BR>
<BR>
Furthermore, when an error is persistent for several slices or some amount
of time, the interaction-buffer will pop up with the error log
(this option can be toggled with the <TT>Auto interaction</TT> menu entry). <BR>
<BR>
The buffer mode line also displays a brief summary of
WhizzyT<sub>E</sub>X's status. When <CODE>whizzytex-mode</CODE> is on, the line contain
<CODE>Whizzy</CODE>.<I>n</I> where <I>n</I> is a numeric indication of the load in number
of buffer changes between two slices (so the higher, the slower). <BR>
<BR>
However, <CODE>Whizzy</CODE>.<I>n</I> is changed to <CODE>Whizzy-</CODE><I>e</I> where <I>err</I> range
over <CODE>FORMAT</CODE>, <CODE>LATEX</CODE>, or <CODE>SLICE</CODE> an indicates that while
formating or L<sup>A</sup>T<sub>E</sub>Xing the full document, or while recompiling the current
slice. Errors have priority in this order. That is, if there is both an
error in the format and the slice, only the <CODE>FORMAT</CODE> error will be
repported.<BR>
<BR>
When a <CODE>SLICE</CODE> error occurs, emacs attempts to locate the error
and overlay the region that caused the error. (This identifies the
text around which the error was detected by L<sup>A</sup>T<sub>E</sub>X, which may not be the
text that caused the error.) One can jump to the current error location by
calling the <TT>Jump to error</TT> menu emty (or the equivalent key
sequence). <BR>
<BR>
<!--TOC section Error recovery and debugging-->
<H2 CLASS="section"><A NAME="htoc13">3</A> Error recovery and debugging</H2><!--SEC END -->
WhizzyT<sub>E</sub>X makes a good attempt at doing everything automatically.
However, there remain situations where the user need to understand
WhizzyT<sub>E</sub>X —when WhizzyT<sub>E</sub>X does not seem to understand the user anymore. <BR>
<BR>
<!--TOC subsection Errors while WhizzyT<sub>E</sub>X-ing-->
<H3 CLASS="subsection"><A NAME="htoc14">3.1</A> Errors while WhizzyT<sub>E</sub>X-ing</H3><!--SEC END -->
Quite often, the error overlay is sufficient to fix a latex source error.
Actually, the error overaly may just indicate that you are in the middle of
typing a command or an environment, in which cases WhizzyT<sub>E</sub>X will indicate
temporarily report an undefined command or and ill-balanced environment.
Whether an overlay is ephemerous and mean an incomplete edition or
persistent and mean a real L<sup>A</sup>T<sub>E</sub>X error is usually unambiguous.
In addition, because WhizzyT<sub>E</sub>Xing is dynamic and the error is repported
immediately it is usually easier to fix a real error than it would be in a
batch compilation, and without even looking at the error message.<BR>
<BR>
Indeed, WhizzyT<sub>E</sub>X also display the L<sup>A</sup>T<sub>E</sub>X error message
(and other processsing messages) in its interaction buffer.
The interaction buffer is named from the master file name surrounded
by <CODE>*</CODE> characters. By default, the interaction buffer appears
in a pop up window a few seconds after an error persists and is pop down
when the error disapears. <BR>
<BR>
For serious debugging, you may unset <TT>Auto interaction</TT> menu entry so as
to see the interaction buffer permanently. You may also unset <TT>Auto
Shrink output</TT> menu entry to keep all log information (by default, the
interaction window is shrunk at every slice).<BR>
<BR>
The <TT>View Log...</TT> menu entry can be used to view the compele log files of
last actions performed by whizzytex (<CODE>format</CODE>, <CODE>latex</CODE>,
<CODE>slice</CODE>). <BR>
<BR>
<!--TOC subsection Error during initialization-->
<H3 CLASS="subsection"><A NAME="htoc15">3.2</A> Error during initialization</H3><!--SEC END -->
The most delicate part of WhizzyT<sub>E</sub>X is when starting <TT>whizzytex-mode</TT>,
and usually for the first time in a new buffer, since at that time all kinds
of initialization errors may occur (in addition to L<sup>A</sup>T<sub>E</sub>X errors. <BR>
<BR>
WhizzyT<sub>E</sub>X will attempt to identify the error and report appropriate messages
in the interaction buffer. (In case an error occurs —or nothing happens—
always have a look at the interaction buffer first, even if it did not
prompt automatically.)<BR>
<BR>
WhizzyT<sub>E</sub>X keeps more debugging information during initialization phase,
and if an error occurs during initialization, it will keep all log files.
Once initialization has succeeded WhizzyT<sub>E</sub>X turns into normal more and
by default all log and auxiliary files will be removed error et exit
(including at exit on error). However, WhizzyT<sub>E</sub>X can also be launched in
debug more, which will keep additional debugging information including
after initialization. <BR>
<BR>
To see log information, use the <CODE>View log...</CODE> menu entry
and the completion buffer. Available log files are <CODE>command</CODE>,
<CODE>format</CODE>, <CODE>latex</CODE>, <CODE>slice</CODE>, and <CODE>view</CODE>.
The command log is simple the list of arguments—one per line—with which
the shell script <CODE>whizzytex</CODE> was called; the log file view is the
content of the standard error description the viewer. Some logs may not be
available if an error occured before the corresponding command has been
called. <BR>
<BR>
Most frequent errors are described below, in chronological order.<BR>
<BR>
<!--TOC paragraph Emacs fails during setup-->
<H5 CLASS="paragraph">Emacs fails during setup</H5><!--SEC END -->
This is the easiest case, because WhizzyT<sub>E</sub>X has not been called yet, so it
is only involves debugging under emacs.
You may check the emacs error messages (emacs buffer <CODE>*Messages*</CODE>),
check the on-line documentatino of variables set or functions calls, and
in case of uncaught fatal errors, you may
<CODE>ESC X toggle-debug-on-error</CODE> to get help from Emacs, and try to fix
the problem. <BR>
<BR>
Note that setup may succeed, but not be result as expected.
You may see what configuration files have been loaded in different buffers:
<CODE>*Message*</CODE> for emacs customization, the interaction buffer
for shell-script customozation, and the format log file for latex
configuration.<BR>
<BR>
<!--TOC paragraph Emacs cannot find whizzytex-->
<H5 CLASS="paragraph">Emacs cannot find whizzytex</H5><!--SEC END -->
This should typically be an installation problem, where the variable
<CODE>whizzytex-command-name</CODE> is erroneous (maybe you need to give the full
path). Try to evaluate <CODE>(shell-command whizzy-command-name)</CODE> in the
minibuffer, which of course should fail, but only after the command has been
reached.<BR>
<BR>
<!--TOC paragraph WhizzyT<sub>E</sub>X cannot build a format-->
<H5 CLASS="paragraph">WhizzyT<sub>E</sub>X cannot build a format</H5><!--SEC END -->
Then WhizzyT<sub>E</sub>X will refuse to start. <BR>
<BR>
The problem could result from an abnormal interaction between your macros
and WhizzyT<sub>E</sub>X macros, but this situation seems rather unfrequent. So there
is most probably an error in your macros. Try to compile L<sup>A</sup>T<sub>E</sub>X your
file. <BR>
<BR>
By default the interaction window will pop-up with an section of the format
log, but you can also view the log of latex formatting <BR>
<BR>
. If this is not enough, you may need view log files. However, log
files are normally removed when WhizzyT<sub>E</sub>X exits. To keep log files on,
you must retart WhizzyT<sub>E</sub>X in debug mode (select the debug mode in the
menu and restart WhizzyT<sub>E</sub>X). Then, you can check the <CODE>format</CODE> log and
if necessary the <CODE>command</CODE> with which WhizzyT<sub>E</sub>X has been launched.
(Once the bug is fixed, you should switch off the debug mode, which may slow
down WhizzyT<sub>E</sub>X.)<BR>
<BR>
<!--TOC paragraph WhizzyT<sub>E</sub>X cannot launch the previewer-->
<H5 CLASS="paragraph">WhizzyT<sub>E</sub>X cannot launch the previewer</H5><!--SEC END -->
Usually, this is because whizzytex received wrong previewer parameter. See
the command echoed in the interaction buffer or try to evaluate
<CODE>(whizzy-get whizzytex-view-mode)</CODE>.<BR>
<BR>
<!--TOC paragraph Other errors-->
<H5 CLASS="paragraph">Other errors</H5><!--SEC END -->
There are two remaining problems that could happen at launch time, but that
are not particular to launch time: WhizzyT<sub>E</sub>X could not recompiled the whole
document or the current slice. However, these should not be fatal.
In the former case, whizzytex will proceed, ignoring the whole document
(or using the slice instead if you are in duplex mode). In the later case,
whizzytex will replace the slice by an empty slice —and print a welcoming
document, as if you launched WhizzyT<sub>E</sub>X outside of any slice. <BR>
<BR>
<!--TOC subsection Errors while editing-->
<H3 CLASS="subsection"><A NAME="htoc16">3.3</A> Errors while editing</H3><!--SEC END -->
After initialization time, WhizzyT<sub>E</sub>X will keep recompiling slices as you
type or move, but also recompiles the format and the whole document when you
save a file. Each of this step may failed, but this should not be fatal, and
Emacs should report the error, possible pop up the interaction window, and
continue. <BR>
<BR>
<!--TOC paragraph WhizzyT<sub>E</sub>X fails on the current slice-->
<H5 CLASS="paragraph">WhizzyT<sub>E</sub>X fails on the current slice</H5><!--SEC END -->
This should not be considered as an error, it <B>must</B> happen during
edition. In particular, WhizzyT<sub>E</sub>X is not much aware of L<sup>A</sup>T<sub>E</sub>X and could
very well slice in the middle of the typesetting of an environment or a
macro command. This should not matter, since the erroneous slice will be
ignore temporarily until the slice is correct again.<BR>
<BR>
<!--TOC paragraph WhizzyT<sub>E</sub>X keeps failing on the current slice-->
<H5 CLASS="paragraph">WhizzyT<sub>E</sub>X keeps failing on the current slice</H5><!--SEC END -->
The slice can also be erroneous because the Emacs did not correctly inferred
where to insert the cursor, which may slice erroneous, although what you
typed is correct. Hopefully, this will not occur too often, and disappear as
you move the point. It should also disappear if you switch off both <TT>Point visible</TT> and <TT>Page to Point</TT> options, which is actually a good
thing to do when you suspect some misbehavior. This will make WhizzyTeX
more robust, but less powerful and more boring.<BR>
<BR>
<!--TOC paragraph WhizzyT<sub>E</sub>X does not seem to slice at all-->
<H5 CLASS="paragraph">WhizzyT<sub>E</sub>X does not seem to slice at all</H5><!--SEC END -->
The interaction window does not produce any output.
Try to move in the slice, or to another slice. <BR>
<BR>
If nothing happens, check the interaction
window, to see if it did attempt to recompile the slice.
If nothing happens in the interaction window, check for Emacs messages
(in the <CODE>*Messages*</CODE> buffer). You may also check for the presence
(and content) of the slice by visiting
<CODE>_whizzy_filename.tex</CODE> or
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
_whizzy_filename/input/_whizzy_name.new
</PRE></BLOCKQUOTE>
If neither file exists, it means that Emacs did
not succeed to slice, which you may force by evaluating
<CODE>(whizzy-observe-changes t)</CODE>.
This can be run in even if <TT>whizzytex-mode</TT> is suspended, which may
avoid automatic processing of slices, and their erasure.<BR>
<BR>
If the slice is present, you may try to compile it by hand (outside of
Emacs) with
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
latex '&_whizzy_filename' _whizzy_filename.tex
</PRE></BLOCKQUOTE>
and see if it succeeds. <BR>
<BR>
<!--TOC paragraph Reformatting failed-->
<H5 CLASS="paragraph">Reformatting failed</H5><!--SEC END -->
Formatting errors are fatal during initialization, but accepted once
initialized. In case of an error during reformatting, WhizzyT<sub>E</sub>X will ignore
the error and continue with the old format. This means that new macros may
be ignored leading to further slicing errors. When rebuilding the format
failed, the mode-line string will display the suffix <CODE>FMT</CODE> until the
error is fixed. See the interaction buffer or select <CODE>format</CODE> from the
<CODE>log...</CODE> menu entry).<BR>
<BR>
You may also force reformatting by typing the <CODE>reformat</CODE> command
in the interaction buffer. <BR>
<BR>
<!--TOC paragraph Whizzytex cannot process the whole document-->
<H5 CLASS="paragraph">Whizzytex cannot process the whole document</H5><!--SEC END -->
This is very likely a problem with you document, so try to L<sup>A</sup>T<sub>E</sub>X it
first. There is a small possibility of strange interaction between
your macros and WhizzyT<sub>E</sub>X package. Try to turn options
<TT>Page to Point</TT> and <TT>Point visible</TT> off and retry.
This will make WhizzyT<sub>E</sub>X more robust (but also less powerful and more
boring). <BR>
<BR>
<!--TOC subsection Debugging-->
<H3 CLASS="subsection"><A NAME="htoc17">3.4</A> Debugging</H3><!--SEC END -->
If you are still completely lost after trying all of the above help, you may
turn on the debugging mode by typing either line in the interaction window:
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
trace on
trace off
</PRE></BLOCKQUOTE>
or with the menu entry <CODE>Debug</CODE>.
The entry can also be called to start WhizzyT<sub>E</sub>X, which will then start in
debugging mode, including during initialization. <BR>
<BR>
If need be, you can also turn emacs debug mode on and off with
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
ESC x toggle-debug-on-error RET
</PRE></BLOCKQUOTE>
If you are still stuck, then you are left on your own and need real
debugging. If this is your first attempt at WhizzyT<sub>E</sub>X, you should suspect
your global configuration. You should then try it first with the examples of
the distribution. Otherwise, you may rollback to a file and configuration
that used to work (e.g. one of the distribution), and make incremental or
logarithmic changes until you hit the problem. <BR>
<BR>
<A NAME="help"></A>
<!--TOC section On line help-->
<H2 CLASS="section"><A NAME="htoc18">4</A> On line help</H2><!--SEC END -->
The Emacs source is fully documented and most of the documentation is
available as on-line Emacs help, through the <CODE>Help</CODE> entry of the
<CODE>Whizzy</CODE> menu and following hyperlinks.
Alternatively, you can type
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
ESC x describe-function RET whizzytex-mode RET
</PRE></BLOCKQUOTE>
(In XEmacs, you may need to use
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
ESC x hyper-describe-function RET whizzytex-mode RET
</PRE></BLOCKQUOTE>
instead of <CODE>describe-function</CODE> to see hyper-links.)<BR>
<BR>
To avoid redundancy, on-line help is not reproduced here, configuration
described in the next section.<BR>
<BR>
<A NAME="manual"></A>
<!--TOC section Configuration-->
<H2 CLASS="section"><A NAME="htoc19">5</A> Configuration</H2><!--SEC END -->
<A NAME="manual"></A>
This section describes how to use and parameterize WhizzyT<sub>E</sub>X.
Section <A HREF="#configuration">5.2</A>, <A HREF="#modes">5.3</A> and
<A HREF="#types">5.4</A> are also available as online help. <BR>
<BR>
<!--TOC subsection Emacs global configuration-->
<H3 CLASS="subsection"><A NAME="htoc20">5.1</A> Emacs global configuration</H3><!--SEC END -->
<A NAME="configuration.viewers"></A>
<A NAME="configuration.bindings"></A>
<A NAME="Emacs-configuration"></A>
See Emacs help for <CODE>whizzy-default-bindings</CODE> and
<CODE>whizzytex-mode-hook</CODE> for list of bindings.<BR>
<BR>
The Emacs on-line help for <CODE>whizzytex-mode</CODE> lists all user-configurable
variables, which may be given default values in your Emacs startup file
to be used instead of WhizzyT<sub>E</sub>X own default values. <BR>
<BR>
<!--TOC subsection File-based configuration-->
<H3 CLASS="subsection"><A NAME="htoc21">5.2</A> File-based configuration</H3><!--SEC END -->
<A NAME="configuration"></A>
<A NAME="File-configuration"></A>
WhizzyT<sub>E</sub>X allows for inlined customization in the source file, as described
below. While this mecanism is quit convenient for short and simple
customization (such as selecting the output format and previewer or
sectioning), it is harsh and <EM>depreciated</EM> for advanced customization,
for which you should prefer local customozation files (see Section <A HREF="#sec/local-custom">5.10</A>). <BR>
<BR>
A configuration line is one that starts with regexp prefix “<CODE>^%; +</CODE>”
followed by a configuration keyword. If two configuration lines have the same
keyword, only the first one is considered. The argument of a configuration
line is the rest of the line stripped of its white space.<BR>
<BR>
The keywords are:
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description">
<B>whizzy-master</B><DD CLASS="dd-description">⟨<TT>master</TT>⟩<BR>
This only makes sense for a file loaded by a <EM>master</EM> file.
⟨<TT>master</TT>⟩ is the relative or full name of the
master file. Optional surrounding quotes (character <CODE>"</CODE>) stripped off, so that <CODE>"foo.tex"</CODE> and <CODE>foo.tex</CODE> are equivalent.<BR>
<BR>
<DT CLASS="dt-description"><B>whizzy-macros</B><DD CLASS="dd-description">⟨<TT>master</TT>⟩<BR>
This is equivalent to <B>whizzy-master</B> ⟨<TT>master</TT>⟩, but for a file
containing macros. The file is not sliced while editing, but
saving it reformats the master. <BR>
<BR>
<DT CLASS="dt-description"><B>whizzy</B><DD CLASS="dd-description">
[ ⟨<TT>slicing</TT>⟩ ]
[ ⟨<TT>viewer</TT>⟩ [ ⟨<TT>command</TT>⟩ ] ]<BR>
[ <TT>-mkslice</TT> ⟨<TT>command</TT>⟩ ]
[ <TT>-mkfile</TT> ⟨<TT>command</TT>⟩ ]<BR>
[ <TT>-tex</TT> ⟨<TT>suffix</TT>⟩ ]
[ <TT>-initex</TT> ⟨<TT>initex</TT>⟩ ]
[ <TT>-latex</TT> ⟨<TT>latex</TT>⟩ ]
[ <TT>-fmt</TT> ⟨<TT>format</TT>⟩ ]<BR>
[ <TT>-bibtex</TT> ⟨<TT>bibtex</TT>⟩ ]
[ <TT>-dvicopy</TT> ⟨<TT>command</TT>⟩ ]
[ <TT>-watch</TT> ]
[ <TT>-duplex</TT> ]
[ <TT>-trace</TT> ]<BR>
All arguments are optional, but if present they must appear in order and on
a single line:
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description">
<B>⟨<TT>slicing</TT></B><B>⟩</B><DD CLASS="dd-description"><BR>
determines the way the document is sliced
(see section <A HREF="#modes">5.3</A>).<BR>
<BR>
<DT CLASS="dt-description"><B>⟨<TT>viewer</TT></B><B>⟩</B><DD CLASS="dd-description"><BR>
is the type of viewer and can only be one of
<CODE>-advi</CODE>, <CODE>-xdvi</CODE>, <CODE>-ps</CODE>, or <CODE>-pdf</CODE> (see section <A HREF="#types">5.4</A>)<BR>
<BR>
<DT CLASS="dt-description"><B><TT>-display</TT></B><B> ⟨<TT>display</TT></B><B>⟩</B><DD CLASS="dd-description"><BR>
specifies which X display to show the DVI previewer in,
such as <TT>:0.1</TT> for multidisplay set-ups.<BR>
<BR>
<DT CLASS="dt-description"><B>⟨<TT>command</TT></B><B>⟩</B><DD CLASS="dd-description"><BR>
is optional and is the command used to call the viewer
(of course, it should agree with ⟨<TT>viewer</TT>⟩). <BR>
<BR>
<DT CLASS="dt-description"><B><TT>-mkslice</TT></B><B> ⟨<TT>command</TT></B><B>⟩</B><DD CLASS="dd-description"><BR>
tells WhizzyT<sub>E</sub>X to use ⟨<TT>command</TT>⟩ to preprocess the slice.
The command ⟨<TT>make</TT>⟩ will receive one argument
<TT>_whizzy_basename.new</TT> and should produce
<TT>_whizzy_basename.tex</TT>
(or <TT>_whizzy_basename.ltx</TT> if the extension of the master file is
<TT>.ltx</TT>).
By default, <CODE>mv</CODE> is simply used.<BR>
<BR>
<EM>The Unix </EM><CODE><EM>make</EM></CODE><EM> can itself be used as a preprocessor (with an
appropriate </EM><CODE><EM>Makefile</EM></CODE><EM>). However, one may have to work around
</EM><CODE><EM>make</EM></CODE><EM>'s notion of time (using FORCE), which is usually too rough.
This is safe, since WhizzyT<sub>E</sub>X tests itself for needed recompilations.</EM><BR>
<BR>
<DT CLASS="dt-description"><B><TT>-mkfile</TT></B><B> ⟨<TT>command</TT></B><B>⟩</B><DD CLASS="dd-description"><BR>
executes “⟨<TT>command</TT>⟩ ⟨<TT>filename</TT>⟩” before recompiling every time a
buffer is saved. The argument “⟨<TT>filename</TT>⟩” is the buffer-file-name
path relative to the path of the master file directory.<BR>
<BR>
<DT CLASS="dt-description"><B><TT>-makeindex</TT></B><B> ⟨<TT>command</TT></B><B>⟩</B><DD CLASS="dd-description"><BR>
uses “⟨<TT>command</TT>⟩ ⟨<TT>filename.idx</TT>⟩” for rebuilding the index instead
the default “⟨<TT>makeindex</TT>⟩ ⟨<TT>filename.idx</TT>⟩”. If “⟨<TT>command</TT>⟩” is
false, then do not attempt to rebuild the index.<BR>
<BR>
<DT CLASS="dt-description"><B><TT>-bibtex ⟨bibtex</TT></B><B><TT>⟩</TT></B><DD CLASS="dd-description"><BR>
<BR>
uses ⟨<TT>bibtex</TT>⟩ for the bibtex command instead of the value
assign to BIBTEX in <CODE>Makefile.config</CODE> (or <CODE>whizzytex</CODE>)<BR>
<BR>
<DT CLASS="dt-description"><B><TT>-initex ⟨initex</TT></B><B><TT>⟩</TT></B><DD CLASS="dd-description"><BR>
<BR>
uses ⟨<TT>initex</TT>⟩ for the initex command instead of the value
assign to INITEX in <CODE>Makefile.config</CODE> (or <CODE>whizzytex</CODE>)<BR>
<BR>
<DT CLASS="dt-description"><B><TT>-latex ⟨latex</TT></B><B><TT>⟩</TT></B><DD CLASS="dd-description"><BR>
<BR>
uses ⟨<TT>latex</TT>⟩ for the latex command instead of the value
assign to LATEX in <CODE>Makefile.config</CODE> (or <CODE>whizzytex</CODE>)<BR>
<BR>
<DT CLASS="dt-description"><B><TT>-fmt ⟨format</TT></B><B><TT>⟩</TT></B><DD CLASS="dd-description"><BR>
<BR>
uses ⟨<TT>format</TT>⟩ for the latex format instead
of the default value, usually fmt (see configuration).<BR>
<BR>
<EM>This can either be used in combination with </EM><CODE><EM>-latex</EM></CODE><EM> and
</EM><CODE><EM>-initex</EM></CODE><EM>,
or alone. For instance,
</EM><CODE><EM>hugelatex</EM></CODE><EM> could be used (depending on your L<sup>A</sup>T<sub>E</sub>X configuration) to
build a larger format to process huge files.</EM>
<A NAME="configuration.tex"></A><BR>
<BR>
<DT CLASS="dt-description"><B><TT>-dvicopy ⟨command</TT></B><B><TT>⟩</TT></B><DD CLASS="dd-description"><A NAME="sec/dvicopy"></A><BR>
<BR>
uses ⟨<TT>command</TT>⟩ instead of the default (mv) to copy DVI files
(from <CODE>FILE.dvi</CODE> to <CODE>FILE.wdvi</CODE>). This can be used with command
<CODE>dvicopy</CODE> so as to expand virtual font, which advi does not understand
yet) <BR>
<BR>
<DT CLASS="dt-description"><B><TT>-watch</TT></B><DD CLASS="dd-description"><BR>
watches other files than just the slice (see Section <A HREF="#sec/watch">5.5</A>).<BR>
<BR>
<DT CLASS="dt-description"><B><TT>-duplex</TT></B><DD CLASS="dd-description"><BR>
launches another window with the whole document (which is
recompiled every time the source buffer is saved).<BR>
<BR>
<EM>With </EM><CODE><EM>-advi</EM></CODE><EM> previewers, both views communicate with Emacs and can be
used to navigate through source buffers and positions.</EM><BR>
<BR>
<DT CLASS="dt-description"><B><TT>-trace</TT></B><DD CLASS="dd-description"><BR>
traces all script commands (for debugging purposes only.)
<A NAME="configuration.trace"></A></DL><BR>
For instance, a typical configuration line will be:
<PRE CLASS="verbatim">
%; whizzy subsection -dvi "xdvi -s 3"
</PRE>It tells whizzytex to run in subsection slicing mode and use a <CODE>dvi</CODE>
style viewer called with the command
<CODE>xdvi -s 3</CODE>. This is also equivalent to
<PRE CLASS="verbatim">
%; whizzy subsection -dvi xdvi -s 3
</PRE>since Emacs removes outer double-quotes in option arguments. <BR>
<BR>
A more evolved configuration line is:
<PRE CLASS="verbatim">
%; whizzy -mkslice make -initex iniptex -latex platex -fmt platex
</PRE>It tells WhizzyT<sub>E</sub>X to use <CODE>iniptex</CODE> and <CODE>platex</CODE> comands instead
of <CODE>initex</CODE> and <CODE>latex</CODE> and to use the format file <CODE>platex.fmt</CODE>
instead of <CODE>latex.fmt</CODE>. Moreover, it should use <CODE>make</CODE> to preprocess
the slice.<BR>
<BR>
<DT CLASS="dt-description"><B>whizzy-paragraph</B><DD CLASS="dd-description"> <TT>regexp</TT><BR>
This sets the Emacs variable <CODE>whizzy-paragraph</CODE> to <TT>regexp</TT>.
</DL>
<!--TOC subsection Modes-->
<H3 CLASS="subsection"><A NAME="htoc22">5.3</A> Modes</H3><!--SEC END -->
<A NAME="modes"></A>
WhizzyT<sub>E</sub>X recognizes three modes <CODE>slide</CODE>, <CODE>section</CODE>, and
<CODE>document</CODE>.
The mode determines the slice of the document being displayed and indirectly
the frequently of slicing. <BR>
<BR>
Note that in any mode but <CODE>none</CODE> slices are always included in the file
beeing editing and files that it may include. Thus, when slice delimitors
are not found, the slice default to the whole file. The slice may also be
empty if the cursor is located before <CODE>\begin{document}</CODE> or
after <CODE>\end</CODE><CODE>{document}</CODE>.
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description"><B>slide</B><DD CLASS="dd-description"><BR>
<BR>
The mode <CODE>slide</CODE> is mainly used for documents of the class seminar.
In slide mode, the slide is the text between two <CODE>\begin {slide}</CODE>
comments (thus, the text between two slides is displayed after the
preceding slide). <BR>
<BR>
In slice modes, overlays are ignored <EM>i.e.</EM> all overlays all displayed in
the same slide, unless a command
<CODE>\overlay {</CODE><I>n</I><CODE>}</CODE> occurs on the left of the point, on the same line
(if several commands are on the same line, the
right-most one is taken), in which case only layers <I>p</I> ≤ <I>n</I> are displayed.<BR>
<BR>
<DT CLASS="dt-description"><B>section</B><DD CLASS="dd-description">
In <CODE>section</CODE> mode, the slice of text is the current chapter, section.<BR>
<BR>
<DT CLASS="dt-description"><B>subsection</B><DD CLASS="dd-description">
As <CODE>section</CODE> but also slice at subsections. <BR>
<BR>
<DT CLASS="dt-description"><B>paragraph</B><DD CLASS="dd-description">
The <CODE>paragraph</CODE> mode is a variation on section mode where, the separator
<CODE>whizzy-paragraph</CODE> is defined by the user (set to two empty lines by
default) instead of using <CODE>\section</CODE> and <CODE>\subsection</CODE> commands.
subsection.<BR>
<BR>
<DT CLASS="dt-description"><B>document</B><DD CLASS="dd-description">
The <CODE>document</CODE> take the region between <CODE>\begin{document}</CODE>
and <CODE>\end</CODE><CODE>{document}</CODE> as the slice. Hence it defaults to the file
when the file is a slave, which does not contain <CODE>\begin{document}</CODE>. <BR>
<BR>
<DT CLASS="dt-description"><B>none</B><DD CLASS="dd-description">
In <CODE>none</CODE> slicing mode, there is no sectioning unit at all and
the whole document is recompiled altogether.
Currently, pages are not turned to point and the
cursor is not shown in <CODE>document</CODE> mode, because full documents are not
sliced. (A slicing document mode could be obtained by working in paragraph
mode, with an appropriate regexp.)</DL>
<!--TOC subsection Viewer types-->
<H3 CLASS="subsection"><A NAME="htoc23">5.4</A> Viewer types</H3><!--SEC END -->
<A NAME="types"></A>
See help for <CODE>whizzy-viewers</CODE>.<BR>
<BR>
The previewer types can have three possible values:
<TT>-advi</TT>, <TT>-dvi</TT>, <TT>-ps</TT>, or <TT>-pdf</TT>. <BR>
<BR>
The previewer type should agree with the previewer command in several ways:
<UL CLASS="itemize"><LI CLASS="li-itemize">They tell how to trigger reload on the previewer.
This may signal the previewer with signal <TT>SIGHUP</TT> for <TT>-ps</TT>
or <TT>SIGUSR1</TT> for <TT>-dvi</TT> and <TT>-advi</TT>, or to establish the
previewer as a remote server with <TT>-pdf</TT>.<BR>
<BR>
In particular, if you write a front-hand shell-script <CODE>viewer</CODE> to the
call previewer, and want to use <CODE>viewer</CODE> as the previewer, you should
arrange for <CODE>viewer</CODE> to understand these signals (and forward them to the
previewer). The simplest way is to hand your script with an exec command
calling the <CODE>gv</CODE>, <CODE>dvi</CODE> or <CODE>advi</CODE>.<BR>
<BR>
Also, the option <TT>-pdf</TT> assumes <TT>xpdf</TT> remote server
(launched with the whizzytex process id as name) and its reload protocol.
Thus, if you wish to use another previewer, you also need to cutomize the
variable <TT>RELOAD</TT> of the shell-script. <BR>
<BR>
<LI CLASS="li-itemize">They tell whizzytex whether to process the slice to
Postscript (with <TT>-ps</TT>) or to DVI format (with <TT>-dvi</TT> and <TT>-advi</TT> or directly generate <TT>pdf</TT> output with <TT>pdflatex</TT>.<BR>
<BR>
<LI CLASS="li-itemize">Moreover, <TT>-advi</TT> requires the previewer to
recognize additional <CODE>\special</CODE> commands, in particular
source line information of the form:
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
#line 780, 785 <<to<<rec>><<ognize>>additional>> manual.tex
</PRE></BLOCKQUOTE></UL>
Then, the previewer command is the command to call the previewer. This
string will be passed as such to the WhizzyT<sub>E</sub>X shell-script. Note that the
name of the <CODE>dvi</CODE> or postscript file will be appended to the previewer
command.<BR>
<BR>
<!--TOC subsection Watching other files-->
<H3 CLASS="subsection"><A NAME="htoc24">5.5</A> Watching other files</H3><!--SEC END -->
<A NAME="sec/watch"></A>
WhizzyT<sub>E</sub>X is designed to watch other files and not just the slice saved by
Emacs. In fact, it watches any file dropped in the pool directory.
For instance,
if your source file uses images, you can just change the image and
drop the new version in the pool. Then WhizzyT<sub>E</sub>X will pick the new version,
move it to the working directory and recompile a new slice. Be aware of name
clashes: if you drop a file in the pool, it will automatically be move to
the working directory with the same name, overriding any file of the same
name sitting there. <BR>
<BR>
However, activity is entirely controlled by Emacs, since after every
iteration WhizzyT<sub>E</sub>X waits for Emacs to send a new command (usually the empty
command that means iterate again). Hence, other files will only be taken
into account at the next iteration. If you really wish these files
to be watched you need to instrument emacs to send and empty line input to
the interaction buffer regularly, even when idle. <BR>
<BR>
<!--TOC subsection Frequency of recompilation-->
<H3 CLASS="subsection"><A NAME="htoc25">5.6</A> Frequency of recompilation</H3><!--SEC END -->
To obtain maximum WhizzyT<sub>E</sub>X effect, a new slice should be save after any
edition changed or any displacement that outside of the current slice.
However, to avoid overloading the machine with useless and annoying
refreshments, some compromise is made, depending on Emacs several
parameters: edition <EM>v.s.</EM> move Emacs last commands,
successful <EM>v.s.</EM> erroneous last slice, and the duration of last slice
recompilation. This usually works well. However, different behavior may wish
to be obtained in different situations. For instance, when editing on a
lab-top, one may wish to save batteries by keeping the load rather low, hence
not using the full power of the processor. Conversely, one may wish
WhizzyT<sub>E</sub>X to be as responsive as possible. There is an function
<CODE>whizzy-load-factor</CODE> that control a variable of the same name, which can
be used to adjust the responsiveness (by increasing or decreasing the
load-factor). This simply adds extra delays between slicing. <BR>
<BR>
The format is automatically recompiled at the beginning of each session, and
whenever the buffer containing the file is saved. That is, to load new
packages or define new global macros (before the <CODE>\begin{document}</CODE>), it
suffices to save the current file.<BR>
<BR>
<!--TOC subsection WhizzyT<sub>E</sub>X-ing macro files-->
<H3 CLASS="subsection"><A NAME="htoc26">5.7</A> WhizzyT<sub>E</sub>X-ing macro files</H3><!--SEC END -->
Macro files can be <B><FONT COLOR="blue">WhizzyT<sub>E</sub>X</FONT></B>-ed as well. The effect is them only to
automatically call <CODE>reformat</CODE> when the file is saved.
Files can also be declared as macro-files with
<CODE>whizzy-macro</CODE> file configuration keyword (see Section <A HREF="#File-configuration">5.2</A>), which argument should then indicate the master file.
Files with <CODE>.sty</CODE> extension are by default considered as macro files
and their master file is guessed if possible.<BR>
<BR>
<!--TOC subsection Cross-references, page and section numbers-->
<H3 CLASS="subsection"><A NAME="htoc27">5.8</A> Cross-references, page and section numbers</H3><!--SEC END -->
The slice is always recompiled with the <CODE>.aux</CODE> file of the whole
document. In paragraph mode, cross references and section numbers are
recompiled whenever the buffer itself is saved (manually).
The recompilation of the whole document is off in slide mode.<BR>
<BR>
<!--TOC subsection Per session L<sup>A</sup>T<sub>E</sub>X customization-->
<H3 CLASS="subsection"><A NAME="htoc28">5.9</A> Per session L<sup>A</sup>T<sub>E</sub>X customization</H3><!--SEC END -->
The Emacs variable <CODE>whizzy-customize</CODE> (that can be set
interactively from the <CODE>Customize slice</CODE> menu) may contain
a few L<sup>A</sup>T<sub>E</sub>X commands to be inserted at the beginning of each slice, which
allows a per-session customization. Customization can be easily changed
anytime in the middle of a session. For instance, setting this variable to
<CODE>\large</CODE> can be used to temporarily enlarge the text, while keeping the
same page layout.<BR>
<BR>
<A NAME="custom"></A>
<!--TOC subsection System, user, and local customization-->
<H3 CLASS="subsection"><A NAME="htoc29">5.10</A> System, user, and local customization</H3><!--SEC END -->
<A NAME="sec/local-custom"></A>
WhizzyT<sub>E</sub>X is a three-part engine, with Emacs, Latex, and the glue
Bash-script running altogether. Some of the parameters can be adjusted at
installation-time by modifying the respective files <CODE>whizzytex.el</CODE>,
<CODE>whizzytex.sty</CODE>, or <CODE>whizzytex</CODE> of the distribution. However, you
should normally not have to do that after installation, and instead use
system, user, or local configuration files.<BR>
<BR>
When launched, each engine looks for configuration files in appropriate
directories with basenames <CODE>whizzy.el</CODE>, <CODE>whizzy.sh</CODE>, and
<CODE>whizzy.sty</CODE>, respectively. The Emacs configuration search path is
defined by the emacs variable variable <CODE>whizzy-configuration-path</CODE>.
Search path for Bash and Latex settings are composed of the directories
<CODE>CONFIGDIR/</CODE>, <CODE>$HOME/.whizzytex/</CODE> and the
current directory (actually <CODE>$TEXINPUTS</CODE> for latex). All configuration
files found are loaded, in the order given above.<BR>
<BR>
Remark that a local configuration file (<EM>i.e.</EM> one in the current
directory) can be used to make per-document configuration by testing on
jobname.<BR>
<BR>
<A NAME="viewers"></A>
<!--TOC section Viewers-->
<H2 CLASS="section"><A NAME="htoc30">6</A> Viewers</H2><!--SEC END -->
<!--TOC subsection Viewing with ActiveDVI-->
<H3 CLASS="subsection"><A NAME="htoc31">6.1</A> Viewing with ActiveDVI</H3><!--SEC END -->
<A HREF="http://pauillac.inria.fr/advi/">ActiveDVI</A> is a DVI previewer with
several additional features.
In particular, it recognizes extra specials, some of which are particular
useful for whizzytex that allows a two way communication between
the source Emacs buffer and the previewer:
<UL CLASS="itemize"><LI CLASS="li-itemize">
The previewer will automatically turn pages for you, as you are editing.
This is done by telling Emacs to save the current position in the slice.
Then, the recompilation of the slice will include the current position
as an hyperref location <CODE>Start-Document</CODE> whenever possible.
Then, just tell ActiveDVI to automatically jump at this location
when it opens/reloads the file (option -html Start-Document).<BR>
<BR>
<LI CLASS="li-itemize">Conversely, ActiveDVI can dump source file positions on clicks,
when available (usually on <CODE>shift-mouse-1</CODE> or <CODE>mouse-1</CODE> in
<CODE>edit</CODE> mode), that
is forwarded to Emacs so that it can move to the corresponding line.<BR>
<BR>
To enjoy this feature, the option <CODE>-advi</CODE> should be used instead of
<CODE>-dvi</CODE>. This will produce extra information (such as source line
numbers) using <CODE>\special</CODE> that most DVI previewers do not recognize
and may complain about.<BR>
<BR>
<LI CLASS="li-itemize">ActiveDVI does not currently recognizes virtual fonts, but <CODE>dvicopy</CODE>
can be used to expand them. See the option <CODE>-dvicopy</CODE> in Section <A HREF="#sec/dvicopy">5.2</A>. <BR>
<BR>
<LI CLASS="li-itemize">If you have a recent version of ActiveDVI (version number exists and is
greater than 1.5.2), you can also enjoy the multiple view mode, which is
configured by default (variable <CODE>MULTIPLE</CODE> is set to <CODE>true</CODE> in
Makefile.config). In this case, <B><FONT COLOR="blue">WhizzyT<sub>E</sub>X</FONT></B> will call the previewer both
the slice and the whole document in the same window and may automatically
switch from the slice to the whole document when clicking on local hyperrefs
that are out of the slice (press <CODE>Esc</CODE> to come back). You can also
switch between views by pressing <CODE>w</CODE> and when on the whole document
view, goto the page when the cursor is in Emacs by pressing <CODE>W</CODE>. <BR>
<BR>
<EM>Warning! If by mistake or misconfiguration, the multiple view is
enable and your version of advi does not support multiple views, you
will only see the full document view and never see the slice. </EM>
</UL>
<!--TOC subsection Defining your own previewer-->
<H3 CLASS="subsection"><A NAME="htoc32">6.2</A> Defining your own previewer</H3><!--SEC END -->
To use your own command as a previewer, you must choose either type
<CODE>-dvi</CODE> or <CODE>-ps</CODE> . In particular, your previewer should
accept <CODE>SIGUSR1</CODE> (for <CODE>-dvi</CODE>) signal or <CODE>SIGHUP</CODE> (for <CODE>-ps</CODE>)
signal and respond by reloading the file.<BR>
<BR>
<A NAME="pdf"></A>
<!--TOC subsection Viewing with <TT>xpdf</TT>-->
<H3 CLASS="subsection"><A NAME="htoc33">6.3</A> Viewing with <TT>xpdf</TT></H3><!--SEC END -->
WhizzyT<sub>E</sub>X now works with <CODE>pdf</CODE> using the <CODE>xpdf</CODE> previewer
and its remote server capabilities to reload the file and jump to the
cursor position (this does not work because they is no simple way to tell
<CODE>acroread</CODE> to reload its file in batch). You must choose <CODE>-pdf</CODE>
as previewer type, which will also set other variables so as to compile the
document with pdflatex instead of latex. You must leave the default
previewer command, i.e. enter <CODE>-pdf .</CODE> and not <CODE>-pdf xpdf</CODE> (or else
understand the internals of the <CODE>whizzytex</CODE> script) because
other options need to be passed to <CODE>xpdf</CODE>.<BR>
<BR>
<!--TOC section Whizzy Effects-->
<H2 CLASS="section"><A NAME="htoc34">7</A> Whizzy Effects</H2><!--SEC END -->
Since WhizzyT<sub>E</sub>X knowns about the current point in the buffer, rendering
of the document may depend on that possition. For examples, an environment
may be displayed differently when the point is inside or outside the
environment. A natural choice is to make drawer-like environments that
are <EM>closed</EM> when the point is outside and <EM>open</EM> when the point
is inside.<BR>
<BR>
WhizzyT<sub>E</sub>X provides a the macro <CODE>\WhizzyInsideEnvironment</CODE>
to help make such effects. It takes the same parameters as the command
<CODE>\newenvironnement</CODE>. The first argument should be the name of an
existing environment, which will behave as before when the point appears
outside and according to the new definition when the points is inside. The
second and first arguments defines the behavoir as do the arguments of
<CODE>\newenvironment</CODE>. However, <CODE>\WhizzyInsideEnvironment</CODE> also defines
the macro <CODE>\out@myenv</CODE> and <CODE>endout@myenv</CODE> to refers to the
cursor-outside version of the environment. Typically, these macros can be
used in the second and third argument of <CODE>\WhizzyInsideEnvironment</CODE> to
define the cursor-inside version by difference with the cursor-outside
version. <BR>
<BR>
The example <CODE>effects</CODE> shows two applications. First, a <CODE>drawer</CODE>
environment is used to delimit sections and make them open or closed
automatically as cursor moves. Second, using the
<TT>exercise</TT> package, we provide a cursor-inside version of the answer
environment that inline the answer rather than pushing it to the Appendix. <BR>
<BR>
<A NAME="edit"></A>
<!--TOC section WhizzyEditing-->
<H2 CLASS="section"><A NAME="htoc35">8</A> WhizzyEditing</H2><!--SEC END -->
<BLOCKQUOTE CLASS="quote">
<EM>This feature requires at least version <TT>1.60</TT></EM><EM> of
ActiveDVI.
</EM></BLOCKQUOTE>
When used together with Active-DVI, WhizzyT<sub>E</sub>X can be made much mode
powerful. In particular, it is not difficult to lift WhizzyT<sub>E</sub>X from an
incremental viewer to an assistant editor.<BR>
<BR>
What was a dream has now become real.
The latest version Active-DVI provides a notion of active boxes.
The DVI may be annotated with <CODE>advi: edit</CODE> specials commands.
When ActiveDVI is put in edition mode,
active boxes are drawn on top of the previewer window and can be move or
resized with the mouse.
When the mouse is released, the new size or position is printed on standard
output together with the action to be taken and received by emacs watching
the output.
Emacs has then enough information to adjust some dimensional parameters in
the source buffer. Just after this edition, the new slice is processed and
the new position is displayed. Thanks to the short incremental loop, this
almost appears as if actions where executed by Active-DVI itself.<BR>
<BR>
Indeed, WhizzyEditing is not meant to break up the structual edition
philosophy of T<sub>E</sub>X and L<sup>A</sup>T<sub>E</sub>X. Its incremental viewing is an assistant
to an not a replacement of structural source edition. Mouse editing should
also be seen similarly. In particular, all editions are visible in the
emacs source buffer, can be saved, manually changed or disable. Moreover,
Whizzy-editing is not meant for document layout (even it can occassionally
be used for that, <EM>e.g.</EM> in slides), but rather to help adjust
dinmensions that require manual tuning.<BR>
<BR>
For instance, imaging you are importing an Encapsulated Postscript picture
you would like to place some bubble whose origin must be position precisely
inside the picture. Then, you'd better do it with the mouse rather than by
small measurements or adjustements. Drawing a graph with a few nodes may now
become quite confortable with PStricks, with the advantage of remaining
within L<sup>A</sup>T<sub>E</sub>X rather than using some external tool. Finally,
Whizzy-editing is likely to be convenient when writting slides with visual
gadgets. For instance, adjusting bubbles with the mouse is likely to be more
efficient than doing it by hand.<BR>
<BR>
<!--TOC subsection Enabling edition with the <TT>\adviedit</TT> macro-->
<H3 CLASS="subsection"><A NAME="htoc36">8.1</A> Enabling edition with the <TT>\adviedit</TT> macro</H3><!--SEC END -->
ActiveDVI provides one general editing command that can be used by
<B><FONT COLOR="blue">WhizzyT<sub>E</sub>X</FONT></B> for all mouse editing. The syntax of this command is
<BLOCKQUOTE CLASS="quote">
<TT>\adviedit</TT>[tag]<TT>{⟨ </TT><EM>options</EM><TT>⟩</TT><TT>}</TT><TT>{⟨ </TT><EM>body</EM><TT>⟩</TT><TT>}</TT>
</BLOCKQUOTE>
where ⟨ <EM>options</EM>⟩ is a comma separated list of bindings
according to the <TT>keyval</TT> package. Each binding is either of the form
⟨ <EM>var</EM>⟩=⟨ <EM>float</EM>⟩ where
⟨ <EM>var</EM>⟩ ranges other letters
<TT>x</TT>, <TT>y</TT>, <TT>h</TT>, <TT>w</TT>, <TT>d</TT>
in lowercase or uppercase, or <TT>field</TT>=⟨ <EM>dimension</EM>⟩ where
⟨ <EM>field</EM>⟩ ranges over ⟨ <EM>unit</EM>⟩ and ⟨ <EM>min</EM>⟩.<BR>
<BR>
The ⟨ <EM>field</EM>⟩ respectively bindings specifies the unit, which default to
<TT>1em</TT>, and the minimal dimension of boxes. Both fields are inherited,
which enable inner edition to be scale altogether. The ⟨ <EM>var</EM>⟩ bindings
defines values for the corresponding variables.
The are not inherited. On the opposite, they are always reset to
default values. Lowercase letters mean that the corresponding variables
are whizzy-editable, while uppercase letters treat them as constants.
The expression <TT>body</TT> should be horizontal box material: it is then
placed in an <TT>\hbox</TT> at coordinates (<TT>x</TT>, <TT>y</TT>)
relatively to the current position.
Moreover, a virtual box of width <TT>w</TT>, height <TT>h</TT>, and depth d is draw at that position when editing is made active.
The box can this float around the current point and has no dimension.
However, a box with no coordinates specified is fixed and has the dimensions
of <TT>w</TT>, <TT>h</TT>, and <TT>d</TT>. When not specified, these fields takes
the value of the box in which body is typeset.
All dimensions <TT>x</TT>, <TT>y</TT>, <TT>w</TT>, <TT>h</TT>, and <TT>d</TT> are
bound to <TT>advix</TT>, <TT>advix</TT>, <TT>adviy</TT>, <TT>adviw</TT>,
<TT>advih</TT>, and <TT>advid</TT> macros during the evaluation of
⟨ <EM>body</EM>⟩. <BR>
<BR>
Whizzy-editable objects can be nested. All parameters are reset to default
values, within the new object. Sometimes, emacs may be confused and take an
object for another. In these rare cases, the two objects can use the
⟨ <EM>tag</EM>⟩ argument to be distinguished. This argument does nothing but
being passed to ActiveDVI and sent back to Emacs to identified
the object exactly. <BR>
<BR>
<!--TOC subsection Performing mouse edition under ActiveDVI control-->
<H3 CLASS="subsection"><A NAME="htoc37">8.2</A> Performing mouse edition under ActiveDVI control</H3><!--SEC END -->
<BLOCKQUOTE CLASS="quote"><EM>This section depends entirely on ActiveDVI. Hence, it may depend on your
version of ActiveDVI or how you have parameterized it. The appearance
and description below is based on default bindings for version
<TT>1.50+3</TT></EM><EM>.
</EM></BLOCKQUOTE>
To actually <EM>edit</EM> whizzy-editable objects, you need to toggle the
<EM>edit</EM> mode of ActiveDVI. You can do this interactively by key stoke
<CODE>e</CODE> in the ActiveDVI window. You may also start ActiveDVI in
<EM>edit</EM> mode by passing the option <TT>-edit</TT>.<BR>
<BR>
When in edit mode, whizzy-editable objects are drawn as below:
<DIV CLASS="center">
<IMG SRC="whizzytex001.gif"></DIV>
<BR>
<BR>
You may edit such objects in two ways:
<UL CLASS="itemize"><LI CLASS="li-itemize">
<B>move</B> them, using the middle button.
<LI CLASS="li-itemize"><B>resize</B> them, using the right button for width and height
or the shift-right button for depth.
</UL>
When pressing the button on the corresponding rectangle, the mouse shape
should intuitively illustrate the action to be perfomed.
However, some actions may be inhibited. For instance, the
<TT>\parbox</TT> can only be moved or resized in width and the
vertical space can only be resized in depth but not be moved. When an
action (either <EM>move</EM> or <EM>resize</EM>) is disable in all directions,
the cursor will not changed. When resizing is enabled both in <EM>height</EM>
and in <EM>depth</EM>, the default action is <EM>height</EM> and you must press
the shift key to perform the <EM>depth</EM> resizing.<BR>
<BR>
Finally, an edition can be aborted by pressing the <EM>meta</EM> key (actually
the one bound to <EM>modifier-1</EM>) while release the mouse. <BR>
<BR>
<!--TOC subsection Examples-->
<H3 CLASS="subsection"><A NAME="htoc38">8.3</A> Examples</H3><!--SEC END -->
Several examples can be found in file <TT>example/edit/main.tex</TT> coming with
ActiveDVI distribution. Here are a couple of simple ones.
For example,
<PRE CLASS="verbatim">
\adviedit{x=-2.8845,y=0.2717}{A}
</PRE>will simply place make the letter <I>A</I> whizzy-movable.
The values of <I>x</I> and <I>y</I> when unspecified defaults to 0.
Values for <I>W</I>, <I>H</I> or <I>D</I> when not given, will default to the
value of A. However, if <I>W</I>, <I>H</I>, or <I>D</I> are zero (or too small)
they will default to some small value.
<PRE CLASS="verbatim">
\adviedit{X=2,Y=3}{A}
</PRE>can simply be used instead of the latex \put command.
Spaces are also whizzy-adjustables: an horizontal space is just
<PRE CLASS="verbatim">
\adviedit{w}{\hspace{\adviw}}
</PRE>Note that the material is placed into a default <TT>\hbox</TT>.
Thus, for vertical spaces, one need and explicit <TT>\vbox</TT>:
<PRE CLASS="verbatim">
\adviedit{d}{\vtop {\vspace {\advid}}}
</PRE>Note that
<PRE CLASS="verbatim">
\adviedit{h}{\vbox {\vspace {\advih}}}
</PRE>would do as well, but would usually be less intuitive, graphically.<BR>
<BR>
A paragraph of adjustable size:
<PRE CLASS="verbatim">
\adviedit{w}{\parbox[c]{\adviw}{text material}}
</PRE>Whizzy-edition can also be used to resize images (as well as return them)
<PRE CLASS="verbatim">
\adviedit{w,h}{\includegraphics[width=\adviw,height=\advih]{caml.eps}}
</PRE>Note that while \adviedit must remain in the should, hence the
whole line cannot be abbreviated into a macro, one can freely abbreviate its
body, and it is quite easy to build a camel caravan:
<PRE CLASS="verbatim">
\adviedit[A]{w,unit=\hsize}{%
\setedit{unit=0.2\adviw}%
\def \camel{\includegraphics[width=\adviw,height=\advih]{caml.eps}}%
\adviedit{x,y,w,h}{\camel}%
\adviedit{x,y,w,h}{\camel}%
\adviedit{x,y,w,h}{\camel}%
\adviedit{d}{\vtop{\vspace\advid}}%
\hspace{\adviw}%
}
</PRE>Be aware that a camel may hide another one! Indeed, at the beginning all
camels are superposed. The first caml you pick is the one in front.
An interesting use of units is to let an inner editable command sets its
unit according to the dimension of an outer command, as illustrated above.
Here the outer object (tagged <TT>A</TT>) is used to control the origin
and scale of the projection. Then, each camel can be translated and
resized, but relatively to this origin and this scale. Thus moving
of rescaling the outer object will treate the caravan as a whole.
The last line allow expansion of the bounding box as needed.
The one before last sets the vertical ratio of the bounding box.
The result can be seen in Figure <A HREF="#caravan">1</A>.
<BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center"><IMG SRC="whizzytex002.gif"></DIV>
<BR>
<BR>
<DIV CLASS="center">Figure 1: <A NAME="caravan"></A>A Whizzy-editable Camel Caravan</DIV><BR>
<BR>
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE>
Below is another example with two circles:
<PRE CLASS="verbatim">
\adviedit[A]{w=4}
{\setedit{unit=\adviw}%
\psset{boxsep=0pt,framesep=0pt}%
\hbox to \adviw
{\circlenode{A}{\hspace {\adviw}}\hss
\adviedit[B]{w=0.5}{\circlenode{B}{\hspace{\adviw}}}}}
</PRE>Many L<sup>A</sup>T<sub>E</sub>X commands such as <TT>\hspace</TT>,
<TT>\parbox</TT>, <EM>etc.</EM> are parameterized by dimensions.
However, some other commands, such as <TT>\picture</TT>,
<TT>\pspicture</TT> and most PsTricks commands,
<TT>\bubble</TT>, and <TT>\adviedit</TT> itself are
parameterized by a coefficients (floats) and, separately, a dimension. <BR>
<BR>
To whizzy-edit such coefficients, there are also commands
<TT>\advicx</TT>,
<TT>\advicy</TT>,
<TT>\advicw</TT>,
<TT>\advich</TT>, and
<TT>\advicd</TT> that contain the float ratio of
the corresponding dimension with respect to
<TT>\adviunit</TT>—whenever the dimension is itself defined.
As an example, the position of bubble can whizzy-edited as follows:
<PRE CLASS="verbatim">
\adviedit{h=1.8902,w=1.5259,unit=\bubbleunit}
{\bubble{anchored text}(\advicw,\advich){bulle text}}
</PRE>
<!--TOC subsection Writing whizzy-editable macros-->
<H3 CLASS="subsection"><A NAME="htoc39">8.4</A> Writing whizzy-editable macros</H3><!--SEC END -->
Although the command <TT>\whizzyedit</TT> is quite general and
powerful, the user may wish to write its own versions.
One must then be careful that the macro correctly passes its name to
ActiveDVI. For instance, rebinding or partially evaluating the macro
<TT>\adviedit</TT> does not work, since then the text-source macro
will not be <TT>\adviedit</TT> anymore. See the latex
<TT>advi.sty</TT> source package for envolved examples. <BR>
<BR>
Below are just a couple of simple examples.
We can abbreviate the example of adjustable horizontal spaces defining the
following macro:
<PRE CLASS="verbatim">
\newcommand{\advihspace}[1]
{\adviedit{comm=\advihspace,#1}{\hspace{\adviw}}}
</PRE>The argument <CODE>comm=\advihspace</CODE> set the name of the calling source text
macro to <CODE>\advihspace</CODE>. Then, you may simply write:
<PRE CLASS="verbatim">
\advihspace{w}
</PRE>instead of
<PRE CLASS="verbatim">
\adviedit{w}{\hspace{\adviw}}
</PRE>The macro could additionally check that <CODE>w</CODE> is indeed defined.<BR>
<BR>
Another example of specialization is to place bubbles: so as to be more
intuitive, the orgin of the edition should start at the center rather then
at the left of the anchor, which requires a small acrobatics with boxes and
dimensions:
<PRE CLASS="verbatim">
\newcommand{\editbubble}[3]
{\setbox0=\hbox{#2}\copy0\hbox to 0em {\kern-0.5\wd0\relax
\bbb@dima=\ht0\bbb@dimb=\dp0
\setbox0=\null\ht0=\bbb@dima\dp0=\bbb@dimb
{\adviedit{comm=\editbubble,unit=\bubbleunit,#1}
{\bubble{\box0}(\advicw,\advich){#3}}}\hfilneg}}
</PRE>Then a nicely editable bublle can be obtained with
<PRE CLASS="verbatim">
\editbubble{w,h}
{\editbubble{w,h}
{\editbubble{w,h}{flowers}{First}}
{Second}}
{third}
</PRE>(See the result in Figure <A HREF="#flowers">2</A>)
<BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center"><IMG SRC="whizzytex003.gif">
</DIV>
<BR>
<BR>
<DIV CLASS="center">Figure 2: <A NAME="flowers"></A>A bubble flower</DIV><BR>
<BR>
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE>
<A NAME="impl"></A>
<!--TOC section A quick overview of the implementation-->
<H2 CLASS="section"><A NAME="htoc40">9</A> A quick overview of the implementation</H2><!--SEC END -->
In short, <SPAN STYLE="font-variant:small-caps">WhizzyT<sub>E</sub>X</SPAN> is selecting a small slice of the document that
you are editing around the cursor (according to the selected mode)
and redisplay the slice incrementally as it changes through edition.
<UL CLASS="itemize"><LI CLASS="li-itemize"><B>Emacs is watching you</B> typing and moving in the
Emacs buffer attached to the L<sup>A</sup>T<sub>E</sub>X source file that your editing and keeps
saving the current slice (current slide, section, or subsection, according
to the mode).<BR>
<BR>
<LI CLASS="li-itemize"><B>A shell-script daemon</B>
keeps recompiling whenever a new slice (or other files) are produced, and if
recompilation succeeds, tels the previewer to updates the display of the slice.<BR>
<BR>
<LI CLASS="li-itemize"><B>A few L<sup>A</sup>T<sub>E</sub>X macros</B> allow to build a specialized
format with all macro loaded, which considerably speed up the time for
slicing. Additionally, the slice is a bit instrumented to show the cursor,
and includes specials that allows back-pointing from the DVI file into the
Emacs buffer.</UL>
The rest of this section briefly describe these three parts<SUP><A NAME="text3" HREF="#note3">3</A></SUP>, and
their interactions.<BR>
<BR>
<!--TOC subsection Emacs code-->
<H3 CLASS="subsection"><A NAME="htoc41">9.1</A> Emacs code</H3><!--SEC END -->
The main trick is to use <CODE>post-command-hook</CODE> to make Emacs watch
changes. It uses <CODE>buffer-modified-tick</CODE> to tell if any editing has
actually occurred, and compare the point position with the (remembered)
position of the region being displayed to see if saving should occur. It
uses <CODE>sit-for</CODE> to delay slicing until at least the time of slice
computation has ellapsed since last saving, a significant number of editing
changes has occurred, or iddleness.<BR>
<BR>
WhizzyT<sub>E</sub>X can also display the cursor position, in which case slices are
also recomputed when the cursor moves, but with lower priority.<BR>
<BR>
<!--TOC subsection L<sup>A</sup>T<sub>E</sub>X code-->
<H3 CLASS="subsection"><A NAME="htoc42">9.2</A> L<sup>A</sup>T<sub>E</sub>X code</H3><!--SEC END -->
The main TeX trick is to build a format specialized to the current
document so as to avoid reloading the
whole macros at each compilation. This is (almost<SUP><A NAME="text4" HREF="#note4">4</A></SUP>) entirely transparent, that is, the source file does not have
to understand this trick.<BR>
<BR>
This is implemented by redefining <CODE>\documentclass</CODE> which in turn
redefines <CODE>\document</CODE> to execute <CODE>\dump</CODE> (after redefining
<CODE>\document</CODE> to its old value and <CODE>\documentclass</CODE> so that it skips
everything till <CODE>\document</CODE>). This is robust —and seems
to work with rather complex macros. <BR>
<BR>
The specialized format can be used in two modes: by default it expects a
full document: it them dumps counters at sectioning commands (chapters,
sections, and subsections). This is useful to correctly
numberred sections and pages on slices. <BR>
<BR>
There are also a a few other used to get more advanced behavior, especially
to dump source line numbers and file names so that the previewer can
transform clicks into source file positions. <BR>
<BR>
When building the format, WhizzyT<sub>E</sub>X also look for a local file of name
<CODE>whizzy.sty</CODE>, which if existing is loaded at the end of the macros.
This may be used to add other macros in whizzy mode, <EM>e.g.</EM>
some T<sub>E</sub>X environments may be redefined to changed they type setting,
according to whether the current line is inside or outside the environment.
(We have written such an extension for an exercise package that sends the
answers at the end in an appendix, unless the cursor is inside the answer,
in which case the answer is in-lined.)<BR>
<BR>
<!--TOC subsection Bash code-->
<H3 CLASS="subsection"><A NAME="htoc43">9.3</A> Bash code</H3><!--SEC END -->
There is no real trick there. This is a shell-script watching the pool
(a directory where slices and other new version of files must be dropped).
It them recompiles a slice and wait for input (in stdin).
It recognizes a few one-line commands as input <TT>reformat</TT>, <TT>dupplex</TT>, and by default just watch for the presence of a new slice.
It recompiles the format file (and the page and section number, but in batch
mode) whenever the source file (its Unix date) has changed and
recompiles the slice whenever it is present (since WhizzyT<sub>E</sub>X renames —hence
removes— the slice before processing it).<BR>
<BR>
If the file has been recompiled successfully, it triggers the previewer
(ghostscript or xdvi) so that it rereads the dvi or ps file. Otherwise, it
processes the T<sub>E</sub>X log file and tries to locate the error. It then sends part
of the log file with annotations to the <CODE>*TeX-shell*</CODE> buffer from which
Emacs has been WhizzyT<sub>E</sub>X, so that Emacs can report the error. <BR>
<BR>
<!--TOC subsection Interaction between the components-->
<H3 CLASS="subsection"><A NAME="htoc44">9.4</A> Interaction between the components</H3><!--SEC END -->
The control is normally done by Emacs, which launches and kills the Unix
daemon. Quitting the previewer should be noticed by the daemon, which tells
Emacs to turn mode off before exiting. <BR>
<BR>
Muliple WhizzyT<sub>E</sub>X running on the same file would certainly raise racing
conditions between files and would not make sense.
For that purpose, the daemon pid is saved in a file and WhizzyT<sub>E</sub>X
will kill any old WhizzyT<sub>E</sub>X process on startup. <BR>
<BR>
<!--TOC subsection Whizzy edition-->
<H3 CLASS="subsection"><A NAME="htoc45">9.5</A> Whizzy edition</H3><!--SEC END -->
The macros <TT>\adviedit</TT> passes information
to ActiveDVI inside <TT>edit</TT> specials. This information is used to
identify the source file command that requested some edition and is passed
by from ActiveDVI to emacs as command strings of the form:
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
<edit "\adviedit" ""[x=1.2001]" #56 @main.tex moveto 5.1529,-1.1708>
</PRE></BLOCKQUOTE>
This command emitted by ActiveDVI in its standard output is thus received by
emacs via <B><FONT COLOR="blue">WhizzyT<sub>E</sub>X</FONT></B> in the process buffer associated to the current
session. <BR>
<BR>
Emacs interprets such commands starting with the “<CODE><edit </CODE>” prefix
as whizzy edition commands. In the above example, the string
<CODE>\adviedit</CODE> is a latex commands that should be present the master
buffer <CODE>main.tex</CODE> at line <CODE>56</CODE> and with x coordinate equal to
<TT>1.2001</TT>. Its <TT>x</TT> and <TT>y</TT> coordinates should be
changed by <TT>5</TT>.1529 and <TT>-1.1708</TT>. Usually, the command can be
precisely located by its line position in the buffer and one significant
coordinates. In case of conflict, a tag optional argument pass
<TT>\adviedit</TT> will be passed to ActiveDVI and then sent back
to emacs (which is filled in the empty string above).<BR>
<BR>
<!--BEGIN NOTES document-->
<HR WIDTH="50%" SIZE=1><DL CLASS="list"><DT CLASS="dt-list"><A NAME="note1" HREF="#text1"><FONT SIZE=5>1</FONT></A><DD CLASS="dd-list">WhizzyT<sub>E</sub>X is free software,
Copyright 2001, 2002 INRIA
and distributed under the GNU General Public License
(See the COPYING file enclosed with the distribution).
<DT CLASS="dt-list"><A NAME="note2" HREF="#text2"><FONT SIZE=5>2</FONT></A><DD CLASS="dd-list">It has
been reported to successfully work on Windows under Cygwin—See the
<A HREF="FAQ.html">FAQ</A>.
<DT CLASS="dt-list"><A NAME="note3" HREF="#text3"><FONT SIZE=5>3</FONT></A><DD CLASS="dd-list">This
section is not quite up-to-date, hence it puts emphasis on the original
design, but several aspects have changed significantly since the first
version. Implementation of more recent features is thus omitted.
<DT CLASS="dt-list"><A NAME="note4" HREF="#text4"><FONT SIZE=5>4</FONT></A><DD CLASS="dd-list"><TT>\begin{document}</TT> should be typed as such without any white
white space
</DL>
<!--END NOTES-->
<!--HTMLFOOT-->
<!--ENDHTML-->
<!--FOOTER-->
<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by
</EM><A HREF="http://pauillac.inria.fr/~maranget/hevea/index.html"><EM>H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A</EM></A><EM>.</EM></BLOCKQUOTE></BODY>
</HTML>
|