home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume37 / annote / part03 < prev    next >
Encoding:
Text File  |  1993-05-15  |  58.6 KB  |  3,206 lines

  1. Newsgroups: comp.sources.misc
  2. From: arrouye@cosmos.imag.fr (Yves Arrouye)
  3. Subject: v37i059:  annote - BibTeX styles supporting annotations, Part03/03
  4. Message-ID: <1993May16.011531.17907@sparky.imd.sterling.com>
  5. X-Md4-Signature: bbfbb1995f9e55451d8924dea4324b19
  6. Date: Sun, 16 May 1993 01:15:31 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: arrouye@cosmos.imag.fr (Yves Arrouye)
  10. Posting-number: Volume 37, Issue 59
  11. Archive-name: annote/part03
  12. Environment: LaTex
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then feed it
  16. # into a shell via "sh file" or similar.  To overwrite existing files,
  17. # type "sh file -c".
  18. # Contents:  fsiam.bst lsiam.bst siam.bst
  19. # Wrapped by kent@sparky on Sat May 15 20:06:13 1993
  20. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  21. echo If this archive is complete, you will see the following message:
  22. echo '          "shar: End of archive 3 (of 3)."'
  23. if test -f 'fsiam.bst' -a "${1}" != "-c" ; then 
  24.   echo shar: Will not clobber existing file \"'fsiam.bst'\"
  25. else
  26.   echo shar: Extracting \"'fsiam.bst'\" \(18314 characters\)
  27.   sed "s/^X//" >'fsiam.bst' <<'END_OF_FILE'
  28. X% SIAM bibliography style (29-Jan-88 version)
  29. X%    numeric labels, alphabetic order, Mathematical Reviews abbreviations,
  30. X%    names in \sc, titles in italics, book titles mixed upper-lower and article
  31. X%    titles lowercase, commas separate all fields except before "notes".
  32. X%
  33. X%   History
  34. X%    1/30/86    (HWT)    Original version, by Howard Trickey.
  35. X%    6/15/87    (HWT)    Fix format.editors---Martin Costabel.
  36. X%    1/29/88    (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
  37. X%            THIS `siam' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
  38. X
  39. XENTRY
  40. X  { address
  41. X    annote
  42. X    author
  43. X    booktitle
  44. X    chapter
  45. X    edition
  46. X    editor
  47. X    howpublished
  48. X    institution
  49. X    journal
  50. X    key
  51. X    month
  52. X    note
  53. X    number
  54. X    organization
  55. X    pages
  56. X    publisher
  57. X    school
  58. X    series
  59. X    title
  60. X    type
  61. X    volume
  62. X    year
  63. X  }
  64. X  {}
  65. X  { label }
  66. X
  67. XINTEGERS { output.state before.all mid.sentence after.block }
  68. X
  69. XFUNCTION {init.state.consts}
  70. X{ #0 'before.all :=
  71. X  #1 'mid.sentence :=
  72. X  #2 'after.block :=
  73. X}
  74. X
  75. XSTRINGS { s t }
  76. X
  77. XFUNCTION {output.nonnull}
  78. X{ 's :=
  79. X  output.state mid.sentence =
  80. X    { ", " * write$ }
  81. X    { output.state after.block =
  82. X    { add.period$ write$
  83. X      newline$
  84. X      "\newblock " write$
  85. X    }
  86. X    'write$
  87. X      if$
  88. X      mid.sentence 'output.state :=
  89. X    }
  90. X  if$
  91. X  s
  92. X}
  93. X
  94. XFUNCTION {output}
  95. X{ duplicate$ empty$
  96. X    'pop$
  97. X    'output.nonnull
  98. X  if$
  99. X}
  100. X
  101. XFUNCTION {output.check}
  102. X{ 't :=
  103. X  duplicate$ empty$
  104. X    { pop$ "empty " t * " in " * cite$ * warning$ }
  105. X    'output.nonnull
  106. X  if$
  107. X}
  108. X
  109. XFUNCTION {output.bibitem}
  110. X{ newline$
  111. X  "\bibitem{" write$
  112. X  cite$ write$
  113. X  "}" write$
  114. X  newline$
  115. X  ""
  116. X  before.all 'output.state :=
  117. X}
  118. X
  119. XFUNCTION {format.annote}
  120. X{ annote empty$
  121. X    { "" }
  122. X        { "\ifx\annote\undefined\else\par\begin{annote} "
  123. X      annote
  124. X      * " \end{annote}\fi " *
  125. X    }
  126. X      if$
  127. X}
  128. X
  129. XFUNCTION {fin.entry}
  130. X{ add.period$
  131. X  write$
  132. X  newline$
  133. X  format.annote write$
  134. X}
  135. X
  136. XFUNCTION {new.block}
  137. X{ output.state before.all =
  138. X    'skip$
  139. X    { after.block 'output.state := }
  140. X  if$
  141. X}
  142. X
  143. XFUNCTION {not}
  144. X{   { #0 }
  145. X    { #1 }
  146. X  if$
  147. X}
  148. X
  149. XFUNCTION {and}
  150. X{   'skip$
  151. X    { pop$ #0 }
  152. X  if$
  153. X}
  154. X
  155. XFUNCTION {or}
  156. X{   { pop$ #1 }
  157. X    'skip$
  158. X  if$
  159. X}
  160. X
  161. XFUNCTION {new.block.checka}
  162. X{ empty$
  163. X    'skip$
  164. X    'new.block
  165. X  if$
  166. X}
  167. X
  168. XFUNCTION {field.or.null}
  169. X{ duplicate$ empty$
  170. X    { pop$ "" }
  171. X    'skip$
  172. X  if$
  173. X}
  174. X
  175. XFUNCTION {emphasize}
  176. X{ duplicate$ empty$
  177. X    { pop$ "" }
  178. X    { "{\em " swap$ * "}" * }
  179. X  if$
  180. X}
  181. X
  182. XFUNCTION {scapify}
  183. X{ duplicate$ empty$
  184. X    { pop$ "" }
  185. X    { "{\sc " swap$ * "}" * }
  186. X  if$
  187. X}
  188. X
  189. XINTEGERS { nameptr namesleft numnames }
  190. X
  191. XFUNCTION {format.names}
  192. X{ 's :=
  193. X  #1 'nameptr :=
  194. X  s num.names$ 'numnames :=
  195. X  numnames 'namesleft :=
  196. X    { namesleft #0 > }
  197. X    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  198. X      nameptr #1 >
  199. X    { namesleft #1 >
  200. X        { ", " * t * }
  201. X        { numnames #2 >
  202. X        { "," * }
  203. X        'skip$
  204. X          if$
  205. X          t "others" =
  206. X        { " et~al." * }
  207. X        { " et " * t * }
  208. X          if$
  209. X        }
  210. X      if$
  211. X    }
  212. X    't
  213. X      if$
  214. X      nameptr #1 + 'nameptr :=
  215. X      namesleft #1 - 'namesleft :=
  216. X    }
  217. X  while$
  218. X}
  219. X
  220. XSTRINGS { last.authors }
  221. X
  222. XFUNCTION {init.last.authors}
  223. X{ "" 'last.authors :=
  224. X}
  225. X
  226. XFUNCTION {format.authors}
  227. X{ author empty$
  228. X    { "" 'last.authors :=
  229. X      ""
  230. X    }
  231. X    { author last.authors =
  232. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  233. X        { author format.names scapify }
  234. X      if$
  235. X      author 'last.authors :=
  236. X    }
  237. X  if$
  238. X}
  239. X
  240. XFUNCTION {format.organization}
  241. X{ organization empty$
  242. X    { "" 'last.authors :=
  243. X      ""
  244. X    }
  245. X    { organization last.authors =
  246. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  247. X        { organization scapify }
  248. X      if$
  249. X      organization 'last.authors :=
  250. X    }
  251. X  if$
  252. X}
  253. X
  254. XFUNCTION {format.editors}
  255. X{ editor empty$
  256. X    { "" 'last.authors :=
  257. X      ""
  258. X    }
  259. X    { editor last.authors =
  260. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  261. X    { editor format.names scapify }
  262. X      if$
  263. X      editor num.names$ #1 >
  264. X        { ", eds." * }
  265. X    { ", ed." * }
  266. X      if$
  267. X      editor 'last.authors :=
  268. X    }
  269. X  if$
  270. X}
  271. X
  272. XFUNCTION {format.ineditors}
  273. X{ editor empty$
  274. X    { "" }
  275. X    { editor format.names
  276. X      editor num.names$ #1 >
  277. X    { ", eds." * }
  278. X    { ", ed." * }
  279. X      if$
  280. X    }
  281. X  if$
  282. X}
  283. X
  284. XFUNCTION {format.title}
  285. X{ title empty$
  286. X    { "" }
  287. X    { title "t" change.case$ emphasize }
  288. X  if$
  289. X}
  290. X
  291. XFUNCTION {n.dashify}
  292. X{ 't :=
  293. X  ""
  294. X    { t empty$ not }
  295. X    { t #1 #1 substring$ "-" =
  296. X    { t #1 #2 substring$ "--" = not
  297. X        { "--" *
  298. X          t #2 global.max$ substring$ 't :=
  299. X        }
  300. X        {   { t #1 #1 substring$ "-" = }
  301. X        { "-" *
  302. X          t #2 global.max$ substring$ 't :=
  303. X        }
  304. X          while$
  305. X        }
  306. X      if$
  307. X    }
  308. X    { t #1 #1 substring$ *
  309. X      t #2 global.max$ substring$ 't :=
  310. X    }
  311. X      if$
  312. X    }
  313. X  while$
  314. X}
  315. X
  316. XFUNCTION {format.date}
  317. X{ year empty$
  318. X    { month empty$
  319. X    { "" }
  320. X    { "there's a month but no year in " cite$ * warning$
  321. X      month
  322. X    }
  323. X      if$
  324. X    }
  325. X    { month empty$
  326. X    'year
  327. X    { month " " * year * }
  328. X      if$
  329. X    }
  330. X  if$
  331. X}
  332. X
  333. XFUNCTION {format.btitle}
  334. X{ title emphasize
  335. X}
  336. X
  337. XFUNCTION {tie.or.space.connect}
  338. X{ duplicate$ text.length$ #3 <
  339. X    { "~" }
  340. X    { " " }
  341. X  if$
  342. X  swap$ * *
  343. X}
  344. X
  345. XFUNCTION {either.or.check}
  346. X{ empty$
  347. X    'pop$
  348. X    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  349. X  if$
  350. X}
  351. X
  352. XFUNCTION {format.bvolume}
  353. X{ volume empty$
  354. X    { "" }
  355. X    { "vol.~" volume *
  356. X      series empty$
  357. X    'skip$
  358. X    { " de " * series * }
  359. X      if$
  360. X      "volume and number" number either.or.check
  361. X    }
  362. X  if$
  363. X}
  364. X
  365. XFUNCTION {format.number.series}
  366. X{ volume empty$
  367. X    { number empty$
  368. X    { series field.or.null }
  369. X    { "no.~" number *
  370. X      series empty$
  371. X        { "there's a number but no series in " cite$ * warning$ }
  372. X        { " in " * series * }
  373. X      if$
  374. X    }
  375. X      if$
  376. X    }
  377. X    { "" }
  378. X  if$
  379. X}
  380. X
  381. XFUNCTION {format.edition}
  382. X{ edition empty$
  383. X    { "" }
  384. X    { "ed.~" edition "l" change.case$ * }
  385. X  if$
  386. X}
  387. X
  388. XINTEGERS { multiresult }
  389. X
  390. XFUNCTION {multi.page.check}
  391. X{ 't :=
  392. X  #0 'multiresult :=
  393. X    { multiresult not
  394. X      t empty$ not
  395. X      and
  396. X    }
  397. X    { t #1 #1 substring$
  398. X      duplicate$ "-" =
  399. X      swap$ duplicate$ "," =
  400. X      swap$ "+" =
  401. X      or or
  402. X    { #1 'multiresult := }
  403. X    { t #2 global.max$ substring$ 't := }
  404. X      if$
  405. X    }
  406. X  while$
  407. X  multiresult
  408. X}
  409. X
  410. XFUNCTION {format.pages}
  411. X{ pages empty$
  412. X    { "" }
  413. X    { pages multi.page.check
  414. X    { "pp.~" pages n.dashify * }
  415. X    { "p.~" pages * }
  416. X      if$
  417. X    }
  418. X  if$
  419. X}
  420. X
  421. XFUNCTION {format.vol.year}
  422. X{
  423. X%  number empty$
  424. X%    { "" * }
  425. X%    { " " * number * "(" * }
  426. X%  if$
  427. X  volume field.or.null
  428. X%  number empty$
  429. X%    { "" * }
  430. X%    { ")" * }
  431. X%  if$
  432. X  year empty$
  433. X    { "empty year in " cite$ * warning$ }
  434. X    { " (" year * ")" * * }
  435. X  if$
  436. X}
  437. X
  438. XFUNCTION {format.chapter.pages}
  439. X{ chapter empty$
  440. X    'format.pages
  441. X    { type empty$
  442. X    { "ch.~" chapter * }
  443. X    { type "l" change.case$ chapter tie.or.space.connect }
  444. X      if$
  445. X      pages empty$
  446. X    'skip$
  447. X    { ", " * format.pages * }
  448. X      if$
  449. X    }
  450. X  if$
  451. X}
  452. X
  453. XFUNCTION {format.in.ed.booktitle}
  454. X{ booktitle empty$
  455. X    { "" }
  456. X    { editor empty$
  457. X    { "in " booktitle * }
  458. X    { "in " booktitle * ", " * format.ineditors * }
  459. X      if$
  460. X    }
  461. X  if$
  462. X}
  463. X
  464. XFUNCTION {empty.misc.check}
  465. X{ author empty$ title empty$ howpublished empty$
  466. X  month empty$ year empty$ note empty$
  467. X  and and and and and
  468. X  key empty$ not and
  469. X    { "all relevant fields are empty in " cite$ * warning$ }
  470. X    'skip$
  471. X  if$
  472. X}
  473. X
  474. XFUNCTION {format.thesis.type}
  475. X{ type empty$
  476. X    'skip$
  477. X    { pop$
  478. X      type "l" change.case$
  479. X    }
  480. X  if$
  481. X}
  482. X
  483. XFUNCTION {format.tr.number}
  484. X{ type empty$
  485. X    { "Rapp. Tech." }
  486. X    'type
  487. X  if$
  488. X  number empty$
  489. X    { "l" change.case$ }
  490. X    { number tie.or.space.connect }
  491. X  if$
  492. X}
  493. X
  494. XFUNCTION {format.article.crossref}
  495. X{ key empty$
  496. X    { journal empty$
  497. X    { "need key or journal for " cite$ * " to crossref " * crossref *
  498. X      warning$
  499. X      ""
  500. X    }
  501. X    { "in " journal * }
  502. X      if$
  503. X    }
  504. X    { "in " key * }
  505. X  if$
  506. X  " \cite{" * crossref * "}" *
  507. X}
  508. X
  509. XFUNCTION {format.crossref.editor}
  510. X{ editor #1 "{vv~}{ll}" format.name$
  511. X  editor num.names$ duplicate$
  512. X  #2 >
  513. X    { pop$ " et~al." * }
  514. X    { #2 <
  515. X    'skip$
  516. X    { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  517. X        { " et~al." * }
  518. X        { " et " * editor #2 "{vv~}{ll}" format.name$ * }
  519. X      if$
  520. X    }
  521. X      if$
  522. X    }
  523. X  if$
  524. X}
  525. X
  526. XFUNCTION {format.book.crossref}
  527. X{ volume empty$
  528. X    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  529. X      "in "
  530. X    }
  531. X    { "vol.~" volume *
  532. X      " of " *
  533. X    }
  534. X  if$
  535. X  editor empty$
  536. X  editor field.or.null author field.or.null =
  537. X  or
  538. X    { key empty$
  539. X    { series empty$
  540. X        { "need editor, key, or series for " cite$ * " to crossref " *
  541. X          crossref * warning$
  542. X          "" *
  543. X        }
  544. X        { series * }
  545. X      if$
  546. X    }
  547. X    { key * }
  548. X      if$
  549. X    }
  550. X    { format.crossref.editor * }
  551. X  if$
  552. X  " \cite{" * crossref * "}" *
  553. X}
  554. X
  555. XFUNCTION {format.incoll.inproc.crossref}
  556. X{ editor empty$
  557. X  editor field.or.null author field.or.null =
  558. X  or
  559. X    { key empty$
  560. X    { booktitle empty$
  561. X        { "need editor, key, or booktitle for " cite$ * " to crossref " *
  562. X          crossref * warning$
  563. X          ""
  564. X        }
  565. X        { "in " booktitle * }
  566. X      if$
  567. X    }
  568. X    { "in " key * }
  569. X      if$
  570. X    }
  571. X    { "in " format.crossref.editor * }
  572. X  if$
  573. X  " \cite{" * crossref * "}" *
  574. X}
  575. X
  576. XFUNCTION {article}
  577. X{ output.bibitem
  578. X  format.authors "author" output.check
  579. X  format.title "title" output.check
  580. X  crossref missing$
  581. X    { journal "journal" output.check
  582. X      format.vol.year output
  583. X    }
  584. X    { format.article.crossref output.nonnull }
  585. X  if$
  586. X  format.pages output
  587. X  new.block
  588. X  note output
  589. X  fin.entry
  590. X  newline$
  591. X}
  592. X
  593. XFUNCTION {book}
  594. X{ output.bibitem
  595. X  author empty$
  596. X    { format.editors "author and editor" output.check }
  597. X    { format.authors output.nonnull
  598. X      crossref missing$
  599. X    { "author and editor" editor either.or.check }
  600. X    'skip$
  601. X      if$
  602. X    }
  603. X  if$
  604. X  format.btitle "title" output.check
  605. X  crossref missing$
  606. X    { format.bvolume output
  607. X      format.number.series output
  608. X      publisher "publisher" output.check
  609. X      address output
  610. X    }
  611. X    { format.book.crossref output.nonnull }
  612. X  if$
  613. X  format.edition output
  614. X  format.date "year" output.check
  615. X  new.block
  616. X  note output
  617. X  fin.entry
  618. X  newline$
  619. X}
  620. X
  621. XFUNCTION {booklet}
  622. X{ output.bibitem
  623. X  format.authors output
  624. X  format.title "title" output.check
  625. X  howpublished new.block.checka
  626. X  howpublished output
  627. X  address output
  628. X  format.date output
  629. X  new.block
  630. X  note output
  631. X  fin.entry
  632. X  newline$
  633. X}
  634. X
  635. XFUNCTION {inbook}
  636. X{ output.bibitem
  637. X  author empty$
  638. X    { format.editors "author and editor" output.check }
  639. X    { format.authors output.nonnull
  640. X      crossref missing$
  641. X    { "author and editor" editor either.or.check }
  642. X    'skip$
  643. X      if$
  644. X    }
  645. X  if$
  646. X  format.btitle "title" output.check
  647. X  crossref missing$
  648. X    { format.bvolume output
  649. X      format.number.series output
  650. X      publisher "publisher" output.check
  651. X      address output
  652. X    }
  653. X    { format.book.crossref output.nonnull }
  654. X  if$
  655. X  format.edition output
  656. X  format.date "year" output.check
  657. X  format.chapter.pages "chapter and pages" output.check
  658. X  new.block
  659. X  note output
  660. X  fin.entry
  661. X}
  662. X
  663. XFUNCTION {incollection}
  664. X{ output.bibitem
  665. X  format.authors "author" output.check
  666. X  format.title "title" output.check
  667. X  crossref missing$
  668. X    { format.in.ed.booktitle "booktitle" output.check
  669. X      format.bvolume output
  670. X      format.number.series output
  671. X      publisher "publisher" output.check
  672. X      address output
  673. X      format.edition output
  674. X      format.date "year" output.check
  675. X    }
  676. X    { format.incoll.inproc.crossref output.nonnull }
  677. X  if$
  678. X  format.chapter.pages output
  679. X  new.block
  680. X  note output
  681. X  fin.entry
  682. X}
  683. X
  684. XFUNCTION {inproceedings}
  685. X{ output.bibitem
  686. X  format.authors "author" output.check
  687. X  format.title "title" output.check
  688. X  crossref missing$
  689. X    { format.in.ed.booktitle "booktitle" output.check
  690. X      format.bvolume output
  691. X      format.number.series output
  692. X      address empty$
  693. X    { organization output
  694. X      publisher output
  695. X      format.date "year" output.check
  696. X    }
  697. X    { address output.nonnull
  698. X      format.date "year" output.check
  699. X      organization output
  700. X      publisher output
  701. X    }
  702. X      if$
  703. X    }
  704. X    { format.incoll.inproc.crossref output.nonnull }
  705. X  if$
  706. X  format.pages output
  707. X  new.block
  708. X  note output
  709. X  fin.entry
  710. X}
  711. X
  712. XFUNCTION {conference} { inproceedings }
  713. X
  714. XFUNCTION {manual}
  715. X{ output.bibitem
  716. X  author empty$
  717. X    { format.organization output }
  718. X    { format.authors output.nonnull }
  719. X  if$
  720. X  format.btitle "title" output.check
  721. X  author empty$
  722. X    'skip$
  723. X    { organization output }
  724. X  if$
  725. X  address output
  726. X  format.edition output
  727. X  format.date output
  728. X  new.block
  729. X  note output
  730. X  fin.entry
  731. X}
  732. X
  733. XFUNCTION {mastersthesis}
  734. X{ output.bibitem
  735. X  format.authors "author" output.check
  736. X  format.title "title" output.check
  737. X  "Master's thesis" format.thesis.type output.nonnull
  738. X  school "school" output.check
  739. X  address output
  740. X  format.date "year" output.check
  741. X  new.block
  742. X  note output
  743. X  fin.entry
  744. X}
  745. X
  746. XFUNCTION {misc}
  747. X{ output.bibitem
  748. X  format.authors output
  749. X  format.title output
  750. X  howpublished new.block.checka
  751. X  howpublished output
  752. X  format.date output
  753. X  new.block
  754. X  note output
  755. X  fin.entry
  756. X  empty.misc.check
  757. X}
  758. X
  759. XFUNCTION {phdthesis}
  760. X{ output.bibitem
  761. X  format.authors "author" output.check
  762. X  format.btitle "title" output.check
  763. X  "PhD thesis" format.thesis.type output.nonnull
  764. X  school "school" output.check
  765. X  address output
  766. X  format.date "year" output.check
  767. X  new.block
  768. X  note output
  769. X  fin.entry
  770. X}
  771. X
  772. XFUNCTION {proceedings}
  773. X{ output.bibitem
  774. X  editor empty$
  775. X    { format.organization output }
  776. X    { format.editors output.nonnull }
  777. X  if$
  778. X  format.btitle "title" output.check
  779. X  format.bvolume output
  780. X  format.number.series output
  781. X  address empty$
  782. X    { editor empty$
  783. X    'skip$
  784. X    { organization output }
  785. X      if$
  786. X      publisher output
  787. X      format.date "year" output.check
  788. X    }
  789. X    { address output.nonnull
  790. X      format.date "year" output.check
  791. X      editor empty$
  792. X    'skip$
  793. X    { organization output }
  794. X      if$
  795. X      publisher output
  796. X    }
  797. X  if$
  798. X  new.block
  799. X  note output
  800. X  fin.entry
  801. X}
  802. X
  803. XFUNCTION {techreport}
  804. X{ output.bibitem
  805. X  format.authors "author" output.check
  806. X  format.title "title" output.check
  807. X  format.tr.number output.nonnull
  808. X  institution "institution" output.check
  809. X  address output
  810. X  format.date "year" output.check
  811. X  new.block
  812. X  note output
  813. X  fin.entry
  814. X}
  815. X
  816. XFUNCTION {unpublished}
  817. X{ output.bibitem
  818. X  format.authors "author" output.check
  819. X  format.title "title" output.check
  820. X  new.block
  821. X  note "note" output.check
  822. X  format.date output
  823. X  fin.entry
  824. X}
  825. X
  826. XFUNCTION {default.type} { misc }
  827. X
  828. XMACRO {jan} {"Jan."}
  829. X
  830. XMACRO {feb} {"F\'ev."}
  831. X
  832. XMACRO {mar} {"Mars"}
  833. X
  834. XMACRO {apr} {"Avr."}
  835. X
  836. XMACRO {may} {"Mai"}
  837. X
  838. XMACRO {jun} {"Juin"}
  839. X
  840. XMACRO {jul} {"Juil."}
  841. X
  842. XMACRO {aug} {"Ao\^{u}t"}
  843. X
  844. XMACRO {sep} {"Sept."}
  845. X
  846. XMACRO {oct} {"Oct."}
  847. X
  848. XMACRO {nov} {"Nov."}
  849. X
  850. XMACRO {dec} {"D\'ec."}
  851. X
  852. XMACRO {acmcs} {"ACM Comput. Surveys"}
  853. X
  854. XMACRO {acta} {"Acta Inf."}
  855. X
  856. XMACRO {cacm} {"Comm. ACM"}
  857. X
  858. XMACRO {ibmjrd} {"IBM J. Res. Dev."}
  859. X
  860. XMACRO {ibmsj} {"IBM Syst.~J."}
  861. X
  862. XMACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  863. X
  864. XMACRO {ieeetc} {"IEEE Trans. Comput."}
  865. X
  866. XMACRO {ieeetcad}
  867. X {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  868. X
  869. XMACRO {ipl} {"Inf. Process. Lett."}
  870. X
  871. XMACRO {jacm} {"J.~Assoc. Comput. Mach."}
  872. X
  873. XMACRO {jcss} {"J.~Comput. System Sci."}
  874. X
  875. XMACRO {scp} {"Sci. Comput. Programming"}
  876. X
  877. XMACRO {sicomp} {"SIAM J. Comput."}
  878. X
  879. XMACRO {tocs} {"ACM Trans. Comput. Syst."}
  880. X
  881. XMACRO {tods} {"ACM Trans. Database Syst."}
  882. X
  883. XMACRO {tog} {"ACM Trans. Gr."}
  884. X
  885. XMACRO {toms} {"ACM Trans. Math. Softw."}
  886. X
  887. XMACRO {toois} {"ACM Trans. Office Inf. Syst."}
  888. X
  889. XMACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  890. X
  891. XMACRO {tcs} {"Theoretical Comput. Sci."}
  892. X
  893. XREAD
  894. X
  895. XFUNCTION {sortify}
  896. X{ purify$
  897. X  "l" change.case$
  898. X}
  899. X
  900. XINTEGERS { len }
  901. X
  902. XFUNCTION {chop.word}
  903. X{ 's :=
  904. X  'len :=
  905. X  s #1 len substring$ =
  906. X    { s len #1 + global.max$ substring$ }
  907. X    's
  908. X  if$
  909. X}
  910. X
  911. XFUNCTION {sort.format.names}
  912. X{ 's :=
  913. X  #1 'nameptr :=
  914. X  ""
  915. X  s num.names$ 'numnames :=
  916. X  numnames 'namesleft :=
  917. X    { namesleft #0 > }
  918. X    { nameptr #1 >
  919. X    { "   " * }
  920. X    'skip$
  921. X      if$
  922. X      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
  923. X      nameptr numnames = t "others" = and
  924. X    { "et al" * }
  925. X    { t sortify * }
  926. X      if$
  927. X      nameptr #1 + 'nameptr :=
  928. X      namesleft #1 - 'namesleft :=
  929. X    }
  930. X  while$
  931. X}
  932. X
  933. XFUNCTION {sort.format.title}
  934. X{ 't :=
  935. X  "A " #2
  936. X    "An " #3
  937. X      "The " #4 t chop.word
  938. X    chop.word
  939. X  chop.word
  940. X  sortify
  941. X  #1 global.max$ substring$
  942. X}
  943. X
  944. XFUNCTION {author.sort}
  945. X{ author empty$
  946. X    { key empty$
  947. X    { "to sort, need author or key in " cite$ * warning$
  948. X      ""
  949. X    }
  950. X    { key sortify }
  951. X      if$
  952. X    }
  953. X    { author sort.format.names }
  954. X  if$
  955. X}
  956. X
  957. XFUNCTION {author.editor.sort}
  958. X{ author empty$
  959. X    { editor empty$
  960. X    { key empty$
  961. X        { "to sort, need author, editor, or key in " cite$ * warning$
  962. X          ""
  963. X        }
  964. X        { key sortify }
  965. X      if$
  966. X    }
  967. X    { editor sort.format.names }
  968. X      if$
  969. X    }
  970. X    { author sort.format.names }
  971. X  if$
  972. X}
  973. X
  974. XFUNCTION {author.organization.sort}
  975. X{ author empty$
  976. X    { organization empty$
  977. X    { key empty$
  978. X        { "to sort, need author, organization, or key in " cite$ * warning$
  979. X          ""
  980. X        }
  981. X        { key sortify }
  982. X      if$
  983. X    }
  984. X    { "The " #4 organization chop.word sortify }
  985. X      if$
  986. X    }
  987. X    { author sort.format.names }
  988. X  if$
  989. X}
  990. X
  991. XFUNCTION {editor.organization.sort}
  992. X{ editor empty$
  993. X    { organization empty$
  994. X    { key empty$
  995. X        { "to sort, need editor, organization, or key in " cite$ * warning$
  996. X          ""
  997. X        }
  998. X        { key sortify }
  999. X      if$
  1000. X    }
  1001. X    { "The " #4 organization chop.word sortify }
  1002. X      if$
  1003. X    }
  1004. X    { editor sort.format.names }
  1005. X  if$
  1006. X}
  1007. X
  1008. XFUNCTION {presort}
  1009. X{ type$ "book" =
  1010. X  type$ "inbook" =
  1011. X  or
  1012. X    'author.editor.sort
  1013. X    { type$ "proceedings" =
  1014. X    'editor.organization.sort
  1015. X    { type$ "manual" =
  1016. X        'author.organization.sort
  1017. X        'author.sort
  1018. X      if$
  1019. X    }
  1020. X      if$
  1021. X    }
  1022. X  if$
  1023. X  "    "
  1024. X  *
  1025. X  year field.or.null sortify
  1026. X  *
  1027. X  "    "
  1028. X  *
  1029. X  title field.or.null
  1030. X  sort.format.title
  1031. X  *
  1032. X  #1 entry.max$ substring$
  1033. X  'sort.key$ :=
  1034. X}
  1035. X
  1036. XITERATE {presort}
  1037. X
  1038. XSORT
  1039. X
  1040. XSTRINGS { longest.label }
  1041. X
  1042. XINTEGERS { number.label longest.label.width }
  1043. X
  1044. XFUNCTION {initialize.longest.label}
  1045. X{ "" 'longest.label :=
  1046. X  #1 'number.label :=
  1047. X  #0 'longest.label.width :=
  1048. X}
  1049. X
  1050. XFUNCTION {longest.label.pass}
  1051. X{ number.label int.to.str$ 'label :=
  1052. X  number.label #1 + 'number.label :=
  1053. X  label width$ longest.label.width >
  1054. X    { label 'longest.label :=
  1055. X      label width$ 'longest.label.width :=
  1056. X    }
  1057. X    'skip$
  1058. X  if$
  1059. X}
  1060. X
  1061. XEXECUTE {initialize.longest.label}
  1062. X
  1063. XITERATE {longest.label.pass}
  1064. X
  1065. XFUNCTION {begin.bib}
  1066. X{ preamble$ empty$
  1067. X    'skip$
  1068. X    { preamble$ write$ newline$ }
  1069. X  if$
  1070. X  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1071. X}
  1072. X
  1073. XEXECUTE {begin.bib}
  1074. X
  1075. XEXECUTE {init.state.consts}
  1076. X
  1077. XEXECUTE {init.last.authors}
  1078. X
  1079. XITERATE {call.type$}
  1080. X
  1081. XFUNCTION {end.bib}
  1082. X{ newline$
  1083. X  "\end{thebibliography}" write$ newline$
  1084. X}
  1085. X
  1086. XEXECUTE {end.bib}
  1087. END_OF_FILE
  1088.   if test 18314 -ne `wc -c <'fsiam.bst'`; then
  1089.     echo shar: \"'fsiam.bst'\" unpacked with wrong size!
  1090.   fi
  1091.   # end of 'fsiam.bst'
  1092. fi
  1093. if test -f 'lsiam.bst' -a "${1}" != "-c" ; then 
  1094.   echo shar: Will not clobber existing file \"'lsiam.bst'\"
  1095. else
  1096.   echo shar: Extracting \"'lsiam.bst'\" \(17953 characters\)
  1097.   sed "s/^X//" >'lsiam.bst' <<'END_OF_FILE'
  1098. X% SIAM bibliography style (29-Jan-88 version)
  1099. X%    numeric labels, alphabetic order, Mathematical Reviews abbreviations,
  1100. X%    names in \sc, titles in italics, book titles mixed upper-lower and article
  1101. X%    titles lowercase, commas separate all fields except before "notes".
  1102. X%
  1103. X%   History
  1104. X%    1/30/86    (HWT)    Original version, by Howard Trickey.
  1105. X%    6/15/87    (HWT)    Fix format.editors---Martin Costabel.
  1106. X%    1/29/88    (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
  1107. X%            THIS `siam' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
  1108. X%    4/16/92    (YGA)    Last change to the style to be LSIAM, that is a style
  1109. X%            producing the reference labels. This style is based
  1110. X%            on FSIAM which is a french version of SIAM
  1111. X
  1112. XENTRY
  1113. X  { address
  1114. X    annote
  1115. X    author
  1116. X    booktitle
  1117. X    chapter
  1118. X    edition
  1119. X    editor
  1120. X    howpublished
  1121. X    institution
  1122. X    journal
  1123. X    key
  1124. X    month
  1125. X    note
  1126. X    number
  1127. X    organization
  1128. X    pages
  1129. X    publisher
  1130. X    school
  1131. X    series
  1132. X    title
  1133. X    type
  1134. X    volume
  1135. X    year
  1136. X  }
  1137. X  {}
  1138. X  { label }
  1139. X
  1140. XINTEGERS { output.state before.all mid.sentence after.block }
  1141. X
  1142. XFUNCTION {init.state.consts}
  1143. X{ #0 'before.all :=
  1144. X  #1 'mid.sentence :=
  1145. X  #2 'after.block :=
  1146. X}
  1147. X
  1148. XSTRINGS { s t }
  1149. X
  1150. XFUNCTION {output.nonnull}
  1151. X{ 's :=
  1152. X  output.state mid.sentence =
  1153. X    { ", " * write$ }
  1154. X    { output.state after.block =
  1155. X    { add.period$ write$
  1156. X      newline$
  1157. X      "\newblock " write$
  1158. X    }
  1159. X    'write$
  1160. X      if$
  1161. X      mid.sentence 'output.state :=
  1162. X    }
  1163. X  if$
  1164. X  s
  1165. X}
  1166. X
  1167. XFUNCTION {output}
  1168. X{ duplicate$ empty$
  1169. X    'pop$
  1170. X    'output.nonnull
  1171. X  if$
  1172. X}
  1173. X
  1174. XFUNCTION {output.check}
  1175. X{ 't :=
  1176. X  duplicate$ empty$
  1177. X    { pop$ "empty " t * " in " * cite$ * warning$ }
  1178. X    'output.nonnull
  1179. X  if$
  1180. X}
  1181. X
  1182. XFUNCTION {output.bibitem}
  1183. X{ newline$
  1184. X  "\bibitem[" write$ cite$ write$ "]{" write$
  1185. X  cite$ write$
  1186. X  "}" write$
  1187. X  newline$
  1188. X  ""
  1189. X  before.all 'output.state :=
  1190. X}
  1191. X
  1192. XFUNCTION {format.annote}
  1193. X{ annote empty$
  1194. X    { "" }
  1195. X        { "\ifx\annote\undefined\else\begin{annote} "
  1196. X      annote
  1197. X      * " \end{annote}\fi " *
  1198. X    }
  1199. X      if$
  1200. X}
  1201. X
  1202. XFUNCTION {fin.entry}
  1203. X{ add.period$
  1204. X  write$
  1205. X  newline$
  1206. X  format.annote write$
  1207. X}
  1208. X
  1209. XFUNCTION {new.block}
  1210. X{ output.state before.all =
  1211. X    'skip$
  1212. X    { after.block 'output.state := }
  1213. X  if$
  1214. X}
  1215. X
  1216. XFUNCTION {not}
  1217. X{   { #0 }
  1218. X    { #1 }
  1219. X  if$
  1220. X}
  1221. X
  1222. XFUNCTION {and}
  1223. X{   'skip$
  1224. X    { pop$ #0 }
  1225. X  if$
  1226. X}
  1227. X
  1228. XFUNCTION {or}
  1229. X{   { pop$ #1 }
  1230. X    'skip$
  1231. X  if$
  1232. X}
  1233. X
  1234. XFUNCTION {new.block.checka}
  1235. X{ empty$
  1236. X    'skip$
  1237. X    'new.block
  1238. X  if$
  1239. X}
  1240. X
  1241. XFUNCTION {field.or.null}
  1242. X{ duplicate$ empty$
  1243. X    { pop$ "" }
  1244. X    'skip$
  1245. X  if$
  1246. X}
  1247. X
  1248. XFUNCTION {emphasize}
  1249. X{ duplicate$ empty$
  1250. X    { pop$ "" }
  1251. X    { "{\em " swap$ * "}" * }
  1252. X  if$
  1253. X}
  1254. X
  1255. XFUNCTION {scapify}
  1256. X{ duplicate$ empty$
  1257. X    { pop$ "" }
  1258. X    { "{\sc " swap$ * "}" * }
  1259. X  if$
  1260. X}
  1261. X
  1262. XINTEGERS { nameptr namesleft numnames }
  1263. X
  1264. XFUNCTION {format.names}
  1265. X{ 's :=
  1266. X  #1 'nameptr :=
  1267. X  s num.names$ 'numnames :=
  1268. X  numnames 'namesleft :=
  1269. X    { namesleft #0 > }
  1270. X    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  1271. X      nameptr #1 >
  1272. X    { namesleft #1 >
  1273. X        { ", " * t * }
  1274. X        { numnames #2 >
  1275. X        { "," * }
  1276. X        'skip$
  1277. X          if$
  1278. X          t "others" =
  1279. X        { " et~al." * }
  1280. X        { " et " * t * }
  1281. X          if$
  1282. X        }
  1283. X      if$
  1284. X    }
  1285. X    't
  1286. X      if$
  1287. X      nameptr #1 + 'nameptr :=
  1288. X      namesleft #1 - 'namesleft :=
  1289. X    }
  1290. X  while$
  1291. X}
  1292. X
  1293. XSTRINGS { last.authors }
  1294. X
  1295. XFUNCTION {init.last.authors}
  1296. X{ "" 'last.authors :=
  1297. X}
  1298. X
  1299. XFUNCTION {format.authors}
  1300. X{ author empty$
  1301. X    { "" 'last.authors :=
  1302. X      ""
  1303. X    }
  1304. X    { author last.authors =
  1305. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  1306. X        { author format.names scapify }
  1307. X      if$
  1308. X      author 'last.authors :=
  1309. X    }
  1310. X  if$
  1311. X}
  1312. X
  1313. XFUNCTION {format.organization}
  1314. X{ organization empty$
  1315. X    { "" 'last.authors :=
  1316. X      ""
  1317. X    }
  1318. X    { organization last.authors =
  1319. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  1320. X        { organization scapify }
  1321. X      if$
  1322. X      organization 'last.authors :=
  1323. X    }
  1324. X  if$
  1325. X}
  1326. X
  1327. XFUNCTION {format.editors}
  1328. X{ editor empty$
  1329. X    { "" 'last.authors :=
  1330. X      ""
  1331. X    }
  1332. X    { editor last.authors =
  1333. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  1334. X    { editor format.names scapify }
  1335. X      if$
  1336. X      editor num.names$ #1 >
  1337. X        { ", eds." * }
  1338. X    { ", ed." * }
  1339. X      if$
  1340. X      editor 'last.authors :=
  1341. X    }
  1342. X  if$
  1343. X}
  1344. X
  1345. XFUNCTION {format.ineditors}
  1346. X{ editor empty$
  1347. X    { "" }
  1348. X    { editor format.names
  1349. X      editor num.names$ #1 >
  1350. X    { ", eds." * }
  1351. X    { ", ed." * }
  1352. X      if$
  1353. X    }
  1354. X  if$
  1355. X}
  1356. X
  1357. XFUNCTION {format.title}
  1358. X{ title empty$
  1359. X    { "" }
  1360. X    { title "t" change.case$ emphasize }
  1361. X  if$
  1362. X}
  1363. X
  1364. XFUNCTION {n.dashify}
  1365. X{ 't :=
  1366. X  ""
  1367. X    { t empty$ not }
  1368. X    { t #1 #1 substring$ "-" =
  1369. X    { t #1 #2 substring$ "--" = not
  1370. X        { "--" *
  1371. X          t #2 global.max$ substring$ 't :=
  1372. X        }
  1373. X        {   { t #1 #1 substring$ "-" = }
  1374. X        { "-" *
  1375. X          t #2 global.max$ substring$ 't :=
  1376. X        }
  1377. X          while$
  1378. X        }
  1379. X      if$
  1380. X    }
  1381. X    { t #1 #1 substring$ *
  1382. X      t #2 global.max$ substring$ 't :=
  1383. X    }
  1384. X      if$
  1385. X    }
  1386. X  while$
  1387. X}
  1388. X
  1389. XFUNCTION {format.date}
  1390. X{ year empty$
  1391. X    { month empty$
  1392. X    { "" }
  1393. X    { "there's a month but no year in " cite$ * warning$
  1394. X      month
  1395. X    }
  1396. X      if$
  1397. X    }
  1398. X    { month empty$
  1399. X    'year
  1400. X    { month " " * year * }
  1401. X      if$
  1402. X    }
  1403. X  if$
  1404. X}
  1405. X
  1406. XFUNCTION {format.btitle}
  1407. X{ title emphasize
  1408. X}
  1409. X
  1410. XFUNCTION {tie.or.space.connect}
  1411. X{ duplicate$ text.length$ #3 <
  1412. X    { "~" }
  1413. X    { " " }
  1414. X  if$
  1415. X  swap$ * *
  1416. X}
  1417. X
  1418. XFUNCTION {either.or.check}
  1419. X{ empty$
  1420. X    'pop$
  1421. X    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  1422. X  if$
  1423. X}
  1424. X
  1425. XFUNCTION {format.bvolume}
  1426. X{ volume empty$
  1427. X    { "" }
  1428. X    { "vol.~" volume *
  1429. X      series empty$
  1430. X    'skip$
  1431. X    { " of " * series * }
  1432. X      if$
  1433. X      "volume and number" number either.or.check
  1434. X    }
  1435. X  if$
  1436. X}
  1437. X
  1438. XFUNCTION {format.number.series}
  1439. X{ volume empty$
  1440. X    { number empty$
  1441. X    { series field.or.null }
  1442. X    { "no.~" number *
  1443. X      series empty$
  1444. X        { "there's a number but no series in " cite$ * warning$ }
  1445. X        { " in " * series * }
  1446. X      if$
  1447. X    }
  1448. X      if$
  1449. X    }
  1450. X    { "" }
  1451. X  if$
  1452. X}
  1453. X
  1454. XFUNCTION {format.edition}
  1455. X{ edition empty$
  1456. X    { "" }
  1457. X    { edition "l" change.case$ "~ed." * }
  1458. X  if$
  1459. X}
  1460. X
  1461. XINTEGERS { multiresult }
  1462. X
  1463. XFUNCTION {multi.page.check}
  1464. X{ 't :=
  1465. X  #0 'multiresult :=
  1466. X    { multiresult not
  1467. X      t empty$ not
  1468. X      and
  1469. X    }
  1470. X    { t #1 #1 substring$
  1471. X      duplicate$ "-" =
  1472. X      swap$ duplicate$ "," =
  1473. X      swap$ "+" =
  1474. X      or or
  1475. X    { #1 'multiresult := }
  1476. X    { t #2 global.max$ substring$ 't := }
  1477. X      if$
  1478. X    }
  1479. X  while$
  1480. X  multiresult
  1481. X}
  1482. X
  1483. XFUNCTION {format.pages}
  1484. X{ pages empty$
  1485. X    { "" }
  1486. X    { pages multi.page.check
  1487. X    { "pp.~" pages n.dashify * }
  1488. X    { "p.~" pages * }
  1489. X      if$
  1490. X    }
  1491. X  if$
  1492. X}
  1493. X
  1494. XFUNCTION {format.vol.year}
  1495. X{ volume field.or.null
  1496. X  year empty$
  1497. X    { "empty year in " cite$ * warning$ }
  1498. X    { " (" year * ")" * * }
  1499. X  if$
  1500. X}
  1501. X
  1502. XFUNCTION {format.chapter.pages}
  1503. X{ chapter empty$
  1504. X    'format.pages
  1505. X    { type empty$
  1506. X    { "ch.~" chapter * }
  1507. X    { type "l" change.case$ chapter tie.or.space.connect }
  1508. X      if$
  1509. X      pages empty$
  1510. X    'skip$
  1511. X    { ", " * format.pages * }
  1512. X      if$
  1513. X    }
  1514. X  if$
  1515. X}
  1516. X
  1517. XFUNCTION {format.in.ed.booktitle}
  1518. X{ booktitle empty$
  1519. X    { "" }
  1520. X    { editor empty$
  1521. X    { "in " booktitle * }
  1522. X    { "in " booktitle * ", " * format.ineditors * }
  1523. X      if$
  1524. X    }
  1525. X  if$
  1526. X}
  1527. X
  1528. XFUNCTION {empty.misc.check}
  1529. X{ author empty$ title empty$ howpublished empty$
  1530. X  month empty$ year empty$ note empty$
  1531. X  and and and and and
  1532. X  key empty$ not and
  1533. X    { "all relevant fields are empty in " cite$ * warning$ }
  1534. X    'skip$
  1535. X  if$
  1536. X}
  1537. X
  1538. XFUNCTION {format.thesis.type}
  1539. X{ type empty$
  1540. X    'skip$
  1541. X    { pop$
  1542. X      type "l" change.case$
  1543. X    }
  1544. X  if$
  1545. X}
  1546. X
  1547. XFUNCTION {format.tr.number}
  1548. X{ type empty$
  1549. X    { "Rapp. Tech." }
  1550. X    'type
  1551. X  if$
  1552. X  number empty$
  1553. X    { "l" change.case$ }
  1554. X    { number tie.or.space.connect }
  1555. X  if$
  1556. X}
  1557. X
  1558. XFUNCTION {format.article.crossref}
  1559. X{ key empty$
  1560. X    { journal empty$
  1561. X    { "need key or journal for " cite$ * " to crossref " * crossref *
  1562. X      warning$
  1563. X      ""
  1564. X    }
  1565. X    { "in " journal * }
  1566. X      if$
  1567. X    }
  1568. X    { "in " key * }
  1569. X  if$
  1570. X  " \cite{" * crossref * "}" *
  1571. X}
  1572. X
  1573. XFUNCTION {format.crossref.editor}
  1574. X{ editor #1 "{vv~}{ll}" format.name$
  1575. X  editor num.names$ duplicate$
  1576. X  #2 >
  1577. X    { pop$ " et~al." * }
  1578. X    { #2 <
  1579. X    'skip$
  1580. X    { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1581. X        { " et~al." * }
  1582. X        { " et " * editor #2 "{vv~}{ll}" format.name$ * }
  1583. X      if$
  1584. X    }
  1585. X      if$
  1586. X    }
  1587. X  if$
  1588. X}
  1589. X
  1590. XFUNCTION {format.book.crossref}
  1591. X{ volume empty$
  1592. X    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  1593. X      "in "
  1594. X    }
  1595. X    { "vol.~" volume *
  1596. X      " of " *
  1597. X    }
  1598. X  if$
  1599. X  editor empty$
  1600. X  editor field.or.null author field.or.null =
  1601. X  or
  1602. X    { key empty$
  1603. X    { series empty$
  1604. X        { "need editor, key, or series for " cite$ * " to crossref " *
  1605. X          crossref * warning$
  1606. X          "" *
  1607. X        }
  1608. X        { series * }
  1609. X      if$
  1610. X    }
  1611. X    { key * }
  1612. X      if$
  1613. X    }
  1614. X    { format.crossref.editor * }
  1615. X  if$
  1616. X  " \cite{" * crossref * "}" *
  1617. X}
  1618. X
  1619. XFUNCTION {format.incoll.inproc.crossref}
  1620. X{ editor empty$
  1621. X  editor field.or.null author field.or.null =
  1622. X  or
  1623. X    { key empty$
  1624. X    { booktitle empty$
  1625. X        { "need editor, key, or booktitle for " cite$ * " to crossref " *
  1626. X          crossref * warning$
  1627. X          ""
  1628. X        }
  1629. X        { "in " booktitle * }
  1630. X      if$
  1631. X    }
  1632. X    { "in " key * }
  1633. X      if$
  1634. X    }
  1635. X    { "in " format.crossref.editor * }
  1636. X  if$
  1637. X  " \cite{" * crossref * "}" *
  1638. X}
  1639. X
  1640. XFUNCTION {article}
  1641. X{ output.bibitem
  1642. X  format.authors "author" output.check
  1643. X  format.title "title" output.check
  1644. X  crossref missing$
  1645. X    { journal "journal" output.check
  1646. X      format.vol.year output
  1647. X    }
  1648. X    { format.article.crossref output.nonnull }
  1649. X  if$
  1650. X  format.pages output
  1651. X  new.block
  1652. X  note output
  1653. X  fin.entry
  1654. X}
  1655. X
  1656. XFUNCTION {book}
  1657. X{ output.bibitem
  1658. X  author empty$
  1659. X    { format.editors "author and editor" output.check }
  1660. X    { format.authors output.nonnull
  1661. X      crossref missing$
  1662. X    { "author and editor" editor either.or.check }
  1663. X    'skip$
  1664. X      if$
  1665. X    }
  1666. X  if$
  1667. X  format.btitle "title" output.check
  1668. X  crossref missing$
  1669. X    { format.bvolume output
  1670. X      format.number.series output
  1671. X      publisher "publisher" output.check
  1672. X      address output
  1673. X    }
  1674. X    { format.book.crossref output.nonnull }
  1675. X  if$
  1676. X  format.edition output
  1677. X  format.date "year" output.check
  1678. X  new.block
  1679. X  note output
  1680. X  fin.entry
  1681. X}
  1682. X
  1683. XFUNCTION {booklet}
  1684. X{ output.bibitem
  1685. X  format.authors output
  1686. X  format.title "title" output.check
  1687. X  howpublished new.block.checka
  1688. X  howpublished output
  1689. X  address output
  1690. X  format.date output
  1691. X  new.block
  1692. X  note output
  1693. X  fin.entry
  1694. X}
  1695. X
  1696. XFUNCTION {inbook}
  1697. X{ output.bibitem
  1698. X  author empty$
  1699. X    { format.editors "author and editor" output.check }
  1700. X    { format.authors output.nonnull
  1701. X      crossref missing$
  1702. X    { "author and editor" editor either.or.check }
  1703. X    'skip$
  1704. X      if$
  1705. X    }
  1706. X  if$
  1707. X  format.btitle "title" output.check
  1708. X  crossref missing$
  1709. X    { format.bvolume output
  1710. X      format.number.series output
  1711. X      publisher "publisher" output.check
  1712. X      address output
  1713. X    }
  1714. X    { format.book.crossref output.nonnull }
  1715. X  if$
  1716. X  format.edition output
  1717. X  format.date "year" output.check
  1718. X  format.chapter.pages "chapter and pages" output.check
  1719. X  new.block
  1720. X  note output
  1721. X  fin.entry
  1722. X}
  1723. X
  1724. XFUNCTION {incollection}
  1725. X{ output.bibitem
  1726. X  format.authors "author" output.check
  1727. X  format.title "title" output.check
  1728. X  crossref missing$
  1729. X    { format.in.ed.booktitle "booktitle" output.check
  1730. X      format.bvolume output
  1731. X      format.number.series output
  1732. X      publisher "publisher" output.check
  1733. X      address output
  1734. X      format.edition output
  1735. X      format.date "year" output.check
  1736. X    }
  1737. X    { format.incoll.inproc.crossref output.nonnull }
  1738. X  if$
  1739. X  format.chapter.pages output
  1740. X  new.block
  1741. X  note output
  1742. X  fin.entry
  1743. X}
  1744. X
  1745. XFUNCTION {inproceedings}
  1746. X{ output.bibitem
  1747. X  format.authors "author" output.check
  1748. X  format.title "title" output.check
  1749. X  crossref missing$
  1750. X    { format.in.ed.booktitle "booktitle" output.check
  1751. X      format.bvolume output
  1752. X      format.number.series output
  1753. X      address empty$
  1754. X    { organization output
  1755. X      publisher output
  1756. X      format.date "year" output.check
  1757. X    }
  1758. X    { address output.nonnull
  1759. X      format.date "year" output.check
  1760. X      organization output
  1761. X      publisher output
  1762. X    }
  1763. X      if$
  1764. X    }
  1765. X    { format.incoll.inproc.crossref output.nonnull }
  1766. X  if$
  1767. X  format.pages output
  1768. X  new.block
  1769. X  note output
  1770. X  fin.entry
  1771. X}
  1772. X
  1773. XFUNCTION {conference} { inproceedings }
  1774. X
  1775. XFUNCTION {manual}
  1776. X{ output.bibitem
  1777. X  author empty$
  1778. X    { format.organization output }
  1779. X    { format.authors output.nonnull }
  1780. X  if$
  1781. X  format.btitle "title" output.check
  1782. X  author empty$
  1783. X    'skip$
  1784. X    { organization output }
  1785. X  if$
  1786. X  address output
  1787. X  format.edition output
  1788. X  format.date output
  1789. X  new.block
  1790. X  note output
  1791. X  fin.entry
  1792. X}
  1793. X
  1794. XFUNCTION {mastersthesis}
  1795. X{ output.bibitem
  1796. X  format.authors "author" output.check
  1797. X  format.title "title" output.check
  1798. X  "Master's thesis" format.thesis.type output.nonnull
  1799. X  school "school" output.check
  1800. X  address output
  1801. X  format.date "year" output.check
  1802. X  new.block
  1803. X  note output
  1804. X  fin.entry
  1805. X}
  1806. X
  1807. XFUNCTION {misc}
  1808. X{ output.bibitem
  1809. X  format.authors output
  1810. X  format.title output
  1811. X  howpublished new.block.checka
  1812. X  howpublished output
  1813. X  format.date output
  1814. X  new.block
  1815. X  note output
  1816. X  fin.entry
  1817. X  empty.misc.check
  1818. X}
  1819. X
  1820. XFUNCTION {phdthesis}
  1821. X{ output.bibitem
  1822. X  format.authors "author" output.check
  1823. X  format.btitle "title" output.check
  1824. X  "PhD thesis" format.thesis.type output.nonnull
  1825. X  school "school" output.check
  1826. X  address output
  1827. X  format.date "year" output.check
  1828. X  new.block
  1829. X  note output
  1830. X  fin.entry
  1831. X}
  1832. X
  1833. XFUNCTION {proceedings}
  1834. X{ output.bibitem
  1835. X  editor empty$
  1836. X    { format.organization output }
  1837. X    { format.editors output.nonnull }
  1838. X  if$
  1839. X  format.btitle "title" output.check
  1840. X  format.bvolume output
  1841. X  format.number.series output
  1842. X  address empty$
  1843. X    { editor empty$
  1844. X    'skip$
  1845. X    { organization output }
  1846. X      if$
  1847. X      publisher output
  1848. X      format.date "year" output.check
  1849. X    }
  1850. X    { address output.nonnull
  1851. X      format.date "year" output.check
  1852. X      editor empty$
  1853. X    'skip$
  1854. X    { organization output }
  1855. X      if$
  1856. X      publisher output
  1857. X    }
  1858. X  if$
  1859. X  new.block
  1860. X  note output
  1861. X  fin.entry
  1862. X}
  1863. X
  1864. XFUNCTION {techreport}
  1865. X{ output.bibitem
  1866. X  format.authors "author" output.check
  1867. X  format.title "title" output.check
  1868. X  format.tr.number output.nonnull
  1869. X  institution "institution" output.check
  1870. X  address output
  1871. X  format.date "year" output.check
  1872. X  new.block
  1873. X  note output
  1874. X  fin.entry
  1875. X}
  1876. X
  1877. XFUNCTION {unpublished}
  1878. X{ output.bibitem
  1879. X  format.authors "author" output.check
  1880. X  format.title "title" output.check
  1881. X  new.block
  1882. X  note "note" output.check
  1883. X  format.date output
  1884. X  fin.entry
  1885. X}
  1886. X
  1887. XFUNCTION {default.type} { misc }
  1888. X
  1889. XMACRO {jan} {"Jan."}
  1890. X
  1891. XMACRO {feb} {"Fev."}
  1892. X
  1893. XMACRO {mar} {"Mars"}
  1894. X
  1895. XMACRO {apr} {"Avr."}
  1896. X
  1897. XMACRO {may} {"Mai"}
  1898. X
  1899. XMACRO {jun} {"Juin"}
  1900. X
  1901. XMACRO {jul} {"Juil."}
  1902. X
  1903. XMACRO {aug} {"Ao\^{u}t"}
  1904. X
  1905. XMACRO {sep} {"Sept."}
  1906. X
  1907. XMACRO {oct} {"Oct."}
  1908. X
  1909. XMACRO {nov} {"Nov."}
  1910. X
  1911. XMACRO {dec} {"Dec."}
  1912. X
  1913. XMACRO {acmcs} {"ACM Comput. Surveys"}
  1914. X
  1915. XMACRO {acta} {"Acta Inf."}
  1916. X
  1917. XMACRO {cacm} {"Comm. ACM"}
  1918. X
  1919. XMACRO {ibmjrd} {"IBM J. Res. Dev."}
  1920. X
  1921. XMACRO {ibmsj} {"IBM Syst.~J."}
  1922. X
  1923. XMACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  1924. X
  1925. XMACRO {ieeetc} {"IEEE Trans. Comput."}
  1926. X
  1927. XMACRO {ieeetcad}
  1928. X {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  1929. X
  1930. XMACRO {ipl} {"Inf. Process. Lett."}
  1931. X
  1932. XMACRO {jacm} {"J.~Assoc. Comput. Mach."}
  1933. X
  1934. XMACRO {jcss} {"J.~Comput. System Sci."}
  1935. X
  1936. XMACRO {scp} {"Sci. Comput. Programming"}
  1937. X
  1938. XMACRO {sicomp} {"SIAM J. Comput."}
  1939. X
  1940. XMACRO {tocs} {"ACM Trans. Comput. Syst."}
  1941. X
  1942. XMACRO {tods} {"ACM Trans. Database Syst."}
  1943. X
  1944. XMACRO {tog} {"ACM Trans. Gr."}
  1945. X
  1946. XMACRO {toms} {"ACM Trans. Math. Softw."}
  1947. X
  1948. XMACRO {toois} {"ACM Trans. Office Inf. Syst."}
  1949. X
  1950. XMACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  1951. X
  1952. XMACRO {tcs} {"Theoretical Comput. Sci."}
  1953. X
  1954. XREAD
  1955. X
  1956. XFUNCTION {sortify}
  1957. X{ purify$
  1958. X  "l" change.case$
  1959. X}
  1960. X
  1961. XINTEGERS { len }
  1962. X
  1963. XFUNCTION {chop.word}
  1964. X{ 's :=
  1965. X  'len :=
  1966. X  s #1 len substring$ =
  1967. X    { s len #1 + global.max$ substring$ }
  1968. X    's
  1969. X  if$
  1970. X}
  1971. X
  1972. XFUNCTION {sort.format.names}
  1973. X{ 's :=
  1974. X  #1 'nameptr :=
  1975. X  ""
  1976. X  s num.names$ 'numnames :=
  1977. X  numnames 'namesleft :=
  1978. X    { namesleft #0 > }
  1979. X    { nameptr #1 >
  1980. X    { "   " * }
  1981. X    'skip$
  1982. X      if$
  1983. X      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
  1984. X      nameptr numnames = t "others" = and
  1985. X    { "et al" * }
  1986. X    { t sortify * }
  1987. X      if$
  1988. X      nameptr #1 + 'nameptr :=
  1989. X      namesleft #1 - 'namesleft :=
  1990. X    }
  1991. X  while$
  1992. X}
  1993. X
  1994. XFUNCTION {sort.format.title}
  1995. X{ 't :=
  1996. X  "A " #2
  1997. X    "An " #3
  1998. X      "The " #4 t chop.word
  1999. X    chop.word
  2000. X  chop.word
  2001. X  sortify
  2002. X  #1 global.max$ substring$
  2003. X}
  2004. X
  2005. XFUNCTION {author.sort}
  2006. X{ author empty$
  2007. X    { key empty$
  2008. X    { "to sort, need author or key in " cite$ * warning$
  2009. X      ""
  2010. X    }
  2011. X    { key sortify }
  2012. X      if$
  2013. X    }
  2014. X    { author sort.format.names }
  2015. X  if$
  2016. X}
  2017. X
  2018. XFUNCTION {author.editor.sort}
  2019. X{ author empty$
  2020. X    { editor empty$
  2021. X    { key empty$
  2022. X        { "to sort, need author, editor, or key in " cite$ * warning$
  2023. X          ""
  2024. X        }
  2025. X        { key sortify }
  2026. X      if$
  2027. X    }
  2028. X    { editor sort.format.names }
  2029. X      if$
  2030. X    }
  2031. X    { author sort.format.names }
  2032. X  if$
  2033. X}
  2034. X
  2035. XFUNCTION {author.organization.sort}
  2036. X{ author empty$
  2037. X    { organization empty$
  2038. X    { key empty$
  2039. X        { "to sort, need author, organization, or key in " cite$ * warning$
  2040. X          ""
  2041. X        }
  2042. X        { key sortify }
  2043. X      if$
  2044. X    }
  2045. X    { "The " #4 organization chop.word sortify }
  2046. X      if$
  2047. X    }
  2048. X    { author sort.format.names }
  2049. X  if$
  2050. X}
  2051. X
  2052. XFUNCTION {editor.organization.sort}
  2053. X{ editor empty$
  2054. X    { organization empty$
  2055. X    { key empty$
  2056. X        { "to sort, need editor, organization, or key in " cite$ * warning$
  2057. X          ""
  2058. X        }
  2059. X        { key sortify }
  2060. X      if$
  2061. X    }
  2062. X    { "The " #4 organization chop.word sortify }
  2063. X      if$
  2064. X    }
  2065. X    { editor sort.format.names }
  2066. X  if$
  2067. X}
  2068. X
  2069. XFUNCTION {presort}
  2070. X{
  2071. X  cite$ 'sort.key$ :=
  2072. X}
  2073. X
  2074. XITERATE {presort}
  2075. X
  2076. XSORT
  2077. X
  2078. XSTRINGS { longest.label }
  2079. X
  2080. XINTEGERS { number.label longest.label.width }
  2081. X
  2082. XFUNCTION {initialize.longest.label}
  2083. X{ "" 'longest.label :=
  2084. X  #1 'number.label :=
  2085. X  #0 'longest.label.width :=
  2086. X}
  2087. X
  2088. XFUNCTION {longest.label.pass}
  2089. X{ 
  2090. X  cite$ 'label :=
  2091. X  label width$ longest.label.width >
  2092. X    { label 'longest.label :=
  2093. X      label width$ 'longest.label.width :=
  2094. X    }
  2095. X    'skip$
  2096. X  if$
  2097. X}
  2098. X
  2099. XEXECUTE {initialize.longest.label}
  2100. X
  2101. XITERATE {longest.label.pass}
  2102. X
  2103. XFUNCTION {begin.bib}
  2104. X{ preamble$ empty$
  2105. X    'skip$
  2106. X    { preamble$ write$ newline$ }
  2107. X  if$
  2108. X  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  2109. X}
  2110. X
  2111. XEXECUTE {begin.bib}
  2112. X
  2113. XEXECUTE {init.state.consts}
  2114. X
  2115. XEXECUTE {init.last.authors}
  2116. X
  2117. XITERATE {call.type$}
  2118. X
  2119. XFUNCTION {end.bib}
  2120. X{ newline$
  2121. X  "\end{thebibliography}" write$ newline$
  2122. X}
  2123. X
  2124. XEXECUTE {end.bib}
  2125. END_OF_FILE
  2126.   if test 17953 -ne `wc -c <'lsiam.bst'`; then
  2127.     echo shar: \"'lsiam.bst'\" unpacked with wrong size!
  2128.   fi
  2129.   # end of 'lsiam.bst'
  2130. fi
  2131. if test -f 'siam.bst' -a "${1}" != "-c" ; then 
  2132.   echo shar: Will not clobber existing file \"'siam.bst'\"
  2133. else
  2134.   echo shar: Extracting \"'siam.bst'\" \(18146 characters\)
  2135.   sed "s/^X//" >'siam.bst' <<'END_OF_FILE'
  2136. X% SIAM bibliography style (29-Jan-88 version)
  2137. X%    numeric labels, alphabetic order, Mathematical Reviews abbreviations,
  2138. X%    names in \sc, titles in italics, book titles mixed upper-lower and article
  2139. X%    titles lowercase, commas separate all fields except before "notes".
  2140. X%
  2141. X%   History
  2142. X%    1/30/86    (HWT)    Original version, by Howard Trickey.
  2143. X%    6/15/87    (HWT)    Fix format.editors---Martin Costabel.
  2144. X%    1/29/88    (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
  2145. X%            THIS `siam' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
  2146. X
  2147. XENTRY
  2148. X  { address
  2149. X    annote
  2150. X    author
  2151. X    booktitle
  2152. X    chapter
  2153. X    edition
  2154. X    editor
  2155. X    howpublished
  2156. X    institution
  2157. X    journal
  2158. X    key
  2159. X    month
  2160. X    note
  2161. X    number
  2162. X    organization
  2163. X    pages
  2164. X    publisher
  2165. X    school
  2166. X    series
  2167. X    title
  2168. X    type
  2169. X    volume
  2170. X    year
  2171. X  }
  2172. X  {}
  2173. X  { label }
  2174. X
  2175. XINTEGERS { output.state before.all mid.sentence after.block }
  2176. X
  2177. XFUNCTION {init.state.consts}
  2178. X{ #0 'before.all :=
  2179. X  #1 'mid.sentence :=
  2180. X  #2 'after.block :=
  2181. X}
  2182. X
  2183. XSTRINGS { s t }
  2184. X
  2185. XFUNCTION {output.nonnull}
  2186. X{ 's :=
  2187. X  output.state mid.sentence =
  2188. X    { ", " * write$ }
  2189. X    { output.state after.block =
  2190. X    { add.period$ write$
  2191. X      newline$
  2192. X      "\newblock " write$
  2193. X    }
  2194. X    'write$
  2195. X      if$
  2196. X      mid.sentence 'output.state :=
  2197. X    }
  2198. X  if$
  2199. X  s
  2200. X}
  2201. X
  2202. XFUNCTION {output}
  2203. X{ duplicate$ empty$
  2204. X    'pop$
  2205. X    'output.nonnull
  2206. X  if$
  2207. X}
  2208. X
  2209. XFUNCTION {output.check}
  2210. X{ 't :=
  2211. X  duplicate$ empty$
  2212. X    { pop$ "empty " t * " in " * cite$ * warning$ }
  2213. X    'output.nonnull
  2214. X  if$
  2215. X}
  2216. X
  2217. XFUNCTION {output.bibitem}
  2218. X{ newline$
  2219. X  "\bibitem{" write$
  2220. X  cite$ write$
  2221. X  "}" write$
  2222. X  newline$
  2223. X  ""
  2224. X  before.all 'output.state :=
  2225. X}
  2226. X
  2227. XFUNCTION {format.annote}
  2228. X{ annote empty$
  2229. X    { "" }
  2230. X        { "\ifx\annote\undefined\else\begin{annote} "
  2231. X      annote
  2232. X      * " \end{annote}\fi " *
  2233. X    }
  2234. X      if$
  2235. X}
  2236. X
  2237. XFUNCTION {fin.entry}
  2238. X{ add.period$
  2239. X  write$
  2240. X  newline$
  2241. X  format.annote write$
  2242. X}
  2243. X
  2244. XFUNCTION {new.block}
  2245. X{ output.state before.all =
  2246. X    'skip$
  2247. X    { after.block 'output.state := }
  2248. X  if$
  2249. X}
  2250. X
  2251. XFUNCTION {not}
  2252. X{   { #0 }
  2253. X    { #1 }
  2254. X  if$
  2255. X}
  2256. X
  2257. XFUNCTION {and}
  2258. X{   'skip$
  2259. X    { pop$ #0 }
  2260. X  if$
  2261. X}
  2262. X
  2263. XFUNCTION {or}
  2264. X{   { pop$ #1 }
  2265. X    'skip$
  2266. X  if$
  2267. X}
  2268. X
  2269. XFUNCTION {new.block.checka}
  2270. X{ empty$
  2271. X    'skip$
  2272. X    'new.block
  2273. X  if$
  2274. X}
  2275. X
  2276. XFUNCTION {field.or.null}
  2277. X{ duplicate$ empty$
  2278. X    { pop$ "" }
  2279. X    'skip$
  2280. X  if$
  2281. X}
  2282. X
  2283. XFUNCTION {emphasize}
  2284. X{ duplicate$ empty$
  2285. X    { pop$ "" }
  2286. X    { "{\em " swap$ * "}" * }
  2287. X  if$
  2288. X}
  2289. X
  2290. XFUNCTION {scapify}
  2291. X{ duplicate$ empty$
  2292. X    { pop$ "" }
  2293. X    { "{\sc " swap$ * "}" * }
  2294. X  if$
  2295. X}
  2296. X
  2297. XINTEGERS { nameptr namesleft numnames }
  2298. X
  2299. XFUNCTION {format.names}
  2300. X{ 's :=
  2301. X  #1 'nameptr :=
  2302. X  s num.names$ 'numnames :=
  2303. X  numnames 'namesleft :=
  2304. X    { namesleft #0 > }
  2305. X    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  2306. X      nameptr #1 >
  2307. X    { namesleft #1 >
  2308. X        { ", " * t * }
  2309. X        { numnames #2 >
  2310. X        { "," * }
  2311. X        'skip$
  2312. X          if$
  2313. X          t "others" =
  2314. X        { " et~al." * }
  2315. X        { " and " * t * }
  2316. X          if$
  2317. X        }
  2318. X      if$
  2319. X    }
  2320. X    't
  2321. X      if$
  2322. X      nameptr #1 + 'nameptr :=
  2323. X      namesleft #1 - 'namesleft :=
  2324. X    }
  2325. X  while$
  2326. X}
  2327. X
  2328. XSTRINGS { last.authors }
  2329. X
  2330. XFUNCTION {init.last.authors}
  2331. X{ "" 'last.authors :=
  2332. X}
  2333. X
  2334. XFUNCTION {format.authors}
  2335. X{ author empty$
  2336. X    { "" 'last.authors :=
  2337. X      ""
  2338. X    }
  2339. X    { author last.authors =
  2340. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  2341. X        { author format.names scapify }
  2342. X      if$
  2343. X      author 'last.authors :=
  2344. X    }
  2345. X  if$
  2346. X}
  2347. X
  2348. XFUNCTION {format.organization}
  2349. X{ organization empty$
  2350. X    { "" 'last.authors :=
  2351. X      ""
  2352. X    }
  2353. X    { organization last.authors =
  2354. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  2355. X        { organization scapify }
  2356. X      if$
  2357. X      organization 'last.authors :=
  2358. X    }
  2359. X  if$
  2360. X}
  2361. X
  2362. XFUNCTION {format.editors}
  2363. X{ editor empty$
  2364. X    { "" 'last.authors :=
  2365. X      ""
  2366. X    }
  2367. X    { editor last.authors =
  2368. X        { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
  2369. X    { editor format.names scapify }
  2370. X      if$
  2371. X      editor num.names$ #1 >
  2372. X        { ", eds." * }
  2373. X    { ", ed." * }
  2374. X      if$
  2375. X      editor 'last.authors :=
  2376. X    }
  2377. X  if$
  2378. X}
  2379. X
  2380. XFUNCTION {format.ineditors}
  2381. X{ editor empty$
  2382. X    { "" }
  2383. X    { editor format.names
  2384. X      editor num.names$ #1 >
  2385. X    { ", eds." * }
  2386. X    { ", ed." * }
  2387. X      if$
  2388. X    }
  2389. X  if$
  2390. X}
  2391. X
  2392. XFUNCTION {format.title}
  2393. X{ title empty$
  2394. X    { "" }
  2395. X    { title "t" change.case$ emphasize }
  2396. X  if$
  2397. X}
  2398. X
  2399. XFUNCTION {n.dashify}
  2400. X{ 't :=
  2401. X  ""
  2402. X    { t empty$ not }
  2403. X    { t #1 #1 substring$ "-" =
  2404. X    { t #1 #2 substring$ "--" = not
  2405. X        { "--" *
  2406. X          t #2 global.max$ substring$ 't :=
  2407. X        }
  2408. X        {   { t #1 #1 substring$ "-" = }
  2409. X        { "-" *
  2410. X          t #2 global.max$ substring$ 't :=
  2411. X        }
  2412. X          while$
  2413. X        }
  2414. X      if$
  2415. X    }
  2416. X    { t #1 #1 substring$ *
  2417. X      t #2 global.max$ substring$ 't :=
  2418. X    }
  2419. X      if$
  2420. X    }
  2421. X  while$
  2422. X}
  2423. X
  2424. XFUNCTION {format.date}
  2425. X{ year empty$
  2426. X    { month empty$
  2427. X    { "" }
  2428. X    { "there's a month but no year in " cite$ * warning$
  2429. X      month
  2430. X    }
  2431. X      if$
  2432. X    }
  2433. X    { month empty$
  2434. X    'year
  2435. X    { month " " * year * }
  2436. X      if$
  2437. X    }
  2438. X  if$
  2439. X}
  2440. X
  2441. XFUNCTION {format.btitle}
  2442. X{ title emphasize
  2443. X}
  2444. X
  2445. XFUNCTION {tie.or.space.connect}
  2446. X{ duplicate$ text.length$ #3 <
  2447. X    { "~" }
  2448. X    { " " }
  2449. X  if$
  2450. X  swap$ * *
  2451. X}
  2452. X
  2453. XFUNCTION {either.or.check}
  2454. X{ empty$
  2455. X    'pop$
  2456. X    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  2457. X  if$
  2458. X}
  2459. X
  2460. XFUNCTION {format.bvolume}
  2461. X{ volume empty$
  2462. X    { "" }
  2463. X    { "vol.~" volume *
  2464. X      series empty$
  2465. X    'skip$
  2466. X    { " of " * series * }
  2467. X      if$
  2468. X      "volume and number" number either.or.check
  2469. X    }
  2470. X  if$
  2471. X}
  2472. X
  2473. XFUNCTION {format.number.series}
  2474. X{ volume empty$
  2475. X    { number empty$
  2476. X    { series field.or.null }
  2477. X    { "no.~" number *
  2478. X      series empty$
  2479. X        { "there's a number but no series in " cite$ * warning$ }
  2480. X        { " in " * series * }
  2481. X      if$
  2482. X    }
  2483. X      if$
  2484. X    }
  2485. X    { "" }
  2486. X  if$
  2487. X}
  2488. X
  2489. XFUNCTION {format.edition}
  2490. X{ edition empty$
  2491. X    { "" }
  2492. X    { edition "l" change.case$ "~ed." * }
  2493. X  if$
  2494. X}
  2495. X
  2496. XINTEGERS { multiresult }
  2497. X
  2498. XFUNCTION {multi.page.check}
  2499. X{ 't :=
  2500. X  #0 'multiresult :=
  2501. X    { multiresult not
  2502. X      t empty$ not
  2503. X      and
  2504. X    }
  2505. X    { t #1 #1 substring$
  2506. X      duplicate$ "-" =
  2507. X      swap$ duplicate$ "," =
  2508. X      swap$ "+" =
  2509. X      or or
  2510. X    { #1 'multiresult := }
  2511. X    { t #2 global.max$ substring$ 't := }
  2512. X      if$
  2513. X    }
  2514. X  while$
  2515. X  multiresult
  2516. X}
  2517. X
  2518. XFUNCTION {format.pages}
  2519. X{ pages empty$
  2520. X    { "" }
  2521. X    { pages multi.page.check
  2522. X    { "pp.~" pages n.dashify * }
  2523. X    { "p.~" pages * }
  2524. X      if$
  2525. X    }
  2526. X  if$
  2527. X}
  2528. X
  2529. XFUNCTION {format.vol.year}
  2530. X{ volume field.or.null
  2531. X  year empty$
  2532. X    { "empty year in " cite$ * warning$ }
  2533. X    { " (" year * ")" * * }
  2534. X  if$
  2535. X}
  2536. X
  2537. XFUNCTION {format.chapter.pages}
  2538. X{ chapter empty$
  2539. X    'format.pages
  2540. X    { type empty$
  2541. X    { "ch.~" chapter * }
  2542. X    { type "l" change.case$ chapter tie.or.space.connect }
  2543. X      if$
  2544. X      pages empty$
  2545. X    'skip$
  2546. X    { ", " * format.pages * }
  2547. X      if$
  2548. X    }
  2549. X  if$
  2550. X}
  2551. X
  2552. XFUNCTION {format.in.ed.booktitle}
  2553. X{ booktitle empty$
  2554. X    { "" }
  2555. X    { editor empty$
  2556. X    { "in " booktitle * }
  2557. X    { "in " booktitle * ", " * format.ineditors * }
  2558. X      if$
  2559. X    }
  2560. X  if$
  2561. X}
  2562. X
  2563. XFUNCTION {empty.misc.check}
  2564. X{ author empty$ title empty$ howpublished empty$
  2565. X  month empty$ year empty$ note empty$
  2566. X  and and and and and
  2567. X  key empty$ not and
  2568. X    { "all relevant fields are empty in " cite$ * warning$ }
  2569. X    'skip$
  2570. X  if$
  2571. X}
  2572. X
  2573. XFUNCTION {format.thesis.type}
  2574. X{ type empty$
  2575. X    'skip$
  2576. X    { pop$
  2577. X      type "l" change.case$
  2578. X    }
  2579. X  if$
  2580. X}
  2581. X
  2582. XFUNCTION {format.tr.number}
  2583. X{ type empty$
  2584. X    { "Tech. Rep." }
  2585. X    'type
  2586. X  if$
  2587. X  number empty$
  2588. X    { "l" change.case$ }
  2589. X    { number tie.or.space.connect }
  2590. X  if$
  2591. X}
  2592. X
  2593. XFUNCTION {format.article.crossref}
  2594. X{ key empty$
  2595. X    { journal empty$
  2596. X    { "need key or journal for " cite$ * " to crossref " * crossref *
  2597. X      warning$
  2598. X      ""
  2599. X    }
  2600. X    { "in " journal * }
  2601. X      if$
  2602. X    }
  2603. X    { "in " key * }
  2604. X  if$
  2605. X  " \cite{" * crossref * "}" *
  2606. X}
  2607. X
  2608. XFUNCTION {format.crossref.editor}
  2609. X{ editor #1 "{vv~}{ll}" format.name$
  2610. X  editor num.names$ duplicate$
  2611. X  #2 >
  2612. X    { pop$ " et~al." * }
  2613. X    { #2 <
  2614. X    'skip$
  2615. X    { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  2616. X        { " et~al." * }
  2617. X        { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  2618. X      if$
  2619. X    }
  2620. X      if$
  2621. X    }
  2622. X  if$
  2623. X}
  2624. X
  2625. XFUNCTION {format.book.crossref}
  2626. X{ volume empty$
  2627. X    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  2628. X      "in "
  2629. X    }
  2630. X    { "vol.~" volume *
  2631. X      " of " *
  2632. X    }
  2633. X  if$
  2634. X  editor empty$
  2635. X  editor field.or.null author field.or.null =
  2636. X  or
  2637. X    { key empty$
  2638. X    { series empty$
  2639. X        { "need editor, key, or series for " cite$ * " to crossref " *
  2640. X          crossref * warning$
  2641. X          "" *
  2642. X        }
  2643. X        { series * }
  2644. X      if$
  2645. X    }
  2646. X    { key * }
  2647. X      if$
  2648. X    }
  2649. X    { format.crossref.editor * }
  2650. X  if$
  2651. X  " \cite{" * crossref * "}" *
  2652. X}
  2653. X
  2654. XFUNCTION {format.incoll.inproc.crossref}
  2655. X{ editor empty$
  2656. X  editor field.or.null author field.or.null =
  2657. X  or
  2658. X    { key empty$
  2659. X    { booktitle empty$
  2660. X        { "need editor, key, or booktitle for " cite$ * " to crossref " *
  2661. X          crossref * warning$
  2662. X          ""
  2663. X        }
  2664. X        { "in " booktitle * }
  2665. X      if$
  2666. X    }
  2667. X    { "in " key * }
  2668. X      if$
  2669. X    }
  2670. X    { "in " format.crossref.editor * }
  2671. X  if$
  2672. X  " \cite{" * crossref * "}" *
  2673. X}
  2674. X
  2675. XFUNCTION {article}
  2676. X{ output.bibitem
  2677. X  format.authors "author" output.check
  2678. X  format.title "title" output.check
  2679. X  crossref missing$
  2680. X    { journal "journal" output.check
  2681. X      format.vol.year output
  2682. X    }
  2683. X    { format.article.crossref output.nonnull }
  2684. X  if$
  2685. X  format.pages output
  2686. X  new.block
  2687. X  note output
  2688. X  fin.entry
  2689. X}
  2690. X
  2691. XFUNCTION {book}
  2692. X{ output.bibitem
  2693. X  author empty$
  2694. X    { format.editors "author and editor" output.check }
  2695. X    { format.authors output.nonnull
  2696. X      crossref missing$
  2697. X    { "author and editor" editor either.or.check }
  2698. X    'skip$
  2699. X      if$
  2700. X    }
  2701. X  if$
  2702. X  format.btitle "title" output.check
  2703. X  crossref missing$
  2704. X    { format.bvolume output
  2705. X      format.number.series output
  2706. X      publisher "publisher" output.check
  2707. X      address output
  2708. X    }
  2709. X    { format.book.crossref output.nonnull }
  2710. X  if$
  2711. X  format.edition output
  2712. X  format.date "year" output.check
  2713. X  new.block
  2714. X  note output
  2715. X  fin.entry
  2716. X}
  2717. X
  2718. XFUNCTION {booklet}
  2719. X{ output.bibitem
  2720. X  format.authors output
  2721. X  format.title "title" output.check
  2722. X  howpublished new.block.checka
  2723. X  howpublished output
  2724. X  address output
  2725. X  format.date output
  2726. X  new.block
  2727. X  note output
  2728. X  fin.entry
  2729. X}
  2730. X
  2731. XFUNCTION {inbook}
  2732. X{ output.bibitem
  2733. X  author empty$
  2734. X    { format.editors "author and editor" output.check }
  2735. X    { format.authors output.nonnull
  2736. X      crossref missing$
  2737. X    { "author and editor" editor either.or.check }
  2738. X    'skip$
  2739. X      if$
  2740. X    }
  2741. X  if$
  2742. X  format.btitle "title" output.check
  2743. X  crossref missing$
  2744. X    { format.bvolume output
  2745. X      format.number.series output
  2746. X      publisher "publisher" output.check
  2747. X      address output
  2748. X    }
  2749. X    { format.book.crossref output.nonnull }
  2750. X  if$
  2751. X  format.edition output
  2752. X  format.date "year" output.check
  2753. X  format.chapter.pages "chapter and pages" output.check
  2754. X  new.block
  2755. X  note output
  2756. X  fin.entry
  2757. X}
  2758. X
  2759. XFUNCTION {incollection}
  2760. X{ output.bibitem
  2761. X  format.authors "author" output.check
  2762. X  format.title "title" output.check
  2763. X  crossref missing$
  2764. X    { format.in.ed.booktitle "booktitle" output.check
  2765. X      format.bvolume output
  2766. X      format.number.series output
  2767. X      publisher "publisher" output.check
  2768. X      address output
  2769. X      format.edition output
  2770. X      format.date "year" output.check
  2771. X    }
  2772. X    { format.incoll.inproc.crossref output.nonnull }
  2773. X  if$
  2774. X  format.chapter.pages output
  2775. X  new.block
  2776. X  note output
  2777. X  fin.entry
  2778. X}
  2779. X
  2780. XFUNCTION {inproceedings}
  2781. X{ output.bibitem
  2782. X  format.authors "author" output.check
  2783. X  format.title "title" output.check
  2784. X  crossref missing$
  2785. X    { format.in.ed.booktitle "booktitle" output.check
  2786. X      format.bvolume output
  2787. X      format.number.series output
  2788. X      address empty$
  2789. X    { organization output
  2790. X      publisher output
  2791. X      format.date "year" output.check
  2792. X    }
  2793. X    { address output.nonnull
  2794. X      format.date "year" output.check
  2795. X      organization output
  2796. X      publisher output
  2797. X    }
  2798. X      if$
  2799. X    }
  2800. X    { format.incoll.inproc.crossref output.nonnull }
  2801. X  if$
  2802. X  format.pages output
  2803. X  new.block
  2804. X  note output
  2805. X  fin.entry
  2806. X}
  2807. X
  2808. XFUNCTION {conference} { inproceedings }
  2809. X
  2810. XFUNCTION {manual}
  2811. X{ output.bibitem
  2812. X  author empty$
  2813. X    { format.organization output }
  2814. X    { format.authors output.nonnull }
  2815. X  if$
  2816. X  format.btitle "title" output.check
  2817. X  author empty$
  2818. X    'skip$
  2819. X    { organization output }
  2820. X  if$
  2821. X  address output
  2822. X  format.edition output
  2823. X  format.date output
  2824. X  new.block
  2825. X  note output
  2826. X  fin.entry
  2827. X}
  2828. X
  2829. XFUNCTION {mastersthesis}
  2830. X{ output.bibitem
  2831. X  format.authors "author" output.check
  2832. X  format.title "title" output.check
  2833. X  "Master's thesis" format.thesis.type output.nonnull
  2834. X  school "school" output.check
  2835. X  address output
  2836. X  format.date "year" output.check
  2837. X  new.block
  2838. X  note output
  2839. X  fin.entry
  2840. X}
  2841. X
  2842. XFUNCTION {misc}
  2843. X{ output.bibitem
  2844. X  format.authors output
  2845. X  format.title output
  2846. X  howpublished new.block.checka
  2847. X  howpublished output
  2848. X  format.date output
  2849. X  new.block
  2850. X  note output
  2851. X  fin.entry
  2852. X  empty.misc.check
  2853. X}
  2854. X
  2855. XFUNCTION {phdthesis}
  2856. X{ output.bibitem
  2857. X  format.authors "author" output.check
  2858. X  format.btitle "title" output.check
  2859. X  "PhD thesis" format.thesis.type output.nonnull
  2860. X  school "school" output.check
  2861. X  address output
  2862. X  format.date "year" output.check
  2863. X  new.block
  2864. X  note output
  2865. X  fin.entry
  2866. X}
  2867. X
  2868. XFUNCTION {proceedings}
  2869. X{ output.bibitem
  2870. X  editor empty$
  2871. X    { format.organization output }
  2872. X    { format.editors output.nonnull }
  2873. X  if$
  2874. X  format.btitle "title" output.check
  2875. X  format.bvolume output
  2876. X  format.number.series output
  2877. X  address empty$
  2878. X    { editor empty$
  2879. X    'skip$
  2880. X    { organization output }
  2881. X      if$
  2882. X      publisher output
  2883. X      format.date "year" output.check
  2884. X    }
  2885. X    { address output.nonnull
  2886. X      format.date "year" output.check
  2887. X      editor empty$
  2888. X    'skip$
  2889. X    { organization output }
  2890. X      if$
  2891. X      publisher output
  2892. X    }
  2893. X  if$
  2894. X  new.block
  2895. X  note output
  2896. X  fin.entry
  2897. X}
  2898. X
  2899. XFUNCTION {techreport}
  2900. X{ output.bibitem
  2901. X  format.authors "author" output.check
  2902. X  format.title "title" output.check
  2903. X  format.tr.number output.nonnull
  2904. X  institution "institution" output.check
  2905. X  address output
  2906. X  format.date "year" output.check
  2907. X  new.block
  2908. X  note output
  2909. X  fin.entry
  2910. X}
  2911. X
  2912. XFUNCTION {unpublished}
  2913. X{ output.bibitem
  2914. X  format.authors "author" output.check
  2915. X  format.title "title" output.check
  2916. X  new.block
  2917. X  note "note" output.check
  2918. X  format.date output
  2919. X  fin.entry
  2920. X}
  2921. X
  2922. XFUNCTION {default.type} { misc }
  2923. X
  2924. XMACRO {jan} {"Jan."}
  2925. X
  2926. XMACRO {feb} {"Feb."}
  2927. X
  2928. XMACRO {mar} {"Mar."}
  2929. X
  2930. XMACRO {apr} {"Apr."}
  2931. X
  2932. XMACRO {may} {"May"}
  2933. X
  2934. XMACRO {jun} {"June"}
  2935. X
  2936. XMACRO {jul} {"July"}
  2937. X
  2938. XMACRO {aug} {"Aug."}
  2939. X
  2940. XMACRO {sep} {"Sept."}
  2941. X
  2942. XMACRO {oct} {"Oct."}
  2943. X
  2944. XMACRO {nov} {"Nov."}
  2945. X
  2946. XMACRO {dec} {"Dec."}
  2947. X
  2948. XMACRO {acmcs} {"ACM Comput. Surveys"}
  2949. X
  2950. XMACRO {acta} {"Acta Inf."}
  2951. X
  2952. XMACRO {cacm} {"Comm. ACM"}
  2953. X
  2954. XMACRO {ibmjrd} {"IBM J. Res. Dev."}
  2955. X
  2956. XMACRO {ibmsj} {"IBM Syst.~J."}
  2957. X
  2958. XMACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  2959. X
  2960. XMACRO {ieeetc} {"IEEE Trans. Comput."}
  2961. X
  2962. XMACRO {ieeetcad}
  2963. X {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  2964. X
  2965. XMACRO {ipl} {"Inf. Process. Lett."}
  2966. X
  2967. XMACRO {jacm} {"J.~Assoc. Comput. Mach."}
  2968. X
  2969. XMACRO {jcss} {"J.~Comput. System Sci."}
  2970. X
  2971. XMACRO {scp} {"Sci. Comput. Programming"}
  2972. X
  2973. XMACRO {sicomp} {"SIAM J. Comput."}
  2974. X
  2975. XMACRO {tocs} {"ACM Trans. Comput. Syst."}
  2976. X
  2977. XMACRO {tods} {"ACM Trans. Database Syst."}
  2978. X
  2979. XMACRO {tog} {"ACM Trans. Gr."}
  2980. X
  2981. XMACRO {toms} {"ACM Trans. Math. Softw."}
  2982. X
  2983. XMACRO {toois} {"ACM Trans. Office Inf. Syst."}
  2984. X
  2985. XMACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  2986. X
  2987. XMACRO {tcs} {"Theoretical Comput. Sci."}
  2988. X
  2989. XREAD
  2990. X
  2991. XFUNCTION {sortify}
  2992. X{ purify$
  2993. X  "l" change.case$
  2994. X}
  2995. X
  2996. XINTEGERS { len }
  2997. X
  2998. XFUNCTION {chop.word}
  2999. X{ 's :=
  3000. X  'len :=
  3001. X  s #1 len substring$ =
  3002. X    { s len #1 + global.max$ substring$ }
  3003. X    's
  3004. X  if$
  3005. X}
  3006. X
  3007. XFUNCTION {sort.format.names}
  3008. X{ 's :=
  3009. X  #1 'nameptr :=
  3010. X  ""
  3011. X  s num.names$ 'numnames :=
  3012. X  numnames 'namesleft :=
  3013. X    { namesleft #0 > }
  3014. X    { nameptr #1 >
  3015. X    { "   " * }
  3016. X    'skip$
  3017. X      if$
  3018. X      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
  3019. X      nameptr numnames = t "others" = and
  3020. X    { "et al" * }
  3021. X    { t sortify * }
  3022. X      if$
  3023. X      nameptr #1 + 'nameptr :=
  3024. X      namesleft #1 - 'namesleft :=
  3025. X    }
  3026. X  while$
  3027. X}
  3028. X
  3029. XFUNCTION {sort.format.title}
  3030. X{ 't :=
  3031. X  "A " #2
  3032. X    "An " #3
  3033. X      "The " #4 t chop.word
  3034. X    chop.word
  3035. X  chop.word
  3036. X  sortify
  3037. X  #1 global.max$ substring$
  3038. X}
  3039. X
  3040. XFUNCTION {author.sort}
  3041. X{ author empty$
  3042. X    { key empty$
  3043. X    { "to sort, need author or key in " cite$ * warning$
  3044. X      ""
  3045. X    }
  3046. X    { key sortify }
  3047. X      if$
  3048. X    }
  3049. X    { author sort.format.names }
  3050. X  if$
  3051. X}
  3052. X
  3053. XFUNCTION {author.editor.sort}
  3054. X{ author empty$
  3055. X    { editor empty$
  3056. X    { key empty$
  3057. X        { "to sort, need author, editor, or key in " cite$ * warning$
  3058. X          ""
  3059. X        }
  3060. X        { key sortify }
  3061. X      if$
  3062. X    }
  3063. X    { editor sort.format.names }
  3064. X      if$
  3065. X    }
  3066. X    { author sort.format.names }
  3067. X  if$
  3068. X}
  3069. X
  3070. XFUNCTION {author.organization.sort}
  3071. X{ author empty$
  3072. X    { organization empty$
  3073. X    { key empty$
  3074. X        { "to sort, need author, organization, or key in " cite$ * warning$
  3075. X          ""
  3076. X        }
  3077. X        { key sortify }
  3078. X      if$
  3079. X    }
  3080. X    { "The " #4 organization chop.word sortify }
  3081. X      if$
  3082. X    }
  3083. X    { author sort.format.names }
  3084. X  if$
  3085. X}
  3086. X
  3087. XFUNCTION {editor.organization.sort}
  3088. X{ editor empty$
  3089. X    { organization empty$
  3090. X    { key empty$
  3091. X        { "to sort, need editor, organization, or key in " cite$ * warning$
  3092. X          ""
  3093. X        }
  3094. X        { key sortify }
  3095. X      if$
  3096. X    }
  3097. X    { "The " #4 organization chop.word sortify }
  3098. X      if$
  3099. X    }
  3100. X    { editor sort.format.names }
  3101. X  if$
  3102. X}
  3103. X
  3104. XFUNCTION {presort}
  3105. X{ type$ "book" =
  3106. X  type$ "inbook" =
  3107. X  or
  3108. X    'author.editor.sort
  3109. X    { type$ "proceedings" =
  3110. X    'editor.organization.sort
  3111. X    { type$ "manual" =
  3112. X        'author.organization.sort
  3113. X        'author.sort
  3114. X      if$
  3115. X    }
  3116. X      if$
  3117. X    }
  3118. X  if$
  3119. X  "    "
  3120. X  *
  3121. X  year field.or.null sortify
  3122. X  *
  3123. X  "    "
  3124. X  *
  3125. X  title field.or.null
  3126. X  sort.format.title
  3127. X  *
  3128. X  #1 entry.max$ substring$
  3129. X  'sort.key$ :=
  3130. X}
  3131. X
  3132. XITERATE {presort}
  3133. X
  3134. XSORT
  3135. X
  3136. XSTRINGS { longest.label }
  3137. X
  3138. XINTEGERS { number.label longest.label.width }
  3139. X
  3140. XFUNCTION {initialize.longest.label}
  3141. X{ "" 'longest.label :=
  3142. X  #1 'number.label :=
  3143. X  #0 'longest.label.width :=
  3144. X}
  3145. X
  3146. XFUNCTION {longest.label.pass}
  3147. X{ number.label int.to.str$ 'label :=
  3148. X  number.label #1 + 'number.label :=
  3149. X  label width$ longest.label.width >
  3150. X    { label 'longest.label :=
  3151. X      label width$ 'longest.label.width :=
  3152. X    }
  3153. X    'skip$
  3154. X  if$
  3155. X}
  3156. X
  3157. XEXECUTE {initialize.longest.label}
  3158. X
  3159. XITERATE {longest.label.pass}
  3160. X
  3161. XFUNCTION {begin.bib}
  3162. X{ preamble$ empty$
  3163. X    'skip$
  3164. X    { preamble$ write$ newline$ }
  3165. X  if$
  3166. X  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  3167. X}
  3168. X
  3169. XEXECUTE {begin.bib}
  3170. X
  3171. XEXECUTE {init.state.consts}
  3172. X
  3173. XEXECUTE {init.last.authors}
  3174. X
  3175. XITERATE {call.type$}
  3176. X
  3177. XFUNCTION {end.bib}
  3178. X{ newline$
  3179. X  "\end{thebibliography}" write$ newline$
  3180. X}
  3181. X
  3182. XEXECUTE {end.bib}
  3183. END_OF_FILE
  3184.   if test 18146 -ne `wc -c <'siam.bst'`; then
  3185.     echo shar: \"'siam.bst'\" unpacked with wrong size!
  3186.   fi
  3187.   # end of 'siam.bst'
  3188. fi
  3189. echo shar: End of archive 3 \(of 3\).
  3190. cp /dev/null ark3isdone
  3191. MISSING=""
  3192. for I in 1 2 3 ; do
  3193.     if test ! -f ark${I}isdone ; then
  3194.     MISSING="${MISSING} ${I}"
  3195.     fi
  3196. done
  3197. if test "${MISSING}" = "" ; then
  3198.     echo You have unpacked all 3 archives.
  3199.     rm -f ark[1-9]isdone
  3200. else
  3201.     echo You still must unpack the following archives:
  3202.     echo "        " ${MISSING}
  3203. fi
  3204. exit 0
  3205. exit 0 # Just in case...
  3206.