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
|
<!-- -*-html-*- -->
<!-- /u/sy/beebe/tex/bibclean/2-11-4/bibclean.html -->
<!-- Prettyprinted by html-pretty flex version 1.00 [04-Dec-1997] -->
<!-- on Fri Feb 5 09:04:50 1999 -->
<!-- for Nelson H. F. Beebe (beebe@plot79.math.utah.edu) -->
<!-- Warning: Do NOT edit this file. -->
<!-- It was created automatically by man2html.awk Version 1.06 [24-Oct-1997] on Fri Feb 5 09:04:50 MST 1999 -->
<!-- from the file at plot79.math.utah.edu -->
<!DOCTYPE HTML public "-//IETF//DTD HTML//EN">
<!-- ===================================================================== -->
<!-- @Troff-man-file{ -->
<!-- author = "Nelson H. F. Beebe", -->
<!-- version = "2.11.4", -->
<!-- date = "09 May 1998", -->
<!-- time = "23:28:54 MDT", -->
<!-- filename = "bibclean.man", -->
<!-- address = "Center for Scientific Computing -->
<!-- University of Utah -->
<!-- Department of Mathematics, 322 INSCC -->
<!-- 155 S 1400 E RM 233 -->
<!-- Salt Lake City, UT 84112-0090 -->
<!-- USA -->
<!-- telephone = "+1 801 581 5254", -->
<!-- FAX = "+1 801 585 1640, +1 801 581 4148", -->
<!-- URL = "http://www.math.utah.edu/~beebe", -->
<!-- checksum = "23507 1682 6839 71011", -->
<!-- email = "beebe@math.utah.edu, beebe@acm.org, -->
<!-- beebe@ieee.org (Internet)", -->
<!-- codetable = "ISO/ASCII", -->
<!-- keywords = "bibliography, BibTeX, prettyprint", -->
<!-- supported = "yes", -->
<!-- docstring = "This file is the UNIX nroff/troff manual page -->
<!-- documentation for bibclean, a prettyprinter -->
<!-- and syntax checker for BibTeX bibliography -->
<!-- data base files. -->
<!-- -->
<!-- The checksum field above contains a CRC-16 -->
<!-- checksum as the first value, followed by the -->
<!-- equivalent of the standard UNIX wc (word -->
<!-- count) utility output of lines, words, and -->
<!-- characters. This is produced by Robert -->
<!-- Solovay's checksum utility.", -->
<!-- } -->
<!-- ===================================================================== -->
<!-- -->
<!-- .if t .ds Bi B\s-2IB\s+2T\h'-0.1667m'\v'0.20v'E\v'-0.20v'\h'-0.125m'X -->
<!-- -->
<!-- .if t .ds Sc S\s-2CRIBE\s+2 -->
<!-- -->
<!-- .if t .ds Te T\h'-0.1667m'\v'0.20v'E\v'-0.20v'\h'-0.125m'X -->
<!-- -->
<!-- ===================================================================== -->
<HTML>
<HEAD>
<TITLE>
BIBCLEAN 1 "09 May 1998" "Version 2.11.4
"
</TITLE>
<LINK REV="made" HREF="mailto:beebe@plot79.math.utah.edu">
</HEAD>
<BODY>
<P>
<!-- ===================================================================== -->
</P>
<H1>
Table of contents
</H1>
<UL>
<LI>
<A HREF="#HDR.1">
NAME
</A>
</LI>
<LI>
<A HREF="#HDR.2">
SYNOPSIS
</A>
</LI>
<LI>
<A HREF="#HDR.3">
DESCRIPTION
</A>
</LI>
<LI>
<A HREF="#HDR.4">
OPTIONS
</A>
</LI>
<LI>
<A HREF="#HDR.5">
ERROR RECOVERY AND WARNINGS
</A>
</LI>
<LI>
<A HREF="#HDR.6">
INITIALIZATION FILES
</A>
</LI>
<LI>
<A HREF="#HDR.7">
LEXICAL ANALYSIS
</A>
</LI>
<LI>
<A HREF="#HDR.8">
SCRIBE BIBLIOGRAPHY FORMAT
</A>
</LI>
<LI>
<A HREF="#HDR.9">
ENVIRONMENT VARIABLES
</A>
</LI>
<LI>
<A HREF="#HDR.10">
FILES
</A>
</LI>
<LI>
<A HREF="#HDR.11">
SEE ALSO
</A>
</LI>
<LI>
<A HREF="#HDR.12">
AUTHOR
</A>
</LI>
</UL>
<HR>
<H1>
<A NAME="HDR.1">
NAME
</A>
</H1>
<P>
bibclean - prettyprint and syntax check BibTeX and Scribe
bibliography data base files
<!-- ===================================================================== -->
</P>
<HR>
<H1>
<A NAME="HDR.2">
SYNOPSIS
</A>
</H1>
<P>
<STRONG>bibclean</STRONG> [ <STRONG>-author</STRONG> ] [
<STRONG>-error-log</STRONG> <EM> filename</EM> ] [ <STRONG>
-help</STRONG> ] <!-- .if n .ti +9n -->
[ <STRONG>'-?'</STRONG> ] [ <STRONG>-init-file</STRONG> <EM>
filename</EM> ] <!-- .if t .ti +.5i -->
[ <STRONG>-max-width</STRONG> <EM> nnn</EM> ]
<!-- .if n .ti +9n -->
[ <STRONG>-[no-]align-equals</STRONG> ] [ <STRONG>
-[no-]check-values</STRONG> ] <!-- .if n .ti +9n -->
[ <STRONG>-[no-]delete-empty-values</STRONG> ]
<!-- .if n .ti +9n -->
<!-- .if t .ti +.5i -->
[ <STRONG>-[no-]file-position</STRONG> ] [ <STRONG>
-[no-]fix-font-changes</STRONG> ] <!-- .if n .ti +9n -->
[ <STRONG>-[no-]fix-initials</STRONG> ] [ <STRONG>
-[no-]fix-names</STRONG> ] <!-- .if n .ti +9n -->
<!-- .if t .ti +.5i -->
[ <STRONG>-[no-]German-style</STRONG> ] [ <STRONG>
-[no-]keep-linebreaks</STRONG> ] <!-- .if n .ti +9n -->
[ <STRONG>-[no-]keep-parbreaks</STRONG> ]
<!-- .if n .ti +9n -->
<!-- .if t .ti +.5i -->
[ <STRONG>-[no-]keep-preamble-spaces</STRONG> ]
<!-- .if n .ti +9n -->
[ <STRONG>-[no-]keep-spaces</STRONG> ] [ <STRONG>
-[no-]keep-string-spaces</STRONG> ] <!-- .if n .ti +9n -->
<!-- .if t .ti +.5i -->
[ <STRONG>-[no-]parbreaks</STRONG> ] [ <STRONG>
-[no-]prettyprint</STRONG> ] <!-- .if n .ti +9n -->
[ <STRONG>-[no-]print-patterns</STRONG> ]
<!-- .if t .ti +.5i -->
[ <STRONG>-[no-]read-init-files</STRONG> ]
<!-- .if n .ti +9n -->
[ <STRONG>-[no-]remove-OPT-prefixes</STRONG> ] [ <STRONG>
-[no-]scribe</STRONG> ] <!-- .if n .ti +9n -->
<!-- .if t .ti +.5i -->
[ <STRONG>-[no-]trace-file-opening</STRONG> ] [ <STRONG>
-[no-]warnings</STRONG> ] <!-- .if n .ti +9n -->
[ <STRONG>-version</STRONG> ] <!-- .if n .ti +9n -->
<!-- .if t .ti +.5i -->
<EM><infile</EM> or <EM> bibfile1 bibfile2 bibfile3 ...
</EM> <!-- .if n .ti +9n -->
<!-- .if t .ti +.5i -->
<EM>>outfile</EM>
</P>
<P>
All options can be abbreviated to a unique leading prefix.
</P>
<P>
An explicit file name of ``-'' represents standard input; it
is assumed if no input files are specified.
</P>
<P>
On VAX VMS and IBM PC DOS, the leading ``-'' on option names
may be replaced by a slash, ``/''; however, the ``-'' option
prefix is always recognized.
<!-- ===================================================================== -->
</P>
<HR>
<H1>
<A NAME="HDR.3">
DESCRIPTION
</A>
</H1>
<P>
<STRONG>bibclean</STRONG> prettyprints input BibTeX files to
<EM>stdout</EM>, and checks the brace balance and
bibliography entry syntax as well. It can be used to detect
problems in BibTeX files that sometimes confuse even BibTeX
itself, and importantly, can be used to normalize the
appearance of collections of BibTeX files.
</P>
<P>
Here is a summary of the formatting actions:
</P>
<UL>
<LI>
BibTeX items are formatted into a consistent structure
with one <EM>field = "value"</EM> pair per
line, and the initial @ and trailing right brace in
column 1.
</LI>
<LI>
Tabs are expanded into blank strings; their use is
discouraged because they inhibit portability, and can
suffer corruption in electronic mail.
</LI>
<LI>
Long string values are split at a blank and continued
onto the next line with leading indentation.
</LI>
<LI>
A single blank line separates adjacent bibliography
entries.
</LI>
<LI>
Text outside BibTeX entries is passed through verbatim.
</LI>
<LI>
Outer parentheses around entries are converted to
braces.
</LI>
<LI>
Personal names in <EM>author</EM> and <EM>editor</EM>
field values are normalized to the form ``P. D. Q.
Bach'', from ``P.D.Q. Bach'' and ``Bach, P.D.Q.''.
</LI>
<LI>
Hyphen sequences in page numbers are converted to
en-dashes.
</LI>
<LI>
Month values are converted to standard BibTeX string
abbreviations.
</LI>
<LI>
In titles, sequences of upper-case characters at brace
level zero are braced to protect them from being
converted to lower-case letters by some bibliography
styles.
</LI>
<LI>
CODEN, ISBN (International Standard Book Number) and
ISSN (International Standard Serial Number) entry values
are examined to verify the checksums of each listed
number, and correct ISBN hyphenation is automatically
supplied.
</LI>
</UL>
The standardized format of the output of <STRONG>bibclean
</STRONG> facilitates the later application of simple filters,
such as <STRONG>bibcheck</STRONG> (1), <STRONG>bibdup</STRONG>
(1), <STRONG>bibextract</STRONG> (1), <STRONG>bibindex</STRONG>
(1), <STRONG>bibjoin</STRONG> (1), <STRONG>biblabel</STRONG>
(1), <STRONG>biblook</STRONG> (1), <STRONG>biborder</STRONG>
(1), <STRONG>bibsort</STRONG> (1), <STRONG>citefind</STRONG>
(1), and <STRONG>citetags</STRONG> (1), to process the text, and
also is the one expected by the GNU Emacs BibTeX support
functions.
<!-- ===================================================================== -->
<HR>
<H1>
<A NAME="HDR.4">
OPTIONS
</A>
</H1>
<P>
Command-line switches may be abbreviated to a unique leading
prefix, and letter case is <EM>not</EM> significant. All
options are parsed before any input bibliography files are
read, no matter what their order on the command line.
Options that correspond to a yes/no setting of a flag have a
form with a prefix "no-" to set the flag to <EM>no
</EM>. For such options, the last setting determines the
flag value used. This is significant when options are also
specified in initialization files (see the <STRONG>
INITIALIZATION FILES</STRONG> manual section).
</P>
<P>
The leading hyphen that distinguishes an option from a
filename may be doubled, for compatibility with GNU and
POSIX conventions. Thus, <STRONG>-author</STRONG> and
<STRONG>--author</STRONG> are equivalent.
</P>
<P>
To avoid confusion with options, if a filename begins with a
hyphen, it must be disguised by a leading absolute or
relative directory path, e.g., <EM>/tmp/-foo.bib</EM> or
<EM>./-foo.bib</EM>.
<!-- ______________________________________________- -->
</P>
<DL>
<DT>
<STRONG>-author</STRONG>
</DT>
<DD>
Display an author credit on the standard error unit,
<EM>stderr</EM>, and then exit with a success return
code. Sometimes an executable program is separated from
its documentation and source code; this option provides
a way to recover from that.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-error-log</STRONG> <EM> filename</EM>
</DT>
<DD>
Redirect <EM>stderr</EM> to the indicated file, which
will then contain all of the error and warning messages.
This option is provided for those systems that have
difficulty redirecting <EM>stderr</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-help</STRONG> or <STRONG>-?</STRONG>
</DT>
<DD>
Display a help message on <EM>stderr</EM>, giving a
usage description, similar to this section of the manual
pages, and then exit with a success return code.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-init-file</STRONG> <EM> filename</EM>
</DT>
<DD>
Provide an explicit value pattern initialization file.
It will be processed <EM>after</EM> any system-wide and
job-wide initialization files found on the <STRONG>PATH
</STRONG> (for VAX VMS, <STRONG>SYS$SYSTEM</STRONG> )
and <STRONG>BIBINPUTS</STRONG> search paths,
respectively, and may override them. It in turn may be
overridden by a subsequent file-specific initialization
file. The initialization file name can be changed at
compile time, or at run time through a setting of the
environment variable <STRONG>BIBCLEANINI</STRONG>, but
defaults to <EM>.bibcleanrc</EM> on UNIX, and to <EM>
bibclean.ini</EM> elsewhere. For further details, see
the <STRONG>INITIALIZATION FILES</STRONG> manual
section.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-max-width</STRONG> <EM> nnn</EM>
</DT>
<DD>
<STRONG>bibclean</STRONG> normally limits output line
widths to 72 characters, and in the interests of
consistency, that value should not be changed.
Occasionally, special-purpose applications may require
different maximum line widths, so this option provides
that capability. The number following the option name
can be specified in decimal, octal (starting with 0), or
hexadecimal (starting with 0x). A zero or negative value
is interpreted to mean unlimited, so <STRONG>-max-width
</STRONG> <EM> 0</EM> can be used to ensure that each
field/value pair appears on a single line.
<P>
When <STRONG>-no-prettyprint</STRONG> requests
<STRONG>bibclean</STRONG> to act as a lexical
analyzer, the default line width is unlimited,
unless overridden by this option.
</P>
<P>
When <STRONG>bibclean</STRONG> is prettyprinting,
line wrapping will be done only at a space.
Consequently, a long non-blank character sequence
may result in the output exceeding the requested
line width.
</P>
<P>
When <STRONG>bibclean</STRONG> is lexing, line
wrapping is done by inserting a backslash-newline
pair when the specified maximum is reached, so no
line length will ever exceed the maximum.
<!-- ______________________________________________- -->
</P>
</DD>
<DT>
<STRONG>-[no-]align-equals</STRONG>
</DT>
<DD>
With the positive form, align the equals sign in
key/value assignments at the same column, separated by a
single space from the value string. Otherwise, the
equals sign follows the key, separated by a single
space. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]check-values</STRONG>
</DT>
<DD>
With the positive form, apply heuristic pattern matching
to field values in order to detect possible errors
(e.g., `` <EM>year = "192"</EM> '' instead of
`` <EM>year = "1992"</EM> ''), and issue
warnings when unexpected patterns are found.
<P>
This checking is usually beneficial, but if it
produces too many bogus warnings for a particular
bibliography file, you can disable it with the
negative form of this option. Default: <EM>yes</EM>.
<!-- ______________________________________________- -->
</P>
</DD>
<DT>
<STRONG>-[no-]delete-empty-values</STRONG>
</DT>
<DD>
With the positive form, remove all field/value pairs for
which the value is an empty string. This is helpful in
cleaning up bibliographies generated from text editor
templates. Compare this option with <STRONG>
-[no-]remove-OPT-prefixes</STRONG> described below.
Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]file-position</STRONG>
</DT>
<DD>
With the positive form, give detailed file position
information in warning and error messages. Default: <EM>
no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]fix-font-changes</STRONG>
</DT>
<DD>
With the positive form, supply an additional brace level
around font changes in titles to protect against
downcasing by some BibTeX styles. Font changes that
already have more than one level of braces are not
modified.
<P>
For example, if a title contains the Latin phrase
<EM>{\em Dictyostelium Discoideum}</EM> or <EM>{\em
{D}ictyostelium {D}iscoideum}</EM>, then downcasing
will incorrectly convert the phrase to lower-case
letters. Most BibTeX users are surprised that
bracing the initial letters does not prevent the
downcase action. The correct coding is <EM>{{\em
Dictyostelium Discoideum}}</EM>. However, there are
also legitimate cases where an extra level of
bracing wrongly protects from downcasing.
Consequently, <STRONG>bibclean</STRONG> will
normally <EM>not</EM> supply an extra level of
braces, but if you have a bibliography where the
extra braces are routinely missing, you can use this
option to supply them.
</P>
<P>
If you think that you need this option, it is <EM>
strongly</EM> recommended that you apply <STRONG>
bibclean</STRONG> to your bibliography file with and
without <STRONG>-fix-font-changes</STRONG>, then
compare the two output files to ensure that extra
braces are not being supplied in titles where they
should not be present. You will have to decide
which of the two output files is the better choice,
then repair the incorrect title bracing by hand.
</P>
<P>
Since font changes in titles are uncommon, except
for cases of the type which this option is designed
to correct, it should do more good than harm.
Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</P>
</DD>
<DT>
<STRONG>-[no-]fix-initials</STRONG>
</DT>
<DD>
With the positive form, insert a space after a period
following author initials. Default: <EM>yes</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]fix-names</STRONG>
</DT>
<DD>
With the positive form, reorder <EM>author</EM> and <EM>
editor</EM> name lists to remove commas at brace level
zero, placing first names or initials before last names.
Default: <EM>yes</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]German-style</STRONG>
</DT>
<DD>
With the positive form, interpret quote characters [
"] inside <EM>braced</EM> value strings at brace
level 1 according to the conventions of the TeX style
file <EM>german.sty</EM>, which overloads quote to
simplify input and representation of German umlaut
accents, sharp-s (es-zet), ligature separators,
invisible hyphens, raised/lowered quotes, French
guillemets, and discretionary hyphens. Recognized
character combinations will be braced to prevent BibTeX
from interpreting the quote as a string delimiter.
<P>
Quoted strings receive no special handling from this
option, and since German nouns in titles must anyway
be protected from the downcasing operation of most
BibTeX bibliography styles, German value strings
that use the overloaded quote character can always
be entered in the form "{...}", without
the need to specify this option at all.
</P>
<P>
Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</P>
</DD>
<DT>
<STRONG>-[no-]keep-linebreaks</STRONG>
</DT>
<DD>
Normally, line breaks inside value strings are collapsed
into a single space, so that long value strings can
later be broken to provide lines of reasonable length.
<P>
With the positive form, linebreaks are preserved in
value strings. If <STRONG>-max-width</STRONG> is
set to zero, this preserves the original line
breaks. Spacing <EM>outside</EM> value strings
remains under <STRONG>bibclean</STRONG> 's control,
and is not affected by this option.
</P>
<P>
Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</P>
</DD>
<DT>
<STRONG>-[no-]keep-parbreaks</STRONG>
</DT>
<DD>
With the positive form, preserve paragraph breaks
(either formfeeds, or lines containing only spaces) in
value strings. Normally, paragraph breaks are collapsed
into a single space. Spacing <EM>outside</EM> value
strings remains under <STRONG>bibclean</STRONG> 's
control, and is not affected by this option. Default:
<EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]keep-preamble-spaces</STRONG>
</DT>
<DD>
With the positive form, preserve all whitespace in
@Preamble{...} entries. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]keep-spaces</STRONG>
</DT>
<DD>
With the positive form, preserve all spaces in value
strings. Normally, multiple spaces are collapsed into a
single space. This option can be used together with
<STRONG>-keep-linebreaks</STRONG>, <STRONG>
-keep-parbreaks</STRONG>, and <STRONG>-max-width
</STRONG> <EM> 0</EM> to preserve the form of value
strings while still providing syntax and value checking.
Spacing <EM>outside</EM> value strings remains under
<STRONG>bibclean</STRONG> 's control, and is not
affected by this option. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]keep-string-spaces</STRONG>
</DT>
<DD>
With the positive form, preserve all whitespace in
@String{...} entries. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]parbreaks</STRONG>
</DT>
<DD>
With the negative form, a paragraph break (either a
formfeed, or a line containing only spaces) is not
permitted in value strings, or between field/value
pairs. This may be useful to quickly trap runaway
strings arising from mismatched delimiters. Default:
<EM>yes</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]prettyprint</STRONG>
</DT>
<DD>
Normally, <STRONG>bibclean</STRONG> functions as a
prettyprinter. However, with the negative form of this
option, it acts as a lexical analyzer instead, producing
a stream of lexical tokens. See the <STRONG>LEXICAL
ANALYSIS</STRONG> manual section for further details.
Default: <EM>yes</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]print-patterns</STRONG>
</DT>
<DD>
With the positive form, print the value patterns read
from initialization files as they are added to internal
tables. Use this option to check newly-added patterns,
or to see what patterns are being used.
<P>
When <STRONG>bibclean</STRONG> is compiled with
native pattern-matching code (the default), these
patterns are the ones that will be used in checking
value strings for valid syntax, and all of them are
specified in initialization files, rather than
hard-coded into the program. For further details,
see the <STRONG>INITIALIZATION FILES</STRONG> manual
section. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</P>
</DD>
<DT>
<STRONG>-[no-]read-init-files</STRONG>
</DT>
<DD>
With the negative form, suppress loading of system-,
user-, and file-specific initialization files.
Initializations will come <EM>only</EM> from those files
explicitly given by <STRONG>-init-file</STRONG> <EM>
filename</EM> options. Default: <EM>yes</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]remove-OPT-prefixes</STRONG>
</DT>
<DD>
With the positive form, remove the ``OPT'' prefix from
each field name where the corresponding value is <EM>not
</EM> an empty string. The prefix ``OPT'' must be
entirely in upper-case to be recognized.
<P>
This option is for bibliographies generated with the
help of the GNU Emacs BibTeX editing support, which
generates templates with optional fields identified
by the ``OPT'' prefix. Although the function <EM>
M-x</EM> normally bound to the keystrokes <EM>C-c
</EM> does the job, users often forget, with the
result that BibTeX does not recognize the field
name, and ignores the value string. Compare this
option with <STRONG>-[no-]delete-empty-values
</STRONG> described above. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</P>
</DD>
<DT>
<STRONG>-[no-]scribe</STRONG>
</DT>
<DD>
With the positive form, accept input syntax conforming
to the Scribe document system. The output will be
converted to conform to BibTeX syntax. See the <STRONG>
SCRIBE BIBLIOGRAPHY FORMAT</STRONG> manual section for
further details. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]trace-file-opening</STRONG>
</DT>
<DD>
With the positive form, record in the error log file the
names of all files which <STRONG>bibclean</STRONG>
attempts to open. Use this option to identify where
initialization files are located. Default: <EM>no</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-[no-]warnings</STRONG>
</DT>
<DD>
With the positive form, allow all warning messages. The
negative form is <EM>not</EM> recommended since it may
mask problems that should be repaired. Default: <EM>yes
</EM>.
<!-- ______________________________________________- -->
</DD>
<DT>
<STRONG>-version</STRONG>
</DT>
<DD>
Display the program version number on <EM>stderr</EM>,
and then exit with a success return code. This will also
include an indication of who compiled the program, the
host name on which it was compiled, the time of
compilation, and the type of string-value matching code
selected, when that information is available to the
compiler.
<!-- ===================================================================== -->
</DD>
</DL>
<HR>
<H1>
<A NAME="HDR.5">
ERROR RECOVERY AND WARNINGS
</A>
</H1>
<P>
When <STRONG>bibclean</STRONG> detects an error, it issues
an error message to both <EM>stderr</EM> and <EM>stdout</EM>
.
That way, the user is clearly notified, and the output
bibliography also contains the message at the point of
error.
</P>
<P>
Error messages begin with a distinctive pair of queries, ??,
beginning in column 1, followed by the input file name and
line number. If the <STRONG>-file-position</STRONG> option
was specified, they also contain the input and output
positions of the current file, entry, and value. Each
position includes the file byte number, the line number, and
the column number. In the event of a runaway string
argument, the entry and value positions should precisely
pinpoint the erroneous bibliography entry, and the file
positions will indicate where it was detected, which may be
rather later in the files.
</P>
<P>
Warning messages identify possible problems, and are
therefore sent only to <EM>stderr</EM>, and not to <EM>
stdout</EM>, so they never appear in the output file. They
are identified by a distinctive pair of percents, %%,
beginning in column 1, and as with error messages, may be
followed by file position messages if the <STRONG>
-file-position</STRONG> option was specified.
</P>
<P>
For convenience, the first line of each error and warning
message sent to <EM>stderr</EM> is formatted according to
the expectations of the GNU Emacs <EM>next-error</EM>
command. You can invoke <STRONG>bibclean</STRONG> with the
Emacs <EM>M-x compile<RET>bibclean filename.bib >
filename.new</EM> command, then use the <EM>next-error</EM>
command, normally bound to <EM>C-x `</EM> (that's a grave,
or back, accent), to move to the location of the error in
the input file.
</P>
<P>
If error messages are ignored, and left in the output
bibliography file, they will precipitate an error when the
bibliography is next processed with BibTeX.
</P>
<P>
After issuing an error message, <STRONG>bibclean</STRONG>
then resynchronizes its input by copying it verbatim to <EM>
stdout</EM> until a new bibliography entry is recognized on
a line in which the first non-blank character is an at-sign
(@). This ensures that nothing is lost from the input
file(s), allowing corrections to be made in either the input
or the output files. However, if <STRONG>bibclean</STRONG>
detects an internal error in its data structures, it will
terminate abruptly without further input or output
processing; this kind of error should never happen, and if
it does, it should be reported immediately to the author of
the program. Errors in initialization files, and running out
of dynamic memory, will also immediately terminate <STRONG>
bibclean</STRONG>.
<!-- ===================================================================== -->
</P>
<HR>
<H1>
<A NAME="HDR.6">
INITIALIZATION FILES
</A>
</H1>
<P>
<STRONG>bibclean</STRONG> can be compiled with one of three
different types of pattern matching; the choice is made by
the installer at compile time:
</P>
<BLOCKQUOTE>
<UL>
<LI>
The original version uses explicit hand-coded tests
of value-string syntax.
</LI>
<LI>
The second version uses regular-expression
pattern-matching host library routines together with
regular-expression patterns that come entirely from
initialization files.
</LI>
<LI>
The third version uses special patterns that come
entirely from initialization files.
</LI>
</UL>
</BLOCKQUOTE>
<P>
The second and third versions are the ones of most interest
here, because they allow the user to control what values are
considered acceptable. However, command-line options can
also be specified in initialization files, no matter which
pattern matching choice was selected.
</P>
<P>
When <STRONG>bibclean</STRONG> starts, it searches for
initialization files, finding the first one in the system
executable program search path (on UNIX and IBM PC DOS,
<STRONG>PATH</STRONG> ) and the first one in the <STRONG>
BIBINPUTS</STRONG> search path, and processes them in turn.
Then, when command-line arguments are processed, any
additional files specified by <STRONG>-init-file</STRONG>
<EM>filename</EM> options are also processed. Finally,
immediately before each <EM>named</EM> bibliography file is
processed, an attempt is made to process an initialization
file with the same name, but with the extension changed to
<EM>.ini</EM>. The default extension can be changed by a
setting of the environment variable <STRONG>BIBCLEANEXT
</STRONG>. This scheme permits system-wide, user-wide,
session-wide, and file-specific initialization files to be
supported.
</P>
<P>
When input is taken from <EM>stdin</EM>, there is no
file-specific initialization.
</P>
<P>
For precise control, the <STRONG>-no-read-init-files
</STRONG> option suppresses all initialization files except
those explicitly named by <STRONG>-init-file</STRONG> <EM>
filename</EM> options, either on the command line, or in
requested initialization files.
</P>
<P>
Recursive execution of initialization files with nested
<STRONG>-init-file</STRONG> options is permitted; if the
recursion is circular, <STRONG>bibclean</STRONG> will
finally get a non-fatal initialization file open failure
after opening too many files. This terminates further
initialization file processing. As the recursion unwinds,
the files are all closed, then execution proceeds normally.
</P>
<P>
An initialization file may contain empty lines, comments
from percent to end of line (just like TeX), option
switches, and field/pattern or field/pattern/message
assignments. Leading and trailing spaces are ignored. This
is best illustrated by a short example:
</P>
<PRE>
% This is a small bibclean initialization file
-init-file /u/math/bib/.bibcleanrc %% departmental patterns
chapter = "\"D\"" %% 23
pages = "\"D--D\"" %% 23--27
volume = "\"D \an\d D\"" %% 11 and 12
year = \
"\"dddd, dddd, dddd\"" \
"Multiple years specified." %% 1989, 1990, 1991
-no-fix-names %% do not modify author/editor lists
</PRE>
<P>
Long logical lines can be split into multiple physical lines
by breaking at a backslash-newline pair; the
backslash-newline pair is discarded. This processing happens
while characters are being read, before any further
interpretation of the input stream.
</P>
<P>
Each logical line must contain a complete option (and its
value, if any), or a complete field/pattern pair, or a
field/pattern/message triple.
</P>
<P>
Comments are stripped during the parsing of the field,
pattern, and message values. The comment start symbol is
not recognized inside quoted strings, so it can be freely
used in such strings.
</P>
<P>
Comments on logical lines that were input as multiple
physical lines via the backslash-newline convention must
appear on the <EM>last</EM> physical line; otherwise, the
remaining physical lines will become part of the comment.
</P>
<P>
Pattern strings must be enclosed in quotation marks; within
such strings, a backslash starts an escape mechanism that is
commonly used in UNIX software. The recognized escape
sequences are:
</P>
<BLOCKQUOTE>
<DL>
<DT>
<STRONG>\a</STRONG>
</DT>
<DD>
alarm bell (octal 007)
</DD>
<DT>
<STRONG>\b</STRONG>
</DT>
<DD>
backspace (octal 010)
</DD>
<DT>
<STRONG>\f</STRONG>
</DT>
<DD>
formfeed (octal 014)
</DD>
<DT>
<STRONG>\n</STRONG>
</DT>
<DD>
newline (octal 012)
</DD>
<DT>
<STRONG>\r</STRONG>
</DT>
<DD>
carriage return (octal 015)
</DD>
<DT>
<STRONG>\t</STRONG>
</DT>
<DD>
horizontal tab (octal 011)
</DD>
<DT>
<STRONG>\v</STRONG>
</DT>
<DD>
vertical tab (octal 013)
</DD>
<DT>
<STRONG>\ooo</STRONG>
</DT>
<DD>
character number octal <EM>ooo</EM> (e.g <STRONG>
\012</STRONG> is linefeed). Up to 3 octal digits
may be used.
</DD>
<DT>
<STRONG>\0xhh</STRONG>
</DT>
<DD>
character number hexadecimal <EM>hh</EM> (e.g.,
<STRONG>\0x0a</STRONG> is linefeed). <EM>xhh</EM>
may be in either letter case. Any number of
hexadecimal digits may be used.
</DD>
</DL>
</BLOCKQUOTE>
<P>
Backslash followed by any other character produces just that
character. Thus, \% gets a literal percent into a string
(preventing its interpretation as a comment), \"
produces a quotation mark, and \ produces a single
backslash.
</P>
<P>
An ASCII NUL <EM>(\0)</EM> in a string will terminate it;
this is a feature of the C programming language in which
<STRONG>bibclean</STRONG> is implemented.
</P>
<P>
Field/pattern pairs can be separated by arbitrary space, and
optionally, either an equals sign or colon functioning as an
assignment operator. Thus, the following are equivalent:
</P>
<PRE>
pages="\"D--D\""
pages:"\"D--D\""
pages "\"D--D\""
pages = "\"D--D\""
pages : "\"D--D\""
pages "\"D--D\""
</PRE>
<P>
Each field name can have an arbitrary number of patterns
associated with it; however, they must be specified in
separate field/pattern assignments.
</P>
<P>
An empty pattern string causes previously-loaded patterns
for that field name to be forgotten. This feature permits
an initialization file to completely discard patterns from
earlier initialization files.
</P>
<P>
Patterns for value strings are represented in a tiny
special-purpose language that is both convenient and
suitable for bibliography value-string syntax checking.
While not as powerful as the language of regular-expression
patterns, its parsing can be portably implemented in less
than 3% of the code in a widely-used regular-expression
parser (the GNU <STRONG>regexp</STRONG> package).
</P>
<P>
The patterns are represented by the following special
characters:
</P>
<BLOCKQUOTE>
<DL>
<DT>
<STRONG><space></STRONG>
</DT>
<DD>
one or more spaces
</DD>
<DT>
<STRONG>a</STRONG>
</DT>
<DD>
exactly one letter
</DD>
<DT>
<STRONG>A</STRONG>
</DT>
<DD>
one or more letters
</DD>
<DT>
<STRONG>d</STRONG>
</DT>
<DD>
exactly one digit
</DD>
<DT>
<STRONG>D</STRONG>
</DT>
<DD>
one or more digits
</DD>
<DT>
<STRONG>r</STRONG>
</DT>
<DD>
exactly one Roman numeral
</DD>
<DT>
<STRONG>R</STRONG>
</DT>
<DD>
one or more Roman numerals (i.e. a Roman number)
</DD>
<DT>
<STRONG>w</STRONG>
</DT>
<DD>
exactly one word (one or more letters and digits)
</DD>
<DT>
<STRONG>W</STRONG>
</DT>
<DD>
one or more space-separated words, beginning and
ending with a word
</DD>
<DT>
<STRONG>.</STRONG>
</DT>
<DD>
one `special' character, one of the characters <
space>!#()*+,-./:;?[]~, a subset of punctuation
characters that are typically used in string values
</DD>
<DT>
<STRONG>:</STRONG>
</DT>
<DD>
one or more `special' characters
</DD>
<DT>
<STRONG>X</STRONG>
</DT>
<DD>
one or more `special'-separated words, beginning and
ending with a word
</DD>
<DT>
<STRONG>\x</STRONG>
</DT>
<DD>
exactly one x (x is any character), possibly with an
escape sequence interpretation given earlier
</DD>
<DT>
<STRONG>x</STRONG>
</DT>
<DD>
exactly the character x (x is anything but one of
these pattern characters: aAdDrRwW.:<space>\)
</DD>
</DL>
</BLOCKQUOTE>
<P>
The <STRONG>X</STRONG> pattern character is very powerful,
but generally inadvisable, since it will match almost
anything likely to be found in a BibTeX value string. The
reason for providing pattern matching on the value strings
is to uncover possible errors, not mask them.
</P>
<P>
There is no provision for specifying ranges or repetitions
of characters, but this can usually be done with separate
patterns. It is a good idea to accompany the pattern with a
comment showing the kind of thing it is expected to match.
Here is a portion of an initialization file giving a few of
the patterns used to match <EM>number</EM> value strings:
</P>
<PRE>
number = "\"D\"" %% 23
number = "\"A AD\"" %% PN LPS5001
number = "\"A D(D)\"" %% RJ 34(49)
number = "\"A D\"" %% XNSS 288811
number = "\"A D\.D\"" %% Version 3.20
number = "\"A-A-D-D\"" %% UMIAC-TR-89-11
number = "\"A-A-D\"" %% CS-TR-2189
number = "\"A-A-D\.D\"" %% CS-TR-21.7
</PRE>
<P>
For a bibliography that contains only <EM>article</EM>
entries, this list should probably be reduced to just the
first pattern, so that anything other than a digit string
fails the pattern-match test. This is easily done by keeping
bibliography-specific patterns in a corresponding file with
extension <EM>.ini</EM>, since that file is read
automatically.
</P>
<P>
You should be sure to use empty pattern strings in this
pattern file to discard patterns from earlier initialization
files.
</P>
<P>
The value strings passed to the pattern matcher contain
surrounding quotes, so the patterns should also. However,
you could use a pattern specification like "\"D
" to match an initial digit string followed by anything
else; the omission of the final quotation mark \" in
the pattern allows the match to succeed without checking
that the next character in the value string is a quotation
mark.
</P>
<P>
Because the value strings are intended to be processed by
TeX, the pattern matching ignores braces, and TeX control
sequences, together with any space following those control
sequences. Spaces around braces are preserved. This
convention allows the pattern fragment <EM>A-AD-D</EM> to
match the value string <EM>TN-K\slash</EM> 27-70 <EM>,</EM>
because the value is implicitly collapsed to <EM>TN-K27-70
</EM> during the matching operation.
</P>
<P>
<STRONG>bibclean</STRONG> 's normal action when a string
value fails to match any of the corresponding patterns is to
issue a <EM>warning</EM> message something like this: <EM>
"Unexpected value in ``year = "192"''</EM>.
In most cases, that is sufficient to alert the user to a
problem. In some cases, however, it may be desirable to
associate a different message with a particular pattern.
This can be done by supplying a message string following the
pattern string. Format items <EM>%%</EM> (single percent),
<EM>%e</EM> (entry name), <EM>%f</EM> (field name), <EM>%k
</EM> (citation key), and <EM>%v</EM> (string value) are
available to get current values expanded in the messages.
Here is an example:
</P>
<PRE>
chapter = "\"D:D\"" "Colon found in ``%f = %v''" %% 23:2
</PRE>
<P>
To be consistent with other messages output by <STRONG>
bibclean</STRONG>, the message string should <EM>not</EM>
end with punctuation.
</P>
<P>
If you wish to make the message an error, rather than just a
warning, begin it with a query (?), like this:
</P>
<PRE>
chapter = "\"D:D\"" "?Colon found in ``%f = %v''" %% 23:2
</PRE>
<P>
The query will not be included in the output message.
</P>
<P>
Escape sequences are supported in message strings, just as
they are in pattern strings. You can use this to advantage
for fancy things, such as terminal display mode control. If
you rewrite the previous example as
</P>
<PRE>
chapter = "\"D:D\"" \
"?\033[7mColon found in ``%f = %v''\033[0m" %% 23:2
</PRE>
<P>
the error message will appear in inverse video on display
screens that support ANSI terminal control sequences. Such
practice is not normally recommended, since it may have
undesirable effects on some output devices. Nevertheless,
you may find it useful for restricted applications.
</P>
<P>
For some types of bibliography fields, <STRONG>bibclean
</STRONG> contains special-purpose code to supplement or
replace the pattern matching:
</P>
<BLOCKQUOTE>
<UL>
<LI>
<EM>CODEN</EM>, <EM>ISBN</EM> and <EM>ISSN</EM>
field values are handled this way because their
validation requires evaluation of checksums that
cannot be expressed by simple patterns; no patterns
are even used in these three cases.
</LI>
<LI>
When <STRONG>bibclean</STRONG> is compiled with
pattern-matching code support, <EM>chapter</EM>,
<EM>number</EM>, <EM>pages</EM>, and <EM>volume</EM>
values are checked only by pattern matching.
</LI>
<LI>
<EM>month</EM> values are first checked against the
standard BibTeX month abbreviations, and only if no
match is found are patterns then used.
</LI>
<LI>
<EM>year</EM> values are first checked against
patterns, then if no match is found, the year
numbers are found and converted to integer values
for testing against reasonable bounds.
</LI>
</UL>
</BLOCKQUOTE>
<P>
Values for other fields are checked only against patterns.
You can provide patterns for <EM>any</EM> field you like,
even ones <STRONG>bibclean</STRONG> does not already know
about. New ones are simply added to an internal table that
is searched for each string to be validated.
</P>
<P>
The special field, <EM>key</EM>, represents the
bibliographic citation key. It can be given patterns, like
any other field. Here is an initialization file pattern
assignment that will match an author name, a colon, an
alphabetic string, and a two-digit year:
</P>
<PRE>
key = "A:Add" %% Knuth:TB86
</PRE>
<P>
Notice that no quotation marks are included in the pattern,
because the citation keys are not quoted. You can use such
patterns to help enforce uniform naming conventions for
citation keys, which is increasingly important as your
bibliography data base grows.
<!-- ===================================================================== -->
</P>
<HR>
<H1>
<A NAME="HDR.7">
LEXICAL ANALYSIS
</A>
</H1>
<P>
When <STRONG>-no-prettyprint</STRONG> is specified, <STRONG>
bibclean</STRONG> acts as a lexical analyzer instead of a
prettyprinter, producing output in lines of the form
</P>
<BLOCKQUOTE>
<PRE>
<token-number><tab><token-name><tab>"<token-value>"
</PRE>
</BLOCKQUOTE>
<P>
Each output line contains a single complete token,
identified by a small integer number for use by a computer
program, a token type name for human readers, and a string
value in quotes.
</P>
<P>
Special characters in the token value string are represented
with ANSI/ISO Standard C escape sequences, so all characters
other than NUL are representable, and multi-line values can
be represented in a single line.
</P>
<P>
Here are the token numbers and token type names that can
appear in the output when <STRONG>-prettyprint</STRONG> is
specified:
</P>
<BLOCKQUOTE>
<PRE>
0 UNKNOWN
1 ABBREV
2 AT
3 COMMA
4 COMMENT
5 ENTRY
6 EQUALS
7 FIELD
8 INCLUDE
9 INLINE
10 KEY
11 LBRACE
12 LITERAL
13 NEWLINE
14 PREAMBLE
15 RBRACE
16 SHARP
17 SPACE
18 STRING
19 VALUE
</PRE>
</BLOCKQUOTE>
<P>
Programs that parse such output should also be prepared for
lines beginning with the warning prefix, %%, or the error
prefix, ??, and for ANSI/ISO Standard C line number
directives of the form
</P>
<BLOCKQUOTE>
# line 273 "texbook1.bib"
</BLOCKQUOTE>
which record the line number and file name of the current input
file.
<P>
If a <STRONG>-max-width</STRONG> <EM> nnn</EM> command-line
option was specified, long output lines will be wrapped at a
backslash-newline pair, and consequently, software that
processes the lexical token stream should be prepared to
collapse such wrapped lines back into single lines.
</P>
<P>
As an example of the use of <STRONG>-no-prettyprint</STRONG>
,
the UNIX command pipeline
</P>
<BLOCKQUOTE>
<PRE>
<STRONG>bibclean -no-prettyprint</STRONG> <EM>mylib.bib</EM> | \
<STRONG>awk</STRONG> '$2 == "KEY" {print $3}' | \
<STRONG>sed</STRONG> -e 's/"//g' | \
<STRONG>sort</STRONG>
</PRE>
</BLOCKQUOTE>
will extract a sorted list of all citation keys in the file <EM>
mylib.bib</EM>.
<P>
A certain amount of processing will have been done on the
tokens. In particular, delimiters equivalent to braces will
have been replaced by braces, and braced strings will have
become quoted strings.
</P>
<P>
The LITERAL token type is used for arbitrary text that
<STRONG>bibclean</STRONG> does not examine further, such as
the contents of a @Preamble{...} or a @Comment{...}.
</P>
<P>
The UNKNOWN token type should never appear in the output
stream. It is used internally to initialize token type
variables.
<!-- ===================================================================== -->
</P>
<HR>
<H1>
<A NAME="HDR.8">
SCRIBE BIBLIOGRAPHY FORMAT
</A>
</H1>
<P>
<STRONG>bibclean</STRONG> 's support for the Scribe
bibliography format is based on the syntax description in
the Scribe Introductory User's Manual, 3rd Edition, May
1980. Scribe was originally developed by Brian Reid at
Carnegie-Mellon University, and is now marketed by Unilogic,
Ltd.
</P>
<P>
The BibTeX bibliography format was strongly influenced by
Scribe, and indeed, with care, it is possible to share
bibliography files between the two systems. Nevertheless,
there are some differences, so here is a summary of features
of the Scribe bibliography file format:
</P>
<DL>
<DT>
(1)
</DT>
<DD>
Letter case is not significant in field names and entry
names, but case is preserved in value strings.
</DD>
<DT>
(2)
</DT>
<DD>
In field/value pairs, the field and value may be
separated by one of three characters: =, /, or space.
Space may optionally surround these separators.
</DD>
<DT>
(3)
</DT>
<DD>
Value delimiters are any of these seven pairs: { } [ ]
( ) < > ' ' " " ` `
</DD>
<DT>
(4)
</DT>
<DD>
Value delimiters may not be nested, even though with the
first four delimiter pairs, nested balanced delimiters
would be unambiguous.
</DD>
<DT>
(5)
</DT>
<DD>
Delimiters can be omitted around values that contain
only letters, digits, sharp (#), ampersand (&),
period (.), and percent (%).
</DD>
<DT>
(6)
</DT>
<DD>
Outside of delimited values, a literal at-sign (@) is
represented by doubled at-signs (@@).
</DD>
<DT>
(7)
</DT>
<DD>
Bibliography entries begin with @name, as for BibTeX,
but any of the seven Scribe value delimiter pairs may be
used to surround the values in field/value pairs. As in
(4), nested delimiters are forbidden.
</DD>
<DT>
(8)
</DT>
<DD>
Arbitrary space may separate entry names from the
following delimiters.
</DD>
<DT>
(9)
</DT>
<DD>
@Comment is a special command whose delimited value is
discarded. As in (4), nested delimiters are forbidden.
</DD>
<DT>
(10)
</DT>
<DD>
The special form
<PRE>
@Begin{comment}
...
@End{comment}
</PRE>
<P>
permits encapsulating arbitrary text containing any
characters or delimiters, other than
``@End{comment}''. Any of the seven delimiter pairs
may be used around the word ``comment'' following
the ``@Begin'' or ``@End''; the delimiters in the
two cases need not be the same, and consequently,
``@Begin{comment}''/``@End{comment}'' pairs may <EM>
not</EM> be nested.
</P>
</DD>
<DT>
(11)
</DT>
<DD>
The <EM>key</EM> field is required in each bibliography
entry.
</DD>
<DT>
(12)
</DT>
<DD>
A backslashed quote in a string will be assumed to be a
TeX accent, and braced appropriately. While such accents
do not conform to Scribe syntax, Scribe-format
bibliographies have been found that appear to be
intended for TeX processing.
</DD>
</DL>
Because of this loose syntax, <STRONG>bibclean</STRONG> 's
normal error detection heuristics are less effective, and
consequently, Scribe mode input is not the default; it must be
explicitly requested.
<!-- ===================================================================== -->
<HR>
<H1>
<A NAME="HDR.9">
ENVIRONMENT VARIABLES
</A>
</H1>
<DL>
<DT>
<STRONG>BIBCLEANEXT</STRONG>
</DT>
<DD>
File extension of bibliography-specific initialization
files. Default: <EM>.ini</EM>.
</DD>
<DT>
<STRONG>BIBCLEANINI</STRONG>
</DT>
<DD>
Name of <STRONG>bibclean</STRONG> initialization files.
Default: <EM>.bibcleanrc</EM> (UNIX), <EM>bibclean.ini
</EM> (non-UNIX).
</DD>
<DT>
<STRONG>BIBINPUTS</STRONG>
</DT>
<DD>
Search path for <STRONG>bibclean</STRONG> and BibTeX
input files. On UNIX, this is a colon-separated list of
directories that are searched in order from first to
last. It is not an error for a specified directory to
not exist.
<P>
On other operating systems, the directory names
should be separated by whatever character is used in
system search path specifications, such as a
semicolon on IBM PC DOS.
</P>
</DD>
<DT>
<STRONG>PATH</STRONG>
</DT>
<DD>
On Atari TOS, IBM PC DOS, IBM PC OS/2, Microsoft NT, and
UNIX, search path for system executable files. The
system-wide <STRONG>bibclean</STRONG> initialization
file is searched for in this path.
</DD>
<DT>
<STRONG>SYS$SYSTEM</STRONG>
</DT>
<DD>
On VAX VMS, search path for system executable files and
the system-wide <STRONG>bibclean</STRONG> initialization
file.
<!-- ===================================================================== -->
</DD>
</DL>
<HR>
<H1>
<A NAME="HDR.10">
FILES
</A>
</H1>
<DL>
<DT>
<EM>*.bib</EM>
</DT>
<DD>
BibTeX and Scribe bibliography data base files.
</DD>
<DT>
<EM>*.ini</EM>
</DT>
<DD>
File-specific initialization files.
</DD>
<DT>
<EM>.bibcleanrc</EM>
</DT>
<DD>
UNIX system-wide and user-specific initialization files.
</DD>
<DT>
<EM>bibclean.ini</EM>
</DT>
<DD>
Non-UNIX system-wide and user-specific initialization
files.
<!-- ===================================================================== -->
</DD>
</DL>
<HR>
<H1>
<A NAME="HDR.11">
SEE ALSO
</A>
</H1>
<P>
<STRONG>bibcheck</STRONG> (1), <STRONG>bibdup</STRONG> (1),
<STRONG>bibextract</STRONG> (1), <STRONG>bibindex</STRONG>
(1), <STRONG>bibjoin</STRONG> (1), <STRONG>biblabel</STRONG>
(1), <STRONG>biblex</STRONG> (1), <STRONG>biblook</STRONG>
(1), <STRONG>biborder</STRONG> (1), <STRONG>bibparse
</STRONG> (1), <STRONG>bibsort</STRONG> (1), <STRONG>bibtex
</STRONG> (1), <STRONG>bibunlex</STRONG> (1), <STRONG>
citefind</STRONG> (1), <STRONG>citesub</STRONG> (1),
<STRONG>citetags</STRONG> (1), <STRONG>latex</STRONG> (1),
<STRONG>scribe</STRONG> (1), <STRONG>tex</STRONG> (1).
<!-- ===================================================================== -->
</P>
<HR>
<H1>
<A NAME="HDR.12">
AUTHOR
</A>
</H1>
<PRE>
Nelson H. F. Beebe
Center for Scientific Computing
University of Utah
Department of Mathematics, 322 INSCC
155 S 1400 E RM 233
Salt Lake City, UT 84112-0090
USA
Tel: +1 801 581 5254
FAX: +1 801 585 1640, +1 801 581 4148
Email: <A HREF="mailto:beebe@math.utah.edu">beebe@math.utah.edu</A>, <A HREF="mailto:beebe@acm.org">beebe@acm.org</A>, <A HREF="mailto:beebe@ieee.org">beebe@ieee.org</A> (Internet)
URL: <A HREF="http://www.math.utah.edu/~beebe">http://www.math.utah.edu/~beebe</A>
</PRE>
<!-- ===================================================================== -->
<!-- This is for GNU Emacs file-specific customization: -->
<!-- Local Variables: -->
<!-- fill-column: 50 -->
<!-- End: -->
</BODY>
</HTML>
|