home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume38 / annote / part02 < prev    next >
Encoding:
Text File  |  1993-06-19  |  49.6 KB  |  2,477 lines

  1. Newsgroups: comp.sources.misc
  2. From: arrouye@cosmos.imag.fr (Yves Arrouye)
  3. Subject: v38i006:  annote - BibTeX styles supporting annotations, v1.5.1, Part02/04
  4. Message-ID: <1993Jun17.185613.10294@sparky.imd.sterling.com>
  5. X-Md4-Signature: 4b0b73a6abe12542cedde51201451ad5
  6. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  7. Organization: IMAG Institute, University of Grenoble
  8. Date: Thu, 17 Jun 1993 18:56:13 GMT
  9. Approved: kent@sparky.imd.sterling.com
  10.  
  11. Submitted-by: arrouye@cosmos.imag.fr (Yves Arrouye)
  12. Posting-number: Volume 38, Issue 6
  13. Archive-name: annote/part02
  14. Environment: LaTex
  15. Supersedes: annote: Volume 37, Issue 57-59
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of shell archive."
  24. # Contents:  abbrv.bst alpha.bst
  25. # Wrapped by arrouye@cosmos on Tue Jun  8 13:47:08 1993
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. if test -f 'abbrv.bst' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'abbrv.bst'\"
  29. else
  30. echo shar: Extracting \"'abbrv.bst'\" \(21412 characters\)
  31. sed "s/^X//" >'abbrv.bst' <<'END_OF_FILE'
  32. X% Style file modified on Tue Jun  8 12:31:00 1993 with `annotebib.el' v1.5.1
  33. X%                     by Yves.Arrouye <arrouye@cosmos>
  34. X%                     to support the `annote' annotation field.
  35. X% Style file modified on Tue Jun  8 12:31:00 1993 with `annotebib.el' v1.5.1
  36. X%                     by Yves.Arrouye <arrouye@cosmos>
  37. X%                     to support the `commentaire' annotation field.
  38. X
  39. X% This bibliography style was made `annote'-compatible by "annotebib.el".
  40. X% It can be used for both annotated and non-annotated bibliographies listing
  41. X% (`annote' package by Yves Arrouye <arrouye@imag.imag.fr>).
  42. X
  43. X% BibTeX standard bibliography style `abbrv'
  44. X        % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  45. X        % Copyright (C) 1985, all rights reserved.
  46. X        % Copying of this file is authorized only if either
  47. X        % (1) you make absolutely no changes to your copy, including name, or
  48. X        % (2) if you do make changes, you name it something other than
  49. X        % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  50. X        % This restriction helps ensure that all standard styles are identical.
  51. X        % The file btxbst.doc has the documentation for this style.
  52. X
  53. XENTRY
  54. X  { annote
  55. X    commentaire
  56. X    address
  57. X    author
  58. X    booktitle
  59. X    chapter
  60. X    edition
  61. X    editor
  62. X    howpublished
  63. X    institution
  64. X    journal
  65. X    key
  66. X    month
  67. X    note
  68. X    number
  69. X    organization
  70. X    pages
  71. X    publisher
  72. X    school
  73. X    series
  74. X    title
  75. X    type
  76. X    volume
  77. X    year
  78. X  }
  79. X  {}
  80. X  { label }
  81. X
  82. XINTEGERS { output.state before.all mid.sentence after.sentence after.block }
  83. X
  84. XFUNCTION {init.state.consts}
  85. X{ #0 'before.all :=
  86. X  #1 'mid.sentence :=
  87. X  #2 'after.sentence :=
  88. X  #3 'after.block :=
  89. X}
  90. X
  91. XSTRINGS { s t }
  92. X
  93. XFUNCTION {output.nonnull}
  94. X{ 's :=
  95. X  output.state mid.sentence =
  96. X    { ", " * write$ }
  97. X    { output.state after.block =
  98. X        { add.period$ write$
  99. X          newline$
  100. X          "\newblock " write$
  101. X        }
  102. X        { output.state before.all =
  103. X            'write$
  104. X            { add.period$ " " * write$ }
  105. X          if$
  106. X        }
  107. X      if$
  108. X      mid.sentence 'output.state :=
  109. X    }
  110. X  if$
  111. X  s
  112. X}
  113. X
  114. XFUNCTION {output}
  115. X{ duplicate$ empty$
  116. X    'pop$
  117. X    'output.nonnull
  118. X  if$
  119. X}
  120. X
  121. XFUNCTION {output.check}
  122. X{ 't :=
  123. X  duplicate$ empty$
  124. X    { pop$ "empty " t * " in " * cite$ * warning$ }
  125. X    'output.nonnull
  126. X  if$
  127. X}
  128. X
  129. XFUNCTION {output.bibitem}
  130. X{ newline$
  131. X  "\bibitem{" write$
  132. X  cite$ write$
  133. X  "}" write$
  134. X  newline$
  135. X  ""
  136. X  before.all 'output.state :=
  137. X}
  138. X
  139. XFUNCTION {annotebib.format.commentaire}
  140. X{ commentaire empty$
  141. X        { "" }
  142. X        { "\ifx\commentaire\undefined\else\begin{commentaire} "
  143. X          commentaire
  144. X          * " \end{commentaire}\fi " *
  145. X        }
  146. X      if$
  147. X}
  148. X
  149. XFUNCTION {annotebib.format.annote}
  150. X{ annote empty$
  151. X        { "" }
  152. X        { "\ifx\annote\undefined\else\begin{annote} "
  153. X          annote
  154. X          * " \end{annote}\fi " *
  155. X        }
  156. X      if$
  157. X}
  158. X
  159. XFUNCTION {fin.entry}
  160. X{ add.period$
  161. X  write$
  162. X  newline$
  163. X  annotebib.format.commentaire write$
  164. X  annotebib.format.annote write$
  165. X}
  166. X
  167. XFUNCTION {new.block}
  168. X{ output.state before.all =
  169. X    'skip$
  170. X    { after.block 'output.state := }
  171. X  if$
  172. X}
  173. X
  174. XFUNCTION {new.sentence}
  175. X{ output.state after.block =
  176. X    'skip$
  177. X    { output.state before.all =
  178. X        'skip$
  179. X        { after.sentence 'output.state := }
  180. X      if$
  181. X    }
  182. X  if$
  183. X}
  184. X
  185. XFUNCTION {not}
  186. X{   { #0 }
  187. X    { #1 }
  188. X  if$
  189. X}
  190. X
  191. XFUNCTION {and}
  192. X{   'skip$
  193. X    { pop$ #0 }
  194. X  if$
  195. X}
  196. X
  197. XFUNCTION {or}
  198. X{   { pop$ #1 }
  199. X    'skip$
  200. X  if$
  201. X}
  202. X
  203. XFUNCTION {new.block.checka}
  204. X{ empty$
  205. X    'skip$
  206. X    'new.block
  207. X  if$
  208. X}
  209. X
  210. XFUNCTION {new.block.checkb}
  211. X{ empty$
  212. X  swap$ empty$
  213. X  and
  214. X    'skip$
  215. X    'new.block
  216. X  if$
  217. X}
  218. X
  219. XFUNCTION {new.sentence.checka}
  220. X{ empty$
  221. X    'skip$
  222. X    'new.sentence
  223. X  if$
  224. X}
  225. X
  226. XFUNCTION {new.sentence.checkb}
  227. X{ empty$
  228. X  swap$ empty$
  229. X  and
  230. X    'skip$
  231. X    'new.sentence
  232. X  if$
  233. X}
  234. X
  235. XFUNCTION {field.or.null}
  236. X{ duplicate$ empty$
  237. X    { pop$ "" }
  238. X    'skip$
  239. X  if$
  240. X}
  241. X
  242. XFUNCTION {emphasize}
  243. X{ duplicate$ empty$
  244. X    { pop$ "" }
  245. X    { "{\em " swap$ * "}" * }
  246. X  if$
  247. X}
  248. X
  249. XINTEGERS { nameptr namesleft numnames }
  250. X
  251. XFUNCTION {format.names}
  252. X{ 's :=
  253. X  #1 'nameptr :=
  254. X  s num.names$ 'numnames :=
  255. X  numnames 'namesleft :=
  256. X    { namesleft #0 > }
  257. X    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  258. X      nameptr #1 >
  259. X        { namesleft #1 >
  260. X            { ", " * t * }
  261. X            { numnames #2 >
  262. X                { "," * }
  263. X                'skip$
  264. X              if$
  265. X              t "others" =
  266. X                { " et~al." * }
  267. X                { " and " * t * }
  268. X              if$
  269. X            }
  270. X          if$
  271. X        }
  272. X        't
  273. X      if$
  274. X      nameptr #1 + 'nameptr :=
  275. X      namesleft #1 - 'namesleft :=
  276. X    }
  277. X  while$
  278. X}
  279. X
  280. XFUNCTION {format.authors}
  281. X{ author empty$
  282. X    { "" }
  283. X    { author format.names }
  284. X  if$
  285. X}
  286. X
  287. XFUNCTION {format.editors}
  288. X{ editor empty$
  289. X    { "" }
  290. X    { editor format.names
  291. X      editor num.names$ #1 >
  292. X        { ", editors" * }
  293. X        { ", editor" * }
  294. X      if$
  295. X    }
  296. X  if$
  297. X}
  298. X
  299. XFUNCTION {format.title}
  300. X{ title empty$
  301. X    { "" }
  302. X    { title "t" change.case$ }
  303. X  if$
  304. X}
  305. X
  306. XFUNCTION {n.dashify}
  307. X{ 't :=
  308. X  ""
  309. X    { t empty$ not }
  310. X    { t #1 #1 substring$ "-" =
  311. X        { t #1 #2 substring$ "--" = not
  312. X            { "--" *
  313. X              t #2 global.max$ substring$ 't :=
  314. X            }
  315. X            {   { t #1 #1 substring$ "-" = }
  316. X                { "-" *
  317. X                  t #2 global.max$ substring$ 't :=
  318. X                }
  319. X              while$
  320. X            }
  321. X          if$
  322. X        }
  323. X        { t #1 #1 substring$ *
  324. X          t #2 global.max$ substring$ 't :=
  325. X        }
  326. X      if$
  327. X    }
  328. X  while$
  329. X}
  330. X
  331. XFUNCTION {format.date}
  332. X{ year empty$
  333. X    { month empty$
  334. X        { "" }
  335. X        { "there's a month but no year in " cite$ * warning$
  336. X          month
  337. X        }
  338. X      if$
  339. X    }
  340. X    { month empty$
  341. X        'year
  342. X        { month " " * year * }
  343. X      if$
  344. X    }
  345. X  if$
  346. X}
  347. X
  348. XFUNCTION {format.btitle}
  349. X{ title emphasize
  350. X}
  351. X
  352. XFUNCTION {tie.or.space.connect}
  353. X{ duplicate$ text.length$ #3 <
  354. X    { "~" }
  355. X    { " " }
  356. X  if$
  357. X  swap$ * *
  358. X}
  359. X
  360. XFUNCTION {either.or.check}
  361. X{ empty$
  362. X    'pop$
  363. X    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  364. X  if$
  365. X}
  366. X
  367. XFUNCTION {format.bvolume}
  368. X{ volume empty$
  369. X    { "" }
  370. X    { "volume" volume tie.or.space.connect
  371. X      series empty$
  372. X        'skip$
  373. X        { " of " * series emphasize * }
  374. X      if$
  375. X      "volume and number" number either.or.check
  376. X    }
  377. X  if$
  378. X}
  379. X
  380. XFUNCTION {format.number.series}
  381. X{ volume empty$
  382. X    { number empty$
  383. X        { series field.or.null }
  384. X        { output.state mid.sentence =
  385. X            { "number" }
  386. X            { "Number" }
  387. X          if$
  388. X          number tie.or.space.connect
  389. X          series empty$
  390. X            { "there's a number but no series in " cite$ * warning$ }
  391. X            { " in " * series * }
  392. X          if$
  393. X        }
  394. X      if$
  395. X    }
  396. X    { "" }
  397. X  if$
  398. X}
  399. X
  400. XFUNCTION {format.edition}
  401. X{ edition empty$
  402. X    { "" }
  403. X    { output.state mid.sentence =
  404. X        { edition "l" change.case$ " edition" * }
  405. X        { edition "t" change.case$ " edition" * }
  406. X      if$
  407. X    }
  408. X  if$
  409. X}
  410. X
  411. XINTEGERS { multiresult }
  412. X
  413. XFUNCTION {multi.page.check}
  414. X{ 't :=
  415. X  #0 'multiresult :=
  416. X    { multiresult not
  417. X      t empty$ not
  418. X      and
  419. X    }
  420. X    { t #1 #1 substring$
  421. X      duplicate$ "-" =
  422. X      swap$ duplicate$ "," =
  423. X      swap$ "+" =
  424. X      or or
  425. X        { #1 'multiresult := }
  426. X        { t #2 global.max$ substring$ 't := }
  427. X      if$
  428. X    }
  429. X  while$
  430. X  multiresult
  431. X}
  432. X
  433. XFUNCTION {format.pages}
  434. X{ pages empty$
  435. X    { "" }
  436. X    { pages multi.page.check
  437. X        { "pages" pages n.dashify tie.or.space.connect }
  438. X        { "page" pages tie.or.space.connect }
  439. X      if$
  440. X    }
  441. X  if$
  442. X}
  443. X
  444. XFUNCTION {format.vol.num.pages}
  445. X{ volume field.or.null
  446. X  number empty$
  447. X    'skip$
  448. X    { "(" number * ")" * *
  449. X      volume empty$
  450. X        { "there's a number but no volume in " cite$ * warning$ }
  451. X        'skip$
  452. X      if$
  453. X    }
  454. X  if$
  455. X  pages empty$
  456. X    'skip$
  457. X    { duplicate$ empty$
  458. X        { pop$ format.pages }
  459. X        { ":" * pages n.dashify * }
  460. X      if$
  461. X    }
  462. X  if$
  463. X}
  464. X
  465. XFUNCTION {format.chapter.pages}
  466. X{ chapter empty$
  467. X    'format.pages
  468. X    { type empty$
  469. X        { "chapter" }
  470. X        { type "l" change.case$ }
  471. X      if$
  472. X      chapter tie.or.space.connect
  473. X      pages empty$
  474. X        'skip$
  475. X        { ", " * format.pages * }
  476. X      if$
  477. X    }
  478. X  if$
  479. X}
  480. X
  481. XFUNCTION {format.in.ed.booktitle}
  482. X{ booktitle empty$
  483. X    { "" }
  484. X    { editor empty$
  485. X        { "In " booktitle emphasize * }
  486. X        { "In " format.editors * ", " * booktitle emphasize * }
  487. X      if$
  488. X    }
  489. X  if$
  490. X}
  491. X
  492. XFUNCTION {empty.misc.check}
  493. X{ author empty$ title empty$ howpublished empty$
  494. X  month empty$ year empty$ note empty$
  495. X  and and and and and
  496. X  key empty$ not and
  497. X    { "all relevant fields are empty in " cite$ * warning$ }
  498. X    'skip$
  499. X  if$
  500. X}
  501. X
  502. XFUNCTION {format.thesis.type}
  503. X{ type empty$
  504. X    'skip$
  505. X    { pop$
  506. X      type "t" change.case$
  507. X    }
  508. X  if$
  509. X}
  510. X
  511. XFUNCTION {format.tr.number}
  512. X{ type empty$
  513. X    { "Technical Report" }
  514. X    'type
  515. X  if$
  516. X  number empty$
  517. X    { "t" change.case$ }
  518. X    { number tie.or.space.connect }
  519. X  if$
  520. X}
  521. X
  522. XFUNCTION {format.article.crossref}
  523. X{ key empty$
  524. X    { journal empty$
  525. X        { "need key or journal for " cite$ * " to crossref " * crossref *
  526. X          warning$
  527. X          ""
  528. X        }
  529. X        { "In {\em " journal * "\/}" * }
  530. X      if$
  531. X    }
  532. X    { "In " key * }
  533. X  if$
  534. X  " \cite{" * crossref * "}" *
  535. X}
  536. X
  537. XFUNCTION {format.crossref.editor}
  538. X{ editor #1 "{vv~}{ll}" format.name$
  539. X  editor num.names$ duplicate$
  540. X  #2 >
  541. X    { pop$ " et~al." * }
  542. X    { #2 <
  543. X        'skip$
  544. X        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  545. X            { " et~al." * }
  546. X            { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  547. X          if$
  548. X        }
  549. X      if$
  550. X    }
  551. X  if$
  552. X}
  553. X
  554. XFUNCTION {format.book.crossref}
  555. X{ volume empty$
  556. X    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  557. X      "In "
  558. X    }
  559. X    { "Volume" volume tie.or.space.connect
  560. X      " of " *
  561. X    }
  562. X  if$
  563. X  editor empty$
  564. X  editor field.or.null author field.or.null =
  565. X  or
  566. X    { key empty$
  567. X        { series empty$
  568. X            { "need editor, key, or series for " cite$ * " to crossref " *
  569. X              crossref * warning$
  570. X              "" *
  571. X            }
  572. X            { "{\em " * series * "\/}" * }
  573. X          if$
  574. X        }
  575. X        { key * }
  576. X      if$
  577. X    }
  578. X    { format.crossref.editor * }
  579. X  if$
  580. X  " \cite{" * crossref * "}" *
  581. X}
  582. X
  583. XFUNCTION {format.incoll.inproc.crossref}
  584. X{ editor empty$
  585. X  editor field.or.null author field.or.null =
  586. X  or
  587. X    { key empty$
  588. X        { booktitle empty$
  589. X            { "need editor, key, or booktitle for " cite$ * " to crossref " *
  590. X              crossref * warning$
  591. X              ""
  592. X            }
  593. X            { "In {\em " booktitle * "\/}" * }
  594. X          if$
  595. X        }
  596. X        { "In " key * }
  597. X      if$
  598. X    }
  599. X    { "In " format.crossref.editor * }
  600. X  if$
  601. X  " \cite{" * crossref * "}" *
  602. X}
  603. X
  604. XFUNCTION {article}
  605. X{ output.bibitem
  606. X  format.authors "author" output.check
  607. X  new.block
  608. X  format.title "title" output.check
  609. X  new.block
  610. X  crossref missing$
  611. X    { journal emphasize "journal" output.check
  612. X      format.vol.num.pages output
  613. X      format.date "year" output.check
  614. X    }
  615. X    { format.article.crossref output.nonnull
  616. X      format.pages output
  617. X    }
  618. X  if$
  619. X  new.block
  620. X  note output
  621. X  fin.entry
  622. X}
  623. X
  624. XFUNCTION {book}
  625. X{ output.bibitem
  626. X  author empty$
  627. X    { format.editors "author and editor" output.check }
  628. X    { format.authors output.nonnull
  629. X      crossref missing$
  630. X        { "author and editor" editor either.or.check }
  631. X        'skip$
  632. X      if$
  633. X    }
  634. X  if$
  635. X  new.block
  636. X  format.btitle "title" output.check
  637. X  crossref missing$
  638. X    { format.bvolume output
  639. X      new.block
  640. X      format.number.series output
  641. X      new.sentence
  642. X      publisher "publisher" output.check
  643. X      address output
  644. X    }
  645. X    { new.block
  646. X      format.book.crossref output.nonnull
  647. X    }
  648. X  if$
  649. X  format.edition output
  650. X  format.date "year" output.check
  651. X  new.block
  652. X  note output
  653. X  fin.entry
  654. X}
  655. X
  656. XFUNCTION {booklet}
  657. X{ output.bibitem
  658. X  format.authors output
  659. X  new.block
  660. X  format.title "title" output.check
  661. X  howpublished address new.block.checkb
  662. X  howpublished output
  663. X  address output
  664. X  format.date output
  665. X  new.block
  666. X  note output
  667. X  fin.entry
  668. X}
  669. X
  670. XFUNCTION {inbook}
  671. X{ output.bibitem
  672. X  author empty$
  673. X    { format.editors "author and editor" output.check }
  674. X    { format.authors output.nonnull
  675. X      crossref missing$
  676. X        { "author and editor" editor either.or.check }
  677. X        'skip$
  678. X      if$
  679. X    }
  680. X  if$
  681. X  new.block
  682. X  format.btitle "title" output.check
  683. X  crossref missing$
  684. X    { format.bvolume output
  685. X      format.chapter.pages "chapter and pages" output.check
  686. X      new.block
  687. X      format.number.series output
  688. X      new.sentence
  689. X      publisher "publisher" output.check
  690. X      address output
  691. X    }
  692. X    { format.chapter.pages "chapter and pages" output.check
  693. X      new.block
  694. X      format.book.crossref output.nonnull
  695. X    }
  696. X  if$
  697. X  format.edition output
  698. X  format.date "year" output.check
  699. X  new.block
  700. X  note output
  701. X  fin.entry
  702. X}
  703. X
  704. XFUNCTION {incollection}
  705. X{ output.bibitem
  706. X  format.authors "author" output.check
  707. X  new.block
  708. X  format.title "title" output.check
  709. X  new.block
  710. X  crossref missing$
  711. X    { format.in.ed.booktitle "booktitle" output.check
  712. X      format.bvolume output
  713. X      format.number.series output
  714. X      format.chapter.pages output
  715. X      new.sentence
  716. X      publisher "publisher" output.check
  717. X      address output
  718. X      format.edition output
  719. X      format.date "year" output.check
  720. X    }
  721. X    { format.incoll.inproc.crossref output.nonnull
  722. X      format.chapter.pages output
  723. X    }
  724. X  if$
  725. X  new.block
  726. X  note output
  727. X  fin.entry
  728. X}
  729. X
  730. XFUNCTION {inproceedings}
  731. X{ output.bibitem
  732. X  format.authors "author" output.check
  733. X  new.block
  734. X  format.title "title" output.check
  735. X  new.block
  736. X  crossref missing$
  737. X    { format.in.ed.booktitle "booktitle" output.check
  738. X      format.bvolume output
  739. X      format.number.series output
  740. X      format.pages output
  741. X      address empty$
  742. X        { organization publisher new.sentence.checkb
  743. X          organization output
  744. X          publisher output
  745. X          format.date "year" output.check
  746. X        }
  747. X        { address output.nonnull
  748. X          format.date "year" output.check
  749. X          new.sentence
  750. X          organization output
  751. X          publisher output
  752. X        }
  753. X      if$
  754. X    }
  755. X    { format.incoll.inproc.crossref output.nonnull
  756. X      format.pages output
  757. X    }
  758. X  if$
  759. X  new.block
  760. X  note output
  761. X  fin.entry
  762. X}
  763. X
  764. XFUNCTION {conference} { inproceedings }
  765. X
  766. XFUNCTION {manual}
  767. X{ output.bibitem
  768. X  author empty$
  769. X    { organization empty$
  770. X        'skip$
  771. X        { organization output.nonnull
  772. X          address output
  773. X        }
  774. X      if$
  775. X    }
  776. X    { format.authors output.nonnull }
  777. X  if$
  778. X  new.block
  779. X  format.btitle "title" output.check
  780. X  author empty$
  781. X    { organization empty$
  782. X        { address new.block.checka
  783. X          address output
  784. X        }
  785. X        'skip$
  786. X      if$
  787. X    }
  788. X    { organization address new.block.checkb
  789. X      organization output
  790. X      address output
  791. X    }
  792. X  if$
  793. X  format.edition output
  794. X  format.date output
  795. X  new.block
  796. X  note output
  797. X  fin.entry
  798. X}
  799. X
  800. XFUNCTION {mastersthesis}
  801. X{ output.bibitem
  802. X  format.authors "author" output.check
  803. X  new.block
  804. X  format.title "title" output.check
  805. X  new.block
  806. X  "Master's thesis" format.thesis.type output.nonnull
  807. X  school "school" output.check
  808. X  address output
  809. X  format.date "year" output.check
  810. X  new.block
  811. X  note output
  812. X  fin.entry
  813. X}
  814. X
  815. XFUNCTION {misc}
  816. X{ output.bibitem
  817. X  format.authors output
  818. X  title howpublished new.block.checkb
  819. X  format.title output
  820. X  howpublished new.block.checka
  821. X  howpublished output
  822. X  format.date output
  823. X  new.block
  824. X  note output
  825. X  fin.entry
  826. X  empty.misc.check
  827. X}
  828. X
  829. XFUNCTION {phdthesis}
  830. X{ output.bibitem
  831. X  format.authors "author" output.check
  832. X  new.block
  833. X  format.btitle "title" output.check
  834. X  new.block
  835. X  "PhD thesis" format.thesis.type output.nonnull
  836. X  school "school" output.check
  837. X  address output
  838. X  format.date "year" output.check
  839. X  new.block
  840. X  note output
  841. X  fin.entry
  842. X}
  843. X
  844. XFUNCTION {proceedings}
  845. X{ output.bibitem
  846. X  editor empty$
  847. X    { organization output }
  848. X    { format.editors output.nonnull }
  849. X  if$
  850. X  new.block
  851. X  format.btitle "title" output.check
  852. X  format.bvolume output
  853. X  format.number.series output
  854. X  address empty$
  855. X    { editor empty$
  856. X        { publisher new.sentence.checka }
  857. X        { organization publisher new.sentence.checkb
  858. X          organization output
  859. X        }
  860. X      if$
  861. X      publisher output
  862. X      format.date "year" output.check
  863. X    }
  864. X    { address output.nonnull
  865. X      format.date "year" output.check
  866. X      new.sentence
  867. X      editor empty$
  868. X        'skip$
  869. X        { organization output }
  870. X      if$
  871. X      publisher output
  872. X    }
  873. X  if$
  874. X  new.block
  875. X  note output
  876. X  fin.entry
  877. X}
  878. X
  879. XFUNCTION {techreport}
  880. X{ output.bibitem
  881. X  format.authors "author" output.check
  882. X  new.block
  883. X  format.title "title" output.check
  884. X  new.block
  885. X  format.tr.number output.nonnull
  886. X  institution "institution" output.check
  887. X  address output
  888. X  format.date "year" output.check
  889. X  new.block
  890. X  note output
  891. X  fin.entry
  892. X}
  893. X
  894. XFUNCTION {unpublished}
  895. X{ output.bibitem
  896. X  format.authors "author" output.check
  897. X  new.block
  898. X  format.title "title" output.check
  899. X  new.block
  900. X  note "note" output.check
  901. X  format.date output
  902. X  fin.entry
  903. X}
  904. X
  905. XFUNCTION {default.type} { misc }
  906. X
  907. XMACRO {jan} {"Jan."}
  908. X
  909. XMACRO {feb} {"Feb."}
  910. X
  911. XMACRO {mar} {"Mar."}
  912. X
  913. XMACRO {apr} {"Apr."}
  914. X
  915. XMACRO {may} {"May"}
  916. X
  917. XMACRO {jun} {"June"}
  918. X
  919. XMACRO {jul} {"July"}
  920. X
  921. XMACRO {aug} {"Aug."}
  922. X
  923. XMACRO {sep} {"Sept."}
  924. X
  925. XMACRO {oct} {"Oct."}
  926. X
  927. XMACRO {nov} {"Nov."}
  928. X
  929. XMACRO {dec} {"Dec."}
  930. X
  931. XMACRO {acmcs} {"ACM Comput. Surv."}
  932. X
  933. XMACRO {acta} {"Acta Inf."}
  934. X
  935. XMACRO {cacm} {"Commun. ACM"}
  936. X
  937. XMACRO {ibmjrd} {"IBM J. Res. Dev."}
  938. X
  939. XMACRO {ibmsj} {"IBM Syst.~J."}
  940. X
  941. XMACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  942. X
  943. XMACRO {ieeetc} {"IEEE Trans. Comput."}
  944. X
  945. XMACRO {ieeetcad}
  946. X {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  947. X
  948. XMACRO {ipl} {"Inf. Process. Lett."}
  949. X
  950. XMACRO {jacm} {"J.~ACM"}
  951. X
  952. XMACRO {jcss} {"J.~Comput. Syst. Sci."}
  953. X
  954. XMACRO {scp} {"Sci. Comput. Programming"}
  955. X
  956. XMACRO {sicomp} {"SIAM J. Comput."}
  957. X
  958. XMACRO {tocs} {"ACM Trans. Comput. Syst."}
  959. X
  960. XMACRO {tods} {"ACM Trans. Database Syst."}
  961. X
  962. XMACRO {tog} {"ACM Trans. Gr."}
  963. X
  964. XMACRO {toms} {"ACM Trans. Math. Softw."}
  965. X
  966. XMACRO {toois} {"ACM Trans. Office Inf. Syst."}
  967. X
  968. XMACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  969. X
  970. XMACRO {tcs} {"Theoretical Comput. Sci."}
  971. X
  972. XREAD
  973. X
  974. XFUNCTION {sortify}
  975. X{ purify$
  976. X  "l" change.case$
  977. X}
  978. X
  979. XINTEGERS { len }
  980. X
  981. XFUNCTION {chop.word}
  982. X{ 's :=
  983. X  'len :=
  984. X  s #1 len substring$ =
  985. X    { s len #1 + global.max$ substring$ }
  986. X    's
  987. X  if$
  988. X}
  989. X
  990. XFUNCTION {sort.format.names}
  991. X{ 's :=
  992. X  #1 'nameptr :=
  993. X  ""
  994. X  s num.names$ 'numnames :=
  995. X  numnames 'namesleft :=
  996. X    { namesleft #0 > }
  997. X    { nameptr #1 >
  998. X        { "   " * }
  999. X        'skip$
  1000. X      if$
  1001. X      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
  1002. X      nameptr numnames = t "others" = and
  1003. X        { "et al" * }
  1004. X        { t sortify * }
  1005. X      if$
  1006. X      nameptr #1 + 'nameptr :=
  1007. X      namesleft #1 - 'namesleft :=
  1008. X    }
  1009. X  while$
  1010. X}
  1011. X
  1012. XFUNCTION {sort.format.title}
  1013. X{ 't :=
  1014. X  "A " #2
  1015. X    "An " #3
  1016. X      "The " #4 t chop.word
  1017. X    chop.word
  1018. X  chop.word
  1019. X  sortify
  1020. X  #1 global.max$ substring$
  1021. X}
  1022. X
  1023. XFUNCTION {author.sort}
  1024. X{ author empty$
  1025. X    { key empty$
  1026. X        { "to sort, need author or key in " cite$ * warning$
  1027. X          ""
  1028. X        }
  1029. X        { key sortify }
  1030. X      if$
  1031. X    }
  1032. X    { author sort.format.names }
  1033. X  if$
  1034. X}
  1035. X
  1036. XFUNCTION {author.editor.sort}
  1037. X{ author empty$
  1038. X    { editor empty$
  1039. X        { key empty$
  1040. X            { "to sort, need author, editor, or key in " cite$ * warning$
  1041. X              ""
  1042. X            }
  1043. X            { key sortify }
  1044. X          if$
  1045. X        }
  1046. X        { editor sort.format.names }
  1047. X      if$
  1048. X    }
  1049. X    { author sort.format.names }
  1050. X  if$
  1051. X}
  1052. X
  1053. XFUNCTION {author.organization.sort}
  1054. X{ author empty$
  1055. X    { organization empty$
  1056. X        { key empty$
  1057. X            { "to sort, need author, organization, or key in " cite$ * warning$
  1058. X              ""
  1059. X            }
  1060. X            { key sortify }
  1061. X          if$
  1062. X        }
  1063. X        { "The " #4 organization chop.word sortify }
  1064. X      if$
  1065. X    }
  1066. X    { author sort.format.names }
  1067. X  if$
  1068. X}
  1069. X
  1070. XFUNCTION {editor.organization.sort}
  1071. X{ editor empty$
  1072. X    { organization empty$
  1073. X        { key empty$
  1074. X            { "to sort, need editor, organization, or key in " cite$ * warning$
  1075. X              ""
  1076. X            }
  1077. X            { key sortify }
  1078. X          if$
  1079. X        }
  1080. X        { "The " #4 organization chop.word sortify }
  1081. X      if$
  1082. X    }
  1083. X    { editor sort.format.names }
  1084. X  if$
  1085. X}
  1086. X
  1087. XFUNCTION {presort}
  1088. X{ type$ "book" =
  1089. X  type$ "inbook" =
  1090. X  or
  1091. X    'author.editor.sort
  1092. X    { type$ "proceedings" =
  1093. X        'editor.organization.sort
  1094. X        { type$ "manual" =
  1095. X            'author.organization.sort
  1096. X            'author.sort
  1097. X          if$
  1098. X        }
  1099. X      if$
  1100. X    }
  1101. X  if$
  1102. X  "    "
  1103. X  *
  1104. X  year field.or.null sortify
  1105. X  *
  1106. X  "    "
  1107. X  *
  1108. X  title field.or.null
  1109. X  sort.format.title
  1110. X  *
  1111. X  #1 entry.max$ substring$
  1112. X  'sort.key$ :=
  1113. X}
  1114. X
  1115. XITERATE {presort}
  1116. X
  1117. XSORT
  1118. X
  1119. XSTRINGS { longest.label }
  1120. X
  1121. XINTEGERS { number.label longest.label.width }
  1122. X
  1123. XFUNCTION {initialize.longest.label}
  1124. X{ "" 'longest.label :=
  1125. X  #1 'number.label :=
  1126. X  #0 'longest.label.width :=
  1127. X}
  1128. X
  1129. XFUNCTION {longest.label.pass}
  1130. X{ number.label int.to.str$ 'label :=
  1131. X  number.label #1 + 'number.label :=
  1132. X  label width$ longest.label.width >
  1133. X    { label 'longest.label :=
  1134. X      label width$ 'longest.label.width :=
  1135. X    }
  1136. X    'skip$
  1137. X  if$
  1138. X}
  1139. X
  1140. XEXECUTE {initialize.longest.label}
  1141. X
  1142. XITERATE {longest.label.pass}
  1143. X
  1144. XFUNCTION {begin.bib}
  1145. X{ preamble$ empty$
  1146. X    'skip$
  1147. X    { preamble$ write$ newline$ }
  1148. X  if$
  1149. X  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1150. X}
  1151. X
  1152. XEXECUTE {begin.bib}
  1153. X
  1154. XEXECUTE {init.state.consts}
  1155. X
  1156. XITERATE {call.type$}
  1157. X
  1158. XFUNCTION {end.bib}
  1159. X{ newline$
  1160. X  "\end{thebibliography}" write$ newline$
  1161. X}
  1162. X
  1163. XEXECUTE {end.bib}
  1164. END_OF_FILE
  1165. if test 21412 -ne `wc -c <'abbrv.bst'`; then
  1166.     echo shar: \"'abbrv.bst'\" unpacked with wrong size!
  1167. fi
  1168. # end of 'abbrv.bst'
  1169. fi
  1170. if test -f 'alpha.bst' -a "${1}" != "-c" ; then 
  1171.   echo shar: Will not clobber existing file \"'alpha.bst'\"
  1172. else
  1173. echo shar: Extracting \"'alpha.bst'\" \(24990 characters\)
  1174. sed "s/^X//" >'alpha.bst' <<'END_OF_FILE'
  1175. X% Style file modified on Tue Jun  8 13:44:40 1993 with `annotebib.el' v1.5.1
  1176. X%                     by Yves.Arrouye <arrouye@cosmos>
  1177. X%                     to support the `annote' annotation field.
  1178. X% Style file modified on Tue Jun  8 13:44:40 1993 with `annotebib.el' v1.5.1
  1179. X%                     by Yves.Arrouye <arrouye@cosmos>
  1180. X%                     to support the `commentaire' annotation field.
  1181. X
  1182. X% This bibliography style was made `annote'-compatible by "annotebib.el".
  1183. X% It can be used for both annotated and non-annotated bibliographies listing
  1184. X% (`annote' package by Yves Arrouye <arrouye@imag.imag.fr>).
  1185. X
  1186. X% BibTeX standard bibliography style `alpha'
  1187. X        % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  1188. X        % Copyright (C) 1985, all rights reserved.
  1189. X        % Copying of this file is authorized only if either
  1190. X        % (1) you make absolutely no changes to your copy, including name, or
  1191. X        % (2) if you do make changes, you name it something other than
  1192. X        % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  1193. X        % This restriction helps ensure that all standard styles are identical.
  1194. X        % The file btxbst.doc has the documentation for this style.
  1195. X
  1196. XENTRY
  1197. X  { annote
  1198. X    commentaire
  1199. X    address
  1200. X    author
  1201. X    booktitle
  1202. X    chapter
  1203. X    edition
  1204. X    editor
  1205. X    howpublished
  1206. X    institution
  1207. X    journal
  1208. X    key
  1209. X    month
  1210. X    note
  1211. X    number
  1212. X    organization
  1213. X    pages
  1214. X    publisher
  1215. X    school
  1216. X    series
  1217. X    title
  1218. X    type
  1219. X    volume
  1220. X    year
  1221. X  }
  1222. X  {}
  1223. X  { label extra.label sort.label }
  1224. X
  1225. XINTEGERS { output.state before.all mid.sentence after.sentence after.block }
  1226. X
  1227. XFUNCTION {init.state.consts}
  1228. X{ #0 'before.all :=
  1229. X  #1 'mid.sentence :=
  1230. X  #2 'after.sentence :=
  1231. X  #3 'after.block :=
  1232. X}
  1233. X
  1234. XSTRINGS { s t }
  1235. X
  1236. XFUNCTION {output.nonnull}
  1237. X{ 's :=
  1238. X  output.state mid.sentence =
  1239. X    { ", " * write$ }
  1240. X    { output.state after.block =
  1241. X        { add.period$ write$
  1242. X          newline$
  1243. X          "\newblock " write$
  1244. X        }
  1245. X        { output.state before.all =
  1246. X            'write$
  1247. X            { add.period$ " " * write$ }
  1248. X          if$
  1249. X        }
  1250. X      if$
  1251. X      mid.sentence 'output.state :=
  1252. X    }
  1253. X  if$
  1254. X  s
  1255. X}
  1256. X
  1257. XFUNCTION {output}
  1258. X{ duplicate$ empty$
  1259. X    'pop$
  1260. X    'output.nonnull
  1261. X  if$
  1262. X}
  1263. X
  1264. XFUNCTION {output.check}
  1265. X{ 't :=
  1266. X  duplicate$ empty$
  1267. X    { pop$ "empty " t * " in " * cite$ * warning$ }
  1268. X    'output.nonnull
  1269. X  if$
  1270. X}
  1271. X
  1272. XFUNCTION {output.bibitem}
  1273. X{ newline$
  1274. X  "\bibitem[" write$
  1275. X  label write$
  1276. X  "]{" write$
  1277. X  cite$ write$
  1278. X  "}" write$
  1279. X  newline$
  1280. X  ""
  1281. X  before.all 'output.state :=
  1282. X}
  1283. X
  1284. XFUNCTION {annotebib.format.commentaire}
  1285. X{ commentaire empty$
  1286. X        { "" }
  1287. X        { "\ifx\commentaire\undefined\else\begin{commentaire} "
  1288. X          commentaire
  1289. X          * " \end{commentaire}\fi " *
  1290. X        }
  1291. X      if$
  1292. X}
  1293. X
  1294. XFUNCTION {annotebib.format.annote}
  1295. X{ annote empty$
  1296. X        { "" }
  1297. X        { "\ifx\annote\undefined\else\begin{annote} "
  1298. X          annote
  1299. X          * " \end{annote}\fi " *
  1300. X        }
  1301. X      if$
  1302. X}
  1303. X
  1304. XFUNCTION {fin.entry}
  1305. X{ add.period$
  1306. X  write$
  1307. X  newline$
  1308. X  annotebib.format.commentaire write$
  1309. X  annotebib.format.annote write$
  1310. X}
  1311. X
  1312. XFUNCTION {new.block}
  1313. X{ output.state before.all =
  1314. X    'skip$
  1315. X    { after.block 'output.state := }
  1316. X  if$
  1317. X}
  1318. X
  1319. XFUNCTION {new.sentence}
  1320. X{ output.state after.block =
  1321. X    'skip$
  1322. X    { output.state before.all =
  1323. X        'skip$
  1324. X        { after.sentence 'output.state := }
  1325. X      if$
  1326. X    }
  1327. X  if$
  1328. X}
  1329. X
  1330. XFUNCTION {not}
  1331. X{   { #0 }
  1332. X    { #1 }
  1333. X  if$
  1334. X}
  1335. X
  1336. XFUNCTION {and}
  1337. X{   'skip$
  1338. X    { pop$ #0 }
  1339. X  if$
  1340. X}
  1341. X
  1342. XFUNCTION {or}
  1343. X{   { pop$ #1 }
  1344. X    'skip$
  1345. X  if$
  1346. X}
  1347. X
  1348. XFUNCTION {new.block.checka}
  1349. X{ empty$
  1350. X    'skip$
  1351. X    'new.block
  1352. X  if$
  1353. X}
  1354. X
  1355. XFUNCTION {new.block.checkb}
  1356. X{ empty$
  1357. X  swap$ empty$
  1358. X  and
  1359. X    'skip$
  1360. X    'new.block
  1361. X  if$
  1362. X}
  1363. X
  1364. XFUNCTION {new.sentence.checka}
  1365. X{ empty$
  1366. X    'skip$
  1367. X    'new.sentence
  1368. X  if$
  1369. X}
  1370. X
  1371. XFUNCTION {new.sentence.checkb}
  1372. X{ empty$
  1373. X  swap$ empty$
  1374. X  and
  1375. X    'skip$
  1376. X    'new.sentence
  1377. X  if$
  1378. X}
  1379. X
  1380. XFUNCTION {field.or.null}
  1381. X{ duplicate$ empty$
  1382. X    { pop$ "" }
  1383. X    'skip$
  1384. X  if$
  1385. X}
  1386. X
  1387. XFUNCTION {emphasize}
  1388. X{ duplicate$ empty$
  1389. X    { pop$ "" }
  1390. X    { "{\em " swap$ * "}" * }
  1391. X  if$
  1392. X}
  1393. X
  1394. XINTEGERS { nameptr namesleft numnames }
  1395. X
  1396. XFUNCTION {format.names}
  1397. X{ 's :=
  1398. X  #1 'nameptr :=
  1399. X  s num.names$ 'numnames :=
  1400. X  numnames 'namesleft :=
  1401. X    { namesleft #0 > }
  1402. X    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  1403. X      nameptr #1 >
  1404. X        { namesleft #1 >
  1405. X            { ", " * t * }
  1406. X            { numnames #2 >
  1407. X                { "," * }
  1408. X                'skip$
  1409. X              if$
  1410. X              t "others" =
  1411. X                { " et~al." * }
  1412. X                { " and " * t * }
  1413. X              if$
  1414. X            }
  1415. X          if$
  1416. X        }
  1417. X        't
  1418. X      if$
  1419. X      nameptr #1 + 'nameptr :=
  1420. X      namesleft #1 - 'namesleft :=
  1421. X    }
  1422. X  while$
  1423. X}
  1424. X
  1425. XFUNCTION {format.authors}
  1426. X{ author empty$
  1427. X    { "" }
  1428. X    { author format.names }
  1429. X  if$
  1430. X}
  1431. X
  1432. XFUNCTION {format.editors}
  1433. X{ editor empty$
  1434. X    { "" }
  1435. X    { editor format.names
  1436. X      editor num.names$ #1 >
  1437. X        { ", editors" * }
  1438. X        { ", editor" * }
  1439. X      if$
  1440. X    }
  1441. X  if$
  1442. X}
  1443. X
  1444. XFUNCTION {format.title}
  1445. X{ title empty$
  1446. X    { "" }
  1447. X    { title "t" change.case$ }
  1448. X  if$
  1449. X}
  1450. X
  1451. XFUNCTION {n.dashify}
  1452. X{ 't :=
  1453. X  ""
  1454. X    { t empty$ not }
  1455. X    { t #1 #1 substring$ "-" =
  1456. X        { t #1 #2 substring$ "--" = not
  1457. X            { "--" *
  1458. X              t #2 global.max$ substring$ 't :=
  1459. X            }
  1460. X            {   { t #1 #1 substring$ "-" = }
  1461. X                { "-" *
  1462. X                  t #2 global.max$ substring$ 't :=
  1463. X                }
  1464. X              while$
  1465. X            }
  1466. X          if$
  1467. X        }
  1468. X        { t #1 #1 substring$ *
  1469. X          t #2 global.max$ substring$ 't :=
  1470. X        }
  1471. X      if$
  1472. X    }
  1473. X  while$
  1474. X}
  1475. X
  1476. XFUNCTION {format.date}
  1477. X{ year empty$
  1478. X    { month empty$
  1479. X        { "" }
  1480. X        { "there's a month but no year in " cite$ * warning$
  1481. X          month
  1482. X        }
  1483. X      if$
  1484. X    }
  1485. X    { month empty$
  1486. X        'year
  1487. X        { month " " * year * }
  1488. X      if$
  1489. X    }
  1490. X  if$
  1491. X}
  1492. X
  1493. XFUNCTION {format.btitle}
  1494. X{ title emphasize
  1495. X}
  1496. X
  1497. XFUNCTION {tie.or.space.connect}
  1498. X{ duplicate$ text.length$ #3 <
  1499. X    { "~" }
  1500. X    { " " }
  1501. X  if$
  1502. X  swap$ * *
  1503. X}
  1504. X
  1505. XFUNCTION {either.or.check}
  1506. X{ empty$
  1507. X    'pop$
  1508. X    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  1509. X  if$
  1510. X}
  1511. X
  1512. XFUNCTION {format.bvolume}
  1513. X{ volume empty$
  1514. X    { "" }
  1515. X    { "volume" volume tie.or.space.connect
  1516. X      series empty$
  1517. X        'skip$
  1518. X        { " of " * series emphasize * }
  1519. X      if$
  1520. X      "volume and number" number either.or.check
  1521. X    }
  1522. X  if$
  1523. X}
  1524. X
  1525. XFUNCTION {format.number.series}
  1526. X{ volume empty$
  1527. X    { number empty$
  1528. X        { series field.or.null }
  1529. X        { output.state mid.sentence =
  1530. X            { "number" }
  1531. X            { "Number" }
  1532. X          if$
  1533. X          number tie.or.space.connect
  1534. X          series empty$
  1535. X            { "there's a number but no series in " cite$ * warning$ }
  1536. X            { " in " * series * }
  1537. X          if$
  1538. X        }
  1539. X      if$
  1540. X    }
  1541. X    { "" }
  1542. X  if$
  1543. X}
  1544. X
  1545. XFUNCTION {format.edition}
  1546. X{ edition empty$
  1547. X    { "" }
  1548. X    { output.state mid.sentence =
  1549. X        { edition "l" change.case$ " edition" * }
  1550. X        { edition "t" change.case$ " edition" * }
  1551. X      if$
  1552. X    }
  1553. X  if$
  1554. X}
  1555. X
  1556. XINTEGERS { multiresult }
  1557. X
  1558. XFUNCTION {multi.page.check}
  1559. X{ 't :=
  1560. X  #0 'multiresult :=
  1561. X    { multiresult not
  1562. X      t empty$ not
  1563. X      and
  1564. X    }
  1565. X    { t #1 #1 substring$
  1566. X      duplicate$ "-" =
  1567. X      swap$ duplicate$ "," =
  1568. X      swap$ "+" =
  1569. X      or or
  1570. X        { #1 'multiresult := }
  1571. X        { t #2 global.max$ substring$ 't := }
  1572. X      if$
  1573. X    }
  1574. X  while$
  1575. X  multiresult
  1576. X}
  1577. X
  1578. XFUNCTION {format.pages}
  1579. X{ pages empty$
  1580. X    { "" }
  1581. X    { pages multi.page.check
  1582. X        { "pages" pages n.dashify tie.or.space.connect }
  1583. X        { "page" pages tie.or.space.connect }
  1584. X      if$
  1585. X    }
  1586. X  if$
  1587. X}
  1588. X
  1589. XFUNCTION {format.vol.num.pages}
  1590. X{ volume field.or.null
  1591. X  number empty$
  1592. X    'skip$
  1593. X    { "(" number * ")" * *
  1594. X      volume empty$
  1595. X        { "there's a number but no volume in " cite$ * warning$ }
  1596. X        'skip$
  1597. X      if$
  1598. X    }
  1599. X  if$
  1600. X  pages empty$
  1601. X    'skip$
  1602. X    { duplicate$ empty$
  1603. X        { pop$ format.pages }
  1604. X        { ":" * pages n.dashify * }
  1605. X      if$
  1606. X    }
  1607. X  if$
  1608. X}
  1609. X
  1610. XFUNCTION {format.chapter.pages}
  1611. X{ chapter empty$
  1612. X    'format.pages
  1613. X    { type empty$
  1614. X        { "chapter" }
  1615. X        { type "l" change.case$ }
  1616. X      if$
  1617. X      chapter tie.or.space.connect
  1618. X      pages empty$
  1619. X        'skip$
  1620. X        { ", " * format.pages * }
  1621. X      if$
  1622. X    }
  1623. X  if$
  1624. X}
  1625. X
  1626. XFUNCTION {format.in.ed.booktitle}
  1627. X{ booktitle empty$
  1628. X    { "" }
  1629. X    { editor empty$
  1630. X        { "In " booktitle emphasize * }
  1631. X        { "In " format.editors * ", " * booktitle emphasize * }
  1632. X      if$
  1633. X    }
  1634. X  if$
  1635. X}
  1636. X
  1637. XFUNCTION {empty.misc.check}
  1638. X{ author empty$ title empty$ howpublished empty$
  1639. X  month empty$ year empty$ note empty$
  1640. X  and and and and and
  1641. X  key empty$ not and
  1642. X    { "all relevant fields are empty in " cite$ * warning$ }
  1643. X    'skip$
  1644. X  if$
  1645. X}
  1646. X
  1647. XFUNCTION {format.thesis.type}
  1648. X{ type empty$
  1649. X    'skip$
  1650. X    { pop$
  1651. X      type "t" change.case$
  1652. X    }
  1653. X  if$
  1654. X}
  1655. X
  1656. XFUNCTION {format.tr.number}
  1657. X{ type empty$
  1658. X    { "Technical Report" }
  1659. X    'type
  1660. X  if$
  1661. X  number empty$
  1662. X    { "t" change.case$ }
  1663. X    { number tie.or.space.connect }
  1664. X  if$
  1665. X}
  1666. X
  1667. XFUNCTION {format.article.crossref}
  1668. X{ key empty$
  1669. X    { journal empty$
  1670. X        { "need key or journal for " cite$ * " to crossref " * crossref *
  1671. X          warning$
  1672. X          ""
  1673. X        }
  1674. X        { "In {\em " journal * "\/}" * }
  1675. X      if$
  1676. X    }
  1677. X    { "In " key * }
  1678. X  if$
  1679. X  " \cite{" * crossref * "}" *
  1680. X}
  1681. X
  1682. XFUNCTION {format.crossref.editor}
  1683. X{ editor #1 "{vv~}{ll}" format.name$
  1684. X  editor num.names$ duplicate$
  1685. X  #2 >
  1686. X    { pop$ " et~al." * }
  1687. X    { #2 <
  1688. X        'skip$
  1689. X        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1690. X            { " et~al." * }
  1691. X            { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  1692. X          if$
  1693. X        }
  1694. X      if$
  1695. X    }
  1696. X  if$
  1697. X}
  1698. X
  1699. XFUNCTION {format.book.crossref}
  1700. X{ volume empty$
  1701. X    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  1702. X      "In "
  1703. X    }
  1704. X    { "Volume" volume tie.or.space.connect
  1705. X      " of " *
  1706. X    }
  1707. X  if$
  1708. X  editor empty$
  1709. X  editor field.or.null author field.or.null =
  1710. X  or
  1711. X    { key empty$
  1712. X        { series empty$
  1713. X            { "need editor, key, or series for " cite$ * " to crossref " *
  1714. X              crossref * warning$
  1715. X              "" *
  1716. X            }
  1717. X            { "{\em " * series * "\/}" * }
  1718. X          if$
  1719. X        }
  1720. X        { key * }
  1721. X      if$
  1722. X    }
  1723. X    { format.crossref.editor * }
  1724. X  if$
  1725. X  " \cite{" * crossref * "}" *
  1726. X}
  1727. X
  1728. XFUNCTION {format.incoll.inproc.crossref}
  1729. X{ editor empty$
  1730. X  editor field.or.null author field.or.null =
  1731. X  or
  1732. X    { key empty$
  1733. X        { booktitle empty$
  1734. X            { "need editor, key, or booktitle for " cite$ * " to crossref " *
  1735. X              crossref * warning$
  1736. X              ""
  1737. X            }
  1738. X            { "In {\em " booktitle * "\/}" * }
  1739. X          if$
  1740. X        }
  1741. X        { "In " key * }
  1742. X      if$
  1743. X    }
  1744. X    { "In " format.crossref.editor * }
  1745. X  if$
  1746. X  " \cite{" * crossref * "}" *
  1747. X}
  1748. X
  1749. XFUNCTION {article}
  1750. X{ output.bibitem
  1751. X  format.authors "author" output.check
  1752. X  new.block
  1753. X  format.title "title" output.check
  1754. X  new.block
  1755. X  crossref missing$
  1756. X    { journal emphasize "journal" output.check
  1757. X      format.vol.num.pages output
  1758. X      format.date "year" output.check
  1759. X    }
  1760. X    { format.article.crossref output.nonnull
  1761. X      format.pages output
  1762. X    }
  1763. X  if$
  1764. X  new.block
  1765. X  note output
  1766. X  fin.entry
  1767. X}
  1768. X
  1769. XFUNCTION {book}
  1770. X{ output.bibitem
  1771. X  author empty$
  1772. X    { format.editors "author and editor" output.check }
  1773. X    { format.authors output.nonnull
  1774. X      crossref missing$
  1775. X        { "author and editor" editor either.or.check }
  1776. X        'skip$
  1777. X      if$
  1778. X    }
  1779. X  if$
  1780. X  new.block
  1781. X  format.btitle "title" output.check
  1782. X  crossref missing$
  1783. X    { format.bvolume output
  1784. X      new.block
  1785. X      format.number.series output
  1786. X      new.sentence
  1787. X      publisher "publisher" output.check
  1788. X      address output
  1789. X    }
  1790. X    { new.block
  1791. X      format.book.crossref output.nonnull
  1792. X    }
  1793. X  if$
  1794. X  format.edition output
  1795. X  format.date "year" output.check
  1796. X  new.block
  1797. X  note output
  1798. X  fin.entry
  1799. X}
  1800. X
  1801. XFUNCTION {booklet}
  1802. X{ output.bibitem
  1803. X  format.authors output
  1804. X  new.block
  1805. X  format.title "title" output.check
  1806. X  howpublished address new.block.checkb
  1807. X  howpublished output
  1808. X  address output
  1809. X  format.date output
  1810. X  new.block
  1811. X  note output
  1812. X  fin.entry
  1813. X}
  1814. X
  1815. XFUNCTION {inbook}
  1816. X{ output.bibitem
  1817. X  author empty$
  1818. X    { format.editors "author and editor" output.check }
  1819. X    { format.authors output.nonnull
  1820. X      crossref missing$
  1821. X        { "author and editor" editor either.or.check }
  1822. X        'skip$
  1823. X      if$
  1824. X    }
  1825. X  if$
  1826. X  new.block
  1827. X  format.btitle "title" output.check
  1828. X  crossref missing$
  1829. X    { format.bvolume output
  1830. X      format.chapter.pages "chapter and pages" output.check
  1831. X      new.block
  1832. X      format.number.series output
  1833. X      new.sentence
  1834. X      publisher "publisher" output.check
  1835. X      address output
  1836. X    }
  1837. X    { format.chapter.pages "chapter and pages" output.check
  1838. X      new.block
  1839. X      format.book.crossref output.nonnull
  1840. X    }
  1841. X  if$
  1842. X  format.edition output
  1843. X  format.date "year" output.check
  1844. X  new.block
  1845. X  note output
  1846. X  fin.entry
  1847. X}
  1848. X
  1849. XFUNCTION {incollection}
  1850. X{ output.bibitem
  1851. X  format.authors "author" output.check
  1852. X  new.block
  1853. X  format.title "title" output.check
  1854. X  new.block
  1855. X  crossref missing$
  1856. X    { format.in.ed.booktitle "booktitle" output.check
  1857. X      format.bvolume output
  1858. X      format.number.series output
  1859. X      format.chapter.pages output
  1860. X      new.sentence
  1861. X      publisher "publisher" output.check
  1862. X      address output
  1863. X      format.edition output
  1864. X      format.date "year" output.check
  1865. X    }
  1866. X    { format.incoll.inproc.crossref output.nonnull
  1867. X      format.chapter.pages output
  1868. X    }
  1869. X  if$
  1870. X  new.block
  1871. X  note output
  1872. X  fin.entry
  1873. X}
  1874. X
  1875. XFUNCTION {inproceedings}
  1876. X{ output.bibitem
  1877. X  format.authors "author" output.check
  1878. X  new.block
  1879. X  format.title "title" output.check
  1880. X  new.block
  1881. X  crossref missing$
  1882. X    { format.in.ed.booktitle "booktitle" output.check
  1883. X      format.bvolume output
  1884. X      format.number.series output
  1885. X      format.pages output
  1886. X      address empty$
  1887. X        { organization publisher new.sentence.checkb
  1888. X          organization output
  1889. X          publisher output
  1890. X          format.date "year" output.check
  1891. X        }
  1892. X        { address output.nonnull
  1893. X          format.date "year" output.check
  1894. X          new.sentence
  1895. X          organization output
  1896. X          publisher output
  1897. X        }
  1898. X      if$
  1899. X    }
  1900. X    { format.incoll.inproc.crossref output.nonnull
  1901. X      format.pages output
  1902. X    }
  1903. X  if$
  1904. X  new.block
  1905. X  note output
  1906. X  fin.entry
  1907. X}
  1908. X
  1909. XFUNCTION {conference} { inproceedings }
  1910. X
  1911. XFUNCTION {manual}
  1912. X{ output.bibitem
  1913. X  author empty$
  1914. X    { organization empty$
  1915. X        'skip$
  1916. X        { organization output.nonnull
  1917. X          address output
  1918. X        }
  1919. X      if$
  1920. X    }
  1921. X    { format.authors output.nonnull }
  1922. X  if$
  1923. X  new.block
  1924. X  format.btitle "title" output.check
  1925. X  author empty$
  1926. X    { organization empty$
  1927. X        { address new.block.checka
  1928. X          address output
  1929. X        }
  1930. X        'skip$
  1931. X      if$
  1932. X    }
  1933. X    { organization address new.block.checkb
  1934. X      organization output
  1935. X      address output
  1936. X    }
  1937. X  if$
  1938. X  format.edition output
  1939. X  format.date output
  1940. X  new.block
  1941. X  note output
  1942. X  fin.entry
  1943. X}
  1944. X
  1945. XFUNCTION {mastersthesis}
  1946. X{ output.bibitem
  1947. X  format.authors "author" output.check
  1948. X  new.block
  1949. X  format.title "title" output.check
  1950. X  new.block
  1951. X  "Master's thesis" format.thesis.type output.nonnull
  1952. X  school "school" output.check
  1953. X  address output
  1954. X  format.date "year" output.check
  1955. X  new.block
  1956. X  note output
  1957. X  fin.entry
  1958. X}
  1959. X
  1960. XFUNCTION {misc}
  1961. X{ output.bibitem
  1962. X  format.authors output
  1963. X  title howpublished new.block.checkb
  1964. X  format.title output
  1965. X  howpublished new.block.checka
  1966. X  howpublished output
  1967. X  format.date output
  1968. X  new.block
  1969. X  note output
  1970. X  fin.entry
  1971. X  empty.misc.check
  1972. X}
  1973. X
  1974. XFUNCTION {phdthesis}
  1975. X{ output.bibitem
  1976. X  format.authors "author" output.check
  1977. X  new.block
  1978. X  format.btitle "title" output.check
  1979. X  new.block
  1980. X  "PhD thesis" format.thesis.type output.nonnull
  1981. X  school "school" output.check
  1982. X  address output
  1983. X  format.date "year" output.check
  1984. X  new.block
  1985. X  note output
  1986. X  fin.entry
  1987. X}
  1988. X
  1989. XFUNCTION {proceedings}
  1990. X{ output.bibitem
  1991. X  editor empty$
  1992. X    { organization output }
  1993. X    { format.editors output.nonnull }
  1994. X  if$
  1995. X  new.block
  1996. X  format.btitle "title" output.check
  1997. X  format.bvolume output
  1998. X  format.number.series output
  1999. X  address empty$
  2000. X    { editor empty$
  2001. X        { publisher new.sentence.checka }
  2002. X        { organization publisher new.sentence.checkb
  2003. X          organization output
  2004. X        }
  2005. X      if$
  2006. X      publisher output
  2007. X      format.date "year" output.check
  2008. X    }
  2009. X    { address output.nonnull
  2010. X      format.date "year" output.check
  2011. X      new.sentence
  2012. X      editor empty$
  2013. X        'skip$
  2014. X        { organization output }
  2015. X      if$
  2016. X      publisher output
  2017. X    }
  2018. X  if$
  2019. X  new.block
  2020. X  note output
  2021. X  fin.entry
  2022. X}
  2023. X
  2024. XFUNCTION {techreport}
  2025. X{ output.bibitem
  2026. X  format.authors "author" output.check
  2027. X  new.block
  2028. X  format.title "title" output.check
  2029. X  new.block
  2030. X  format.tr.number output.nonnull
  2031. X  institution "institution" output.check
  2032. X  address output
  2033. X  format.date "year" output.check
  2034. X  new.block
  2035. X  note output
  2036. X  fin.entry
  2037. X}
  2038. X
  2039. XFUNCTION {unpublished}
  2040. X{ output.bibitem
  2041. X  format.authors "author" output.check
  2042. X  new.block
  2043. X  format.title "title" output.check
  2044. X  new.block
  2045. X  note "note" output.check
  2046. X  format.date output
  2047. X  fin.entry
  2048. X}
  2049. X
  2050. XFUNCTION {default.type} { misc }
  2051. X
  2052. XMACRO {jan} {"January"}
  2053. X
  2054. XMACRO {feb} {"February"}
  2055. X
  2056. XMACRO {mar} {"March"}
  2057. X
  2058. XMACRO {apr} {"April"}
  2059. X
  2060. XMACRO {may} {"May"}
  2061. X
  2062. XMACRO {jun} {"June"}
  2063. X
  2064. XMACRO {jul} {"July"}
  2065. X
  2066. XMACRO {aug} {"August"}
  2067. X
  2068. XMACRO {sep} {"September"}
  2069. X
  2070. XMACRO {oct} {"October"}
  2071. X
  2072. XMACRO {nov} {"November"}
  2073. X
  2074. XMACRO {dec} {"December"}
  2075. X
  2076. XMACRO {acmcs} {"ACM Computing Surveys"}
  2077. X
  2078. XMACRO {acta} {"Acta Informatica"}
  2079. X
  2080. XMACRO {cacm} {"Communications of the ACM"}
  2081. X
  2082. XMACRO {ibmjrd} {"IBM Journal of Research and Development"}
  2083. X
  2084. XMACRO {ibmsj} {"IBM Systems Journal"}
  2085. X
  2086. XMACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  2087. X
  2088. XMACRO {ieeetc} {"IEEE Transactions on Computers"}
  2089. X
  2090. XMACRO {ieeetcad}
  2091. X {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  2092. X
  2093. XMACRO {ipl} {"Information Processing Letters"}
  2094. X
  2095. XMACRO {jacm} {"Journal of the ACM"}
  2096. X
  2097. XMACRO {jcss} {"Journal of Computer and System Sciences"}
  2098. X
  2099. XMACRO {scp} {"Science of Computer Programming"}
  2100. X
  2101. XMACRO {sicomp} {"SIAM Journal on Computing"}
  2102. X
  2103. XMACRO {tocs} {"ACM Transactions on Computer Systems"}
  2104. X
  2105. XMACRO {tods} {"ACM Transactions on Database Systems"}
  2106. X
  2107. XMACRO {tog} {"ACM Transactions on Graphics"}
  2108. X
  2109. XMACRO {toms} {"ACM Transactions on Mathematical Software"}
  2110. X
  2111. XMACRO {toois} {"ACM Transactions on Office Information Systems"}
  2112. X
  2113. XMACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  2114. X
  2115. XMACRO {tcs} {"Theoretical Computer Science"}
  2116. X
  2117. XREAD
  2118. X
  2119. XFUNCTION {sortify}
  2120. X{ purify$
  2121. X  "l" change.case$
  2122. X}
  2123. X
  2124. XINTEGERS { len }
  2125. X
  2126. XFUNCTION {chop.word}
  2127. X{ 's :=
  2128. X  'len :=
  2129. X  s #1 len substring$ =
  2130. X    { s len #1 + global.max$ substring$ }
  2131. X    's
  2132. X  if$
  2133. X}
  2134. X
  2135. XINTEGERS { et.al.char.used }
  2136. X
  2137. XFUNCTION {initialize.et.al.char.used}
  2138. X{ #0 'et.al.char.used :=
  2139. X}
  2140. X
  2141. XEXECUTE {initialize.et.al.char.used}
  2142. X
  2143. XFUNCTION {format.lab.names}
  2144. X{ 's :=
  2145. X  s num.names$ 'numnames :=
  2146. X  numnames #1 >
  2147. X    { numnames #4 >
  2148. X        { #3 'namesleft := }
  2149. X        { numnames 'namesleft := }
  2150. X      if$
  2151. X      #1 'nameptr :=
  2152. X      ""
  2153. X        { namesleft #0 > }
  2154. X        { nameptr numnames =
  2155. X            { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  2156. X                { "{\etalchar{+}}" *
  2157. X                  #1 'et.al.char.used :=
  2158. X                }
  2159. X                { s nameptr "{v{}}{l{}}" format.name$ * }
  2160. X              if$
  2161. X            }
  2162. X            { s nameptr "{v{}}{l{}}" format.name$ * }
  2163. X          if$
  2164. X          nameptr #1 + 'nameptr :=
  2165. X          namesleft #1 - 'namesleft :=
  2166. X        }
  2167. X      while$
  2168. X      numnames #4 >
  2169. X        { "{\etalchar{+}}" *
  2170. X          #1 'et.al.char.used :=
  2171. X        }
  2172. X        'skip$
  2173. X      if$
  2174. X    }
  2175. X    { s #1 "{v{}}{l{}}" format.name$
  2176. X      duplicate$ text.length$ #2 <
  2177. X        { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
  2178. X        'skip$
  2179. X      if$
  2180. X    }
  2181. X  if$
  2182. X}
  2183. X
  2184. XFUNCTION {author.key.label}
  2185. X{ author empty$
  2186. X    { key empty$
  2187. X        { cite$ #1 #3 substring$ }
  2188. X        { key #3 text.prefix$ }
  2189. X      if$
  2190. X    }
  2191. X    { author format.lab.names }
  2192. X  if$
  2193. X}
  2194. X
  2195. XFUNCTION {author.editor.key.label}
  2196. X{ author empty$
  2197. X    { editor empty$
  2198. X        { key empty$
  2199. X            { cite$ #1 #3 substring$ }
  2200. X            { key #3 text.prefix$ }
  2201. X          if$
  2202. X        }
  2203. X        { editor format.lab.names }
  2204. X      if$
  2205. X    }
  2206. X    { author format.lab.names }
  2207. X  if$
  2208. X}
  2209. X
  2210. XFUNCTION {author.key.organization.label}
  2211. X{ author empty$
  2212. X    { key empty$
  2213. X        { organization empty$
  2214. X            { cite$ #1 #3 substring$ }
  2215. X            { "The " #4 organization chop.word #3 text.prefix$ }
  2216. X          if$
  2217. X        }
  2218. X        { key #3 text.prefix$ }
  2219. X      if$
  2220. X    }
  2221. X    { author format.lab.names }
  2222. X  if$
  2223. X}
  2224. X
  2225. XFUNCTION {editor.key.organization.label}
  2226. X{ editor empty$
  2227. X    { key empty$
  2228. X        { organization empty$
  2229. X            { cite$ #1 #3 substring$ }
  2230. X            { "The " #4 organization chop.word #3 text.prefix$ }
  2231. X          if$
  2232. X        }
  2233. X        { key #3 text.prefix$ }
  2234. X      if$
  2235. X    }
  2236. X    { editor format.lab.names }
  2237. X  if$
  2238. X}
  2239. X
  2240. XFUNCTION {calc.label}
  2241. X{ type$ "book" =
  2242. X  type$ "inbook" =
  2243. X  or
  2244. X    'author.editor.key.label
  2245. X    { type$ "proceedings" =
  2246. X        'editor.key.organization.label
  2247. X        { type$ "manual" =
  2248. X            'author.key.organization.label
  2249. X            'author.key.label
  2250. X          if$
  2251. X        }
  2252. X      if$
  2253. X    }
  2254. X  if$
  2255. X  duplicate$
  2256. X  year field.or.null purify$ #-1 #2 substring$
  2257. X  *
  2258. X  'label :=
  2259. X  year field.or.null purify$ #-1 #4 substring$
  2260. X  *
  2261. X  sortify 'sort.label :=
  2262. X}
  2263. X
  2264. XFUNCTION {sort.format.names}
  2265. X{ 's :=
  2266. X  #1 'nameptr :=
  2267. X  ""
  2268. X  s num.names$ 'numnames :=
  2269. X  numnames 'namesleft :=
  2270. X    { namesleft #0 > }
  2271. X    { nameptr #1 >
  2272. X        { "   " * }
  2273. X        'skip$
  2274. X      if$
  2275. X      s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
  2276. X      nameptr numnames = t "others" = and
  2277. X        { "et al" * }
  2278. X        { t sortify * }
  2279. X      if$
  2280. X      nameptr #1 + 'nameptr :=
  2281. X      namesleft #1 - 'namesleft :=
  2282. X    }
  2283. X  while$
  2284. X}
  2285. X
  2286. XFUNCTION {sort.format.title}
  2287. X{ 't :=
  2288. X  "A " #2
  2289. X    "An " #3
  2290. X      "The " #4 t chop.word
  2291. X    chop.word
  2292. X  chop.word
  2293. X  sortify
  2294. X  #1 global.max$ substring$
  2295. X}
  2296. X
  2297. XFUNCTION {author.sort}
  2298. X{ author empty$
  2299. X    { key empty$
  2300. X        { "to sort, need author or key in " cite$ * warning$
  2301. X          ""
  2302. X        }
  2303. X        { key sortify }
  2304. X      if$
  2305. X    }
  2306. X    { author sort.format.names }
  2307. X  if$
  2308. X}
  2309. X
  2310. XFUNCTION {author.editor.sort}
  2311. X{ author empty$
  2312. X    { editor empty$
  2313. X        { key empty$
  2314. X            { "to sort, need author, editor, or key in " cite$ * warning$
  2315. X              ""
  2316. X            }
  2317. X            { key sortify }
  2318. X          if$
  2319. X        }
  2320. X        { editor sort.format.names }
  2321. X      if$
  2322. X    }
  2323. X    { author sort.format.names }
  2324. X  if$
  2325. X}
  2326. X
  2327. XFUNCTION {author.organization.sort}
  2328. X{ author empty$
  2329. X    { organization empty$
  2330. X        { key empty$
  2331. X            { "to sort, need author, organization, or key in " cite$ * warning$
  2332. X              ""
  2333. X            }
  2334. X            { key sortify }
  2335. X          if$
  2336. X        }
  2337. X        { "The " #4 organization chop.word sortify }
  2338. X      if$
  2339. X    }
  2340. X    { author sort.format.names }
  2341. X  if$
  2342. X}
  2343. X
  2344. XFUNCTION {editor.organization.sort}
  2345. X{ editor empty$
  2346. X    { organization empty$
  2347. X        { key empty$
  2348. X            { "to sort, need editor, organization, or key in " cite$ * warning$
  2349. X              ""
  2350. X            }
  2351. X            { key sortify }
  2352. X          if$
  2353. X        }
  2354. X        { "The " #4 organization chop.word sortify }
  2355. X      if$
  2356. X    }
  2357. X    { editor sort.format.names }
  2358. X  if$
  2359. X}
  2360. X
  2361. XFUNCTION {presort}
  2362. X{ calc.label
  2363. X  sort.label
  2364. X  "    "
  2365. X  *
  2366. X  type$ "book" =
  2367. X  type$ "inbook" =
  2368. X  or
  2369. X    'author.editor.sort
  2370. X    { type$ "proceedings" =
  2371. X        'editor.organization.sort
  2372. X        { type$ "manual" =
  2373. X            'author.organization.sort
  2374. X            'author.sort
  2375. X          if$
  2376. X        }
  2377. X      if$
  2378. X    }
  2379. X  if$
  2380. X  *
  2381. X  "    "
  2382. X  *
  2383. X  year field.or.null sortify
  2384. X  *
  2385. X  "    "
  2386. X  *
  2387. X  title field.or.null
  2388. X  sort.format.title
  2389. X  *
  2390. X  #1 entry.max$ substring$
  2391. X  'sort.key$ :=
  2392. X}
  2393. X
  2394. XITERATE {presort}
  2395. X
  2396. XSORT
  2397. X
  2398. XSTRINGS { longest.label last.sort.label next.extra }
  2399. X
  2400. XINTEGERS { longest.label.width last.extra.num }
  2401. X
  2402. XFUNCTION {initialize.longest.label}
  2403. X{ "" 'longest.label :=
  2404. X  #0 int.to.chr$ 'last.sort.label :=
  2405. X  "" 'next.extra :=
  2406. X  #0 'longest.label.width :=
  2407. X  #0 'last.extra.num :=
  2408. X}
  2409. X
  2410. XFUNCTION {forward.pass}
  2411. X{ last.sort.label sort.label =
  2412. X    { last.extra.num #1 + 'last.extra.num :=
  2413. X      last.extra.num int.to.chr$ 'extra.label :=
  2414. X    }
  2415. X    { "a" chr.to.int$ 'last.extra.num :=
  2416. X      "" 'extra.label :=
  2417. X      sort.label 'last.sort.label :=
  2418. X    }
  2419. X  if$
  2420. X}
  2421. X
  2422. XFUNCTION {reverse.pass}
  2423. X{ next.extra "b" =
  2424. X    { "a" 'extra.label := }
  2425. X    'skip$
  2426. X  if$
  2427. X  label extra.label * 'label :=
  2428. X  label width$ longest.label.width >
  2429. X    { label 'longest.label :=
  2430. X      label width$ 'longest.label.width :=
  2431. X    }
  2432. X    'skip$
  2433. X  if$
  2434. X  extra.label 'next.extra :=
  2435. X}
  2436. X
  2437. XEXECUTE {initialize.longest.label}
  2438. X
  2439. XITERATE {forward.pass}
  2440. X
  2441. XREVERSE {reverse.pass}
  2442. X
  2443. XFUNCTION {begin.bib}
  2444. X{ et.al.char.used
  2445. X    { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
  2446. X    'skip$
  2447. X  if$
  2448. X  preamble$ empty$
  2449. X    'skip$
  2450. X    { preamble$ write$ newline$ }
  2451. X  if$
  2452. X  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  2453. X}
  2454. X
  2455. XEXECUTE {begin.bib}
  2456. X
  2457. XEXECUTE {init.state.consts}
  2458. X
  2459. XITERATE {call.type$}
  2460. X
  2461. XFUNCTION {end.bib}
  2462. X{ newline$
  2463. X  "\end{thebibliography}" write$ newline$
  2464. X}
  2465. X
  2466. XEXECUTE {end.bib}
  2467. END_OF_FILE
  2468. if test 24990 -ne `wc -c <'alpha.bst'`; then
  2469.     echo shar: \"'alpha.bst'\" unpacked with wrong size!
  2470. fi
  2471. # end of 'alpha.bst'
  2472. fi
  2473. echo shar: End of shell archive.
  2474. exit 0
  2475.  
  2476. exit 0 # Just in case...
  2477.