Advertisement
Guest User

modified vancouver.bst

a guest
May 29th, 2014
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.21 KB | None | 0 0
  1. %%
  2. %% This `vancouver.bst' bibliographic style file (for LaTeX/BibTeX) is
  3. %% generated with the docstrip utility and modified manually to meet the
  4. %% ``Uniform Requirements for Manuscripts Submitted to Biomedical Journals''
  5. %% as published in N Engl J Med 1997;336:309-315.
  6. %% (also known as the Vancouver style)
  7. %% This specification may be found on the web page of the
  8. %% International Committe of Medical Journal Editors:
  9. %%
  10. %% http://www.icmje.org
  11. %%
  12. %%-------------------------------------------------------------------
  13. %%
  14. %% Copyright 2004 Folkert van der Beek
  15. %%
  16. %% This work may be distributed and/or modified under the
  17. %% conditions of the LaTeX Project Public License, either version 1.3
  18. %% of this license or (at your option) any later version.
  19. %% The latest version of this license is in
  20. %% http://www.latex-project.org/lppl.txt
  21. %% and version 1.3 or later is part of all distributions of LaTeX
  22. %% version 2005/12/01 or later.
  23. %%
  24. %% This work has the LPPL maintenance status `maintained'.
  25. %%
  26. %% The Current Maintainer of this work is Folkert van der Beek.
  27. %%
  28. %% Complaints, suggestions and comments may be sent to
  29. %%
  30. %% Folkert van der Beek <folkertvanderbeek at gmail dot com>
  31. %%
  32. %%-------------------------------------------------------------------
  33. %%
  34. %% This bibliography style file is intended for texts in ENGLISH
  35. %% This is a numerical citation style, and as such is standard LaTeX.
  36. %% It requires no extra package to interface to the main text.
  37. %% The form of the \bibitem entries is
  38. %% \bibitem{key}...
  39. %% Usage of \cite is as follows:
  40. %% \cite{key} ==>> [#]
  41. %% \cite[chap. 2]{key} ==>> [#, chap. 2]
  42. %% where # is a number determined by the ordering in the reference list.
  43. %% The order in the reference list is that by which the works were originally
  44. %% cited in the text, or that in the database.
  45. %
  46. %% To change the reference numbering system from [1] to 1,
  47. %% put the following code in the preamble:
  48. %% \makeatletter % Reference list option change
  49. %% \renewcommand\@biblabel[1]{#1} % from [1] to 1
  50. %% \makeatother %
  51. %%
  52. %%---------------------------------------------------------------------
  53.  
  54. %% List of all possible fields
  55. ENTRY
  56. { address
  57. assignee % for patents
  58. author
  59. booktitle % for articles in books
  60. chapter % for incollection, esp. internet documents
  61. cartographer % for maps
  62. day
  63. edition
  64. editor
  65. howpublished
  66. institution % for technical reports
  67. inventor % for patents
  68. journal
  69. key
  70. month
  71. note
  72. number
  73. organization
  74. pages
  75. part
  76. publisher
  77. school
  78. series
  79. title
  80. type
  81. volume
  82. word
  83. year
  84. eprint % urlbst
  85. doi % urlbst
  86. url % urlbst
  87. lastchecked % urlbst
  88. updated % urlbst
  89. }
  90. {}
  91. { label }
  92. %% Declaration of integer variables
  93. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  94. STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl } % urlbst...
  95. INTEGERS { hrefform addeprints adddoiresolver }
  96. % Following constants may be adjusted by hand, if desired
  97. FUNCTION {init.config.constants}
  98. {
  99. %% URL added by JB
  100. "URL: " 'urlintro := % prefix before URL
  101. "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
  102. "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
  103. "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
  104. "doi:" 'doiprefix := % text prefix printed before DOI ref
  105. #0 'addeprints := % 0=no eprints; 1=include eprints
  106. #0 'adddoiresolver := % 0=no DOI resolver; 1=include it
  107. #0 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
  108. }
  109. INTEGERS {
  110. bracket.state
  111. outside.brackets
  112. open.brackets
  113. within.brackets
  114. close.brackets
  115. }
  116. % ...urlbst to here
  117. FUNCTION {init.state.consts}
  118. { #0 'outside.brackets := % urlbst
  119. #1 'open.brackets :=
  120. #2 'within.brackets :=
  121. #3 'close.brackets :=
  122.  
  123. #0 'before.all :=
  124. #1 'mid.sentence :=
  125. #2 'after.sentence :=
  126. #3 'after.block :=
  127. }
  128. %% Declaration of string variables
  129. STRINGS { s t}
  130.  
  131. % urlbst
  132. FUNCTION {output.nonnull.original}
  133. { 's :=
  134. output.state mid.sentence =
  135. { ". " * write$ }
  136. { output.state after.block =
  137. { add.period$ write$
  138. newline$
  139. "\newblock " write$
  140. }
  141. { output.state before.all =
  142. 'write$
  143. { add.period$ " " * write$ }
  144. if$
  145. }
  146. if$
  147. mid.sentence 'output.state :=
  148. }
  149. if$
  150. s
  151. }
  152.  
  153. % urlbst...
  154. FUNCTION {output.nonnull}
  155. { % Save the thing we've been asked to output
  156. 's :=
  157. % If the bracket-state is close.brackets, then add a close-bracket to
  158. % what is currently at the top of the stack, and set bracket.state
  159. % to outside.brackets
  160. bracket.state close.brackets =
  161. { "]" *
  162. outside.brackets 'bracket.state :=
  163. }
  164. 'skip$
  165. if$
  166. bracket.state outside.brackets =
  167. { % We're outside all brackets -- this is the normal situation.
  168. % Write out what's currently at the top of the stack, using the
  169. % original output.nonnull function.
  170. s
  171. output.nonnull.original
  172. }
  173. { % Still in brackets. Add open-bracket or (continuation) comma, add the
  174. % new text (in s) to the top of the stack, and move to the close-brackets
  175. % state, ready for next time (unless inbrackets resets it). If we come
  176. % into this branch, then output.state is carefully undisturbed.
  177. bracket.state open.brackets =
  178. { " [" * }
  179. { ", " * } % bracket.state will be within.brackets
  180. if$
  181. s *
  182. close.brackets 'bracket.state :=
  183. }
  184. if$
  185. }
  186.  
  187. % Call this function just before adding something which should be presented in
  188. % brackets. bracket.state is handled specially within output.nonnull.
  189. FUNCTION {inbrackets}
  190. { bracket.state close.brackets =
  191. { within.brackets 'bracket.state := } % reset the state: not open nor closed
  192. { open.brackets 'bracket.state := }
  193. if$
  194. }
  195.  
  196. FUNCTION {format.lastchecked}
  197. { lastchecked empty$
  198. { "" }
  199. { updated empty$
  200. { inbrackets "cited " lastchecked * }
  201. { inbrackets "updated " updated * "; cited " * lastchecked * }
  202. if$
  203. }
  204. if$
  205. }
  206. % ...urlbst to here
  207.  
  208. FUNCTION {output}
  209. { duplicate$ empty$
  210. 'pop$
  211. 'output.nonnull
  212. if$
  213. }
  214.  
  215. FUNCTION {output.check}
  216. { 't :=
  217. duplicate$ empty$
  218. { pop$ "empty " t * " in " * cite$ * warning$ }
  219. 'output.nonnull
  220. if$
  221. }
  222.  
  223. FUNCTION {fin.entry}
  224. {
  225. bracket.state close.brackets = % urlbst
  226. { "]" * }
  227. 'skip$
  228. if$
  229. add.period$
  230. write$
  231. newline$
  232. }
  233.  
  234. FUNCTION {new.block}
  235. { output.state before.all =
  236. 'skip$
  237. { after.block 'output.state := }
  238. if$
  239. }
  240.  
  241. FUNCTION {new.sentence}
  242. { output.state after.block =
  243. 'skip$
  244. { output.state before.all =
  245. 'skip$
  246. { after.sentence 'output.state := }
  247. if$
  248. }
  249. if$
  250. }
  251.  
  252. FUNCTION {add.blank}
  253. { " " * before.all 'output.state :=
  254. }
  255.  
  256. FUNCTION {no.blank.or.punct}
  257. { "" * before.all 'output.state :=
  258. }
  259.  
  260. FUNCTION {add.semicolon}
  261. {
  262. ";" *
  263. no.blank.or.punct
  264. }
  265.  
  266. FUNCTION {date.block}
  267. {
  268. "." *
  269. no.blank.or.punct
  270. }
  271.  
  272. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  273. % LOGICAL `NOT', `AND', AND `OR' %
  274. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  275.  
  276. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  277. % Logical 'not':
  278. % If the first element on the stack is A then this function
  279. % does the following:
  280. % push { #0 }
  281. % push { #1 }
  282. % So now the first 3 elements of the stack are
  283. % { #1 } { #0 } A
  284. % The first 3 are popped and subjected to 'if':
  285. % If A > 0 then { #0 } is executed, else { #1 } is executed:
  286. % if A > 0
  287. % then 0
  288. % else 1
  289. % So consider integers as logicals, where 1 = true and 0 = false,
  290. % then this does
  291. % (if A then false else true)
  292. % which is a logical 'not'.
  293.  
  294. FUNCTION {not}
  295. { { #0 }
  296. { #1 }
  297. if$
  298. }
  299.  
  300. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  301. % Logical 'and':
  302. % If the first 2 elements on the stack are A B
  303. % then this function does the following:
  304. % push 'skip$
  305. % push { pop$ #0 }
  306. % So now first 4 elements are
  307. % { pop$ #0 } 'skip$ A B
  308. % The first 3 are popped and subjected to 'if' (B is on top of
  309. % the stack):
  310. % If A > 0 then 'skip$ is executed, else { pop$ #0 } is executed:
  311. % if A > 0
  312. % then (B stays on top of stack)
  313. % else (B is popped and #0 is pushed)
  314. % So consider integers as logicals, where 1 = true and 0 = false,
  315. % then this does
  316. % (if A then B else false)
  317. % which is a logical 'and'.
  318.  
  319. FUNCTION {and}
  320. { 'skip$
  321. { pop$ #0 }
  322. if$
  323. }
  324.  
  325. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  326. % Logical 'or':
  327. % If the first 2 elements on the stack are A B
  328. % then this function does the following:
  329. % push { pop$ #1 }
  330. % push 'skip$
  331. % So now first 4 elements are
  332. % 'skip$ { pop$ #1 } A B
  333. % The first 3 are popped and subjected to 'if' (B is on top of
  334. % the stack):
  335. % If A > 0 then { pop$ #1 } is executed, else 'skip$ is executed:
  336. % if A > 0
  337. % then (B is popped and #1 is pushed)
  338. % else (B stays on top of stack)
  339. % So consider integers as logicals, where 1 = true and 0 = false,
  340. % then this does
  341. % (if A then true else B)
  342. % which is a logical 'or'.
  343.  
  344. FUNCTION {or}
  345. { { pop$ #1 }
  346. 'skip$
  347. if$
  348. }
  349.  
  350. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  351. % GENERAL PURPOSE FUNCTIONS FOR FORMATTING %
  352. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  353.  
  354. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  355. % issues warning if field is empty
  356. % call with
  357. % "field" field warning.if.empty
  358. % Note that the first field must be between quotes
  359. % because it is the fieldname for use in the warning message.
  360. %
  361.  
  362. FUNCTION {warning.if.empty}
  363. { empty$
  364. { "No " swap$ * " in " * cite$ * warning$ }
  365. { pop$ }
  366. if$
  367. }
  368.  
  369. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  370. %
  371. % encloses string in pre- and postfix string
  372. % call with
  373. % prefix postfix S enclose.check
  374. % delivers empty string if S empty
  375. %
  376. FUNCTION {enclose.check}
  377. { duplicate$ empty$
  378. { pop$ pop$ pop$
  379. ""
  380. }
  381. { swap$ * * }
  382. if$
  383. }
  384.  
  385. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  386. %
  387. % emphasizes top of stack
  388. % call with
  389. % string" emphasize.check
  390. %
  391.  
  392. FUNCTION {emphasize.check}
  393. { "\Bem{" swap$
  394. "}" swap$
  395. enclose.check
  396. }
  397.  
  398.  
  399. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  400. %
  401. % brackets top of stack
  402. % call with
  403. % "string" bracket.check
  404. %
  405. FUNCTION {bracket.check}
  406. { "[" swap$
  407. "]" swap$
  408. enclose.check
  409. }
  410.  
  411. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  412. %
  413. % parenthesizes top of stack
  414. % call with
  415. % "string" parenthesize
  416. %
  417. FUNCTION {parenthesize.check}
  418. { "(" swap$
  419. ")" swap$
  420. enclose.check
  421. }
  422.  
  423. STRINGS {z}
  424.  
  425. FUNCTION {remove.dots}
  426. { 'z := % expects string on top of the stack, pops the string and assigns it to variable z
  427. "" % push empty string
  428. { z empty$ not } % returns 0 if variable z is empty
  429. { z #1 #1 substring$ % push the first character of variable z
  430. z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z
  431. duplicate$ "\" = % pushes 1 if the last character is "\", otherwise 0
  432. { * % concatenates the last 2 literals
  433. z #1 #1 substring$ % push the first character of variable z
  434. z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z
  435. * % concatenates the last 2 literals, i.e. every character, even a dot, following a "\" will be printed
  436. }
  437. { duplicate$ "." = % pushes 1 if the last character is ".", otherwise 0
  438. 'pop$ % pushes the pop$ function
  439. { * } % concatenates the last 2 literals
  440. if$ % pops the last character if it is a dot, otherwise concatenates it with the string on top of the stack
  441. }
  442. if$
  443. }
  444. while$
  445. }
  446.  
  447. INTEGERS {l}
  448. FUNCTION{string.length}
  449. {
  450. #1 'l :=
  451. { duplicate$ duplicate$ #1 l substring$ = not }
  452. { l #1 + 'l := }
  453. while$
  454. pop$ l
  455. }
  456.  
  457. STRINGS {replace find text}
  458. INTEGERS {find_length}
  459. FUNCTION {find.replace}
  460. {
  461. 'replace :=
  462. 'find :=
  463. 'text :=
  464. find string.length 'find_length :=
  465. ""
  466. { text empty$ not }
  467. { text #1 find_length substring$ find =
  468. {
  469. replace *
  470. text #1 find_length + global.max$ substring$ 'text :=
  471. }
  472. { text #1 #1 substring$ *
  473. text #2 global.max$ substring$ 'text :=
  474. }
  475. if$
  476. }
  477. while$
  478. }
  479.  
  480. FUNCTION {new.block.checka}
  481. { empty$
  482. 'skip$
  483. 'new.block
  484. if$
  485. }
  486.  
  487. FUNCTION {new.block.checkb}
  488. { empty$
  489. swap$ empty$
  490. and
  491. 'skip$
  492. 'new.block
  493. if$
  494. }
  495.  
  496. FUNCTION {new.sentence.checka}
  497. { empty$
  498. 'skip$
  499. 'new.sentence
  500. if$
  501. }
  502.  
  503. FUNCTION {new.sentence.checkb}
  504. { empty$
  505. swap$ empty$
  506. and
  507. 'skip$
  508. 'new.sentence
  509. if$
  510. }
  511.  
  512. FUNCTION {field.or.null}
  513. { duplicate$ empty$
  514. { pop$ "" }
  515. 'skip$
  516. if$
  517. }
  518.  
  519. FUNCTION {emphasize}
  520. { skip$ }
  521.  
  522. FUNCTION {tie.or.space.prefix}
  523. { duplicate$ text.length$ #3 <
  524. { "~" }
  525. { " " }
  526. if$
  527. swap$
  528. }
  529.  
  530. FUNCTION {capitalize}
  531. { "u" change.case$ "t" change.case$ }
  532.  
  533. FUNCTION {space.word}
  534. { " " swap$ * " " * }
  535.  
  536. % Here are the language-specific definitions for explicit words.
  537. % Each function has a name bbl.xxx where xxx is the English word.
  538. % The language selected here is ENGLISH
  539.  
  540. FUNCTION {bbl.and}
  541. { "and"}
  542.  
  543. FUNCTION {bbl.etal}
  544. { "et~al." }
  545.  
  546. FUNCTION {bbl.editors}
  547. { "editors" }
  548.  
  549. FUNCTION {bbl.editor}
  550. { "editor" }
  551.  
  552. FUNCTION {bbl.cartographers}
  553. { "cartographers" }
  554.  
  555. FUNCTION {bbl.cartographer}
  556. { "cartographer" }
  557.  
  558. FUNCTION {bbl.inventors}
  559. { "inventors" }
  560.  
  561. FUNCTION {bbl.inventor}
  562. { "inventor" }
  563.  
  564. FUNCTION {bbl.assignees}
  565. { "assignees" }
  566.  
  567. FUNCTION {bbl.assignee}
  568. { "assignee" }
  569.  
  570. FUNCTION {bbl.edby}
  571. { "edited by" }
  572.  
  573. FUNCTION {bbl.edition}
  574. { "ed." }
  575.  
  576. FUNCTION {bbl.volume}
  577. { "vol." }
  578.  
  579. FUNCTION {bbl.of}
  580. { "of" }
  581.  
  582. FUNCTION {bbl.number}
  583. { "no." }
  584.  
  585. FUNCTION {bbl.nr}
  586. { "no." }
  587.  
  588. FUNCTION {bbl.in}
  589. { "in" }
  590.  
  591. FUNCTION {bbl.pages}
  592. { "p." }
  593.  
  594. FUNCTION {bbl.page}
  595. { "p." }
  596.  
  597. FUNCTION {bbl.chapter}
  598. { "chap." }
  599.  
  600. FUNCTION {bbl.techrep}
  601. { "Tech. Rep." }
  602.  
  603. FUNCTION {bbl.mthesis}
  604. { "Master's thesis" }
  605.  
  606. FUNCTION {bbl.phdthesis}
  607. { "Ph.D. thesis" }
  608.  
  609. FUNCTION {bbl.first}
  610. { "1st" }
  611.  
  612. FUNCTION {bbl.second}
  613. { "2nd" }
  614.  
  615. FUNCTION {bbl.third}
  616. { "3rd" }
  617.  
  618. FUNCTION {bbl.fourth}
  619. { "4th" }
  620.  
  621. FUNCTION {bbl.fifth}
  622. { "5th" }
  623.  
  624. FUNCTION {bbl.st}
  625. { "st" }
  626.  
  627. FUNCTION {bbl.nd}
  628. { "nd" }
  629.  
  630. FUNCTION {bbl.rd}
  631. { "rd" }
  632.  
  633. FUNCTION {bbl.th}
  634. { "th" }
  635.  
  636. MACRO {jan} {"Jan."}
  637.  
  638. MACRO {feb} {"Feb."}
  639.  
  640. MACRO {mar} {"Mar."}
  641.  
  642. MACRO {apr} {"Apr."}
  643.  
  644. MACRO {may} {"May"}
  645.  
  646. MACRO {jun} {"Jun."}
  647.  
  648. MACRO {jul} {"Jul."}
  649.  
  650. MACRO {aug} {"Aug."}
  651.  
  652. MACRO {sep} {"Sep."}
  653.  
  654. MACRO {oct} {"Oct."}
  655.  
  656. MACRO {nov} {"Nov."}
  657.  
  658. MACRO {dec} {"Dec."}
  659.  
  660. FUNCTION {eng.ord}
  661. { duplicate$ "1" swap$ *
  662. #-2 #1 substring$ "1" =
  663. { bbl.th * }
  664. { duplicate$ #-1 #1 substring$
  665. duplicate$ "1" =
  666. { pop$ bbl.st * }
  667. { duplicate$ "2" =
  668. { pop$ bbl.nd * }
  669. { "3" =
  670. { bbl.rd * }
  671. { bbl.th * }
  672. if$
  673. }
  674. if$
  675. }
  676. if$
  677. }
  678. if$
  679. }
  680.  
  681. FUNCTION {bibinfo.check}
  682. { swap$
  683. duplicate$ missing$
  684. {
  685. pop$ pop$
  686. ""
  687. }
  688. { duplicate$ empty$
  689. {
  690. swap$ pop$
  691. }
  692. { swap$
  693. pop$
  694. }
  695. if$
  696. }
  697. if$
  698. }
  699.  
  700. FUNCTION {bibinfo.warn}
  701. { swap$
  702. duplicate$ missing$
  703. {
  704. swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
  705. ""
  706. }
  707. { duplicate$ empty$
  708. {
  709. swap$ "empty " swap$ * " in " * cite$ * warning$
  710. }
  711. { swap$
  712. pop$
  713. }
  714. if$
  715. }
  716. if$
  717. }
  718.  
  719. STRINGS { bibinfo}
  720. INTEGERS { nameptr namesleft numnames }
  721.  
  722. FUNCTION {format.names}
  723. { 'bibinfo :=
  724. duplicate$ empty$ 'skip$ {
  725. "." ". " find.replace 's :=
  726. "" 't :=
  727. #1 'nameptr :=
  728. s num.names$ 'numnames :=
  729. numnames 'namesleft :=
  730. { namesleft #0 > }
  731. { s nameptr
  732. "{vv~}{ll}{ f{}}{ jj}"
  733. format.name$
  734. % remove.dots commented by JB
  735. bibinfo bibinfo.check
  736. 't :=
  737. nameptr #1 >
  738. {
  739. nameptr #6
  740. #1 + =
  741. numnames #6
  742. > and
  743. { "others" 't :=
  744. #1 'namesleft := }
  745. 'skip$
  746. if$
  747. namesleft #1 >
  748. { ", " * t * }
  749. {
  750. "," *
  751. s nameptr "{ll}" format.name$ duplicate$ "others" =
  752. { 't := }
  753. { pop$ }
  754. if$
  755. t "others" =
  756. {
  757. " " * bbl.etal *
  758. }
  759. { " " * t * }
  760. if$
  761. }
  762. if$
  763. }
  764. 't
  765. if$
  766. nameptr #1 + 'nameptr :=
  767. namesleft #1 - 'namesleft :=
  768. }
  769. while$
  770. } if$
  771. }
  772.  
  773. FUNCTION {format.names.org}
  774. { 'bibinfo :=
  775. duplicate$ empty$ 'skip$ {
  776. 's :=
  777. "" 't :=
  778. #1 'nameptr :=
  779. s num.names$ 'numnames :=
  780. numnames 'namesleft :=
  781. { namesleft #0 > }
  782. { s nameptr
  783. "{ff~}{vv~}{ll}"
  784. format.name$
  785. bibinfo bibinfo.check
  786. 't :=
  787. nameptr #1 >
  788. {
  789. namesleft #1 >
  790. { "; " * t * }
  791. {
  792. ";" *
  793. s nameptr "{ll}" format.name$ duplicate$ "others" =
  794. { 't := }
  795. { pop$ }
  796. if$
  797. t "others" =
  798. {
  799. " " * bbl.etal *
  800. }
  801. { " " * t * }
  802. if$
  803. }
  804. if$
  805. }
  806. 't
  807. if$
  808. nameptr #1 + 'nameptr :=
  809. namesleft #1 - 'namesleft :=
  810. }
  811. while$
  812. } if$
  813. }
  814.  
  815. FUNCTION {format.names.ed}
  816. {
  817. format.names
  818. }
  819.  
  820. FUNCTION {format.authors}
  821. {
  822. author "author" format.names
  823. %%"." " " "author" find.replace format.names
  824. }
  825.  
  826. FUNCTION {format.organizations}
  827. { organization "organization" format.names.org
  828. }
  829.  
  830. FUNCTION {get.bbl.editor}
  831. { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
  832.  
  833. FUNCTION {get.bbl.cartographer}
  834. { cartographer num.names$ #1 > 'bbl.cartographers 'bbl.cartographer if$ }
  835.  
  836. FUNCTION {get.bbl.inventor}
  837. { inventor num.names$ #1 > 'bbl.inventors 'bbl.inventor if$ }
  838.  
  839. FUNCTION {get.bbl.assignee}
  840. { assignee num.names$ #1 > 'bbl.assignees 'bbl.assignee if$ }
  841.  
  842. FUNCTION {format.editors}
  843. { editor "editor" format.names duplicate$ empty$ 'skip$
  844. {
  845. "," *
  846. " " *
  847. get.bbl.editor
  848. *
  849. }
  850. if$
  851. }
  852.  
  853. FUNCTION {format.assignees}
  854. { assignee "assignee" format.names.org duplicate$ empty$ 'skip$
  855. {
  856. "," *
  857. " " *
  858. get.bbl.assignee
  859. *
  860. }
  861. if$
  862. }
  863.  
  864. FUNCTION {format.cartographers}
  865. { cartographer "cartographer" format.names duplicate$ empty$ 'skip$
  866. {
  867. "," *
  868. " " *
  869. get.bbl.cartographer
  870. *
  871. }
  872. if$
  873. }
  874.  
  875. FUNCTION {format.inventors}
  876. { inventor "inventor" format.names duplicate$ empty$ 'skip$
  877. {
  878. "," *
  879. " " *
  880. get.bbl.inventor
  881. *
  882. }
  883. if$
  884. }
  885.  
  886. FUNCTION {format.note}
  887. {
  888. note empty$
  889. { "" }
  890. { note #1 #1 substring$
  891. duplicate$ "{" =
  892. 'skip$
  893. { output.state mid.sentence =
  894. { "l" }
  895. { "u" }
  896. if$
  897. change.case$
  898. }
  899. if$
  900. note #2 global.max$ substring$ * "note" bibinfo.check
  901. }
  902. if$
  903. }
  904.  
  905. FUNCTION {format.title}
  906. { title
  907. %%duplicate$ empty$ 'skip$
  908. %% { "t" change.case$ }
  909. %%if$
  910. "title" bibinfo.check
  911. }
  912.  
  913. FUNCTION {format.type}
  914. { type empty$
  915. 'skip$
  916. { inbrackets type }
  917. %%{ add.blank "[" type * "]" * }
  918. if$
  919. }
  920.  
  921. FUNCTION {output.bibitem}
  922. { outside.brackets 'bracket.state := % urlbst
  923. newline$
  924. "\bibitem{" write$
  925. cite$ write$
  926. "}" write$
  927. newline$
  928. ""
  929. before.all 'output.state :=
  930. }
  931.  
  932. FUNCTION {n.dashify}
  933. {
  934. 't :=
  935. ""
  936. { t empty$ not }
  937. { t #1 #1 substring$ "-" =
  938. { t #1 #2 substring$ "--" = not
  939. { "--" *
  940. t #2 global.max$ substring$ 't :=
  941. }
  942. { { t #1 #1 substring$ "-" = }
  943. { "-" *
  944. t #2 global.max$ substring$ 't :=
  945. }
  946. while$
  947. }
  948. if$
  949. }
  950. { t #1 #1 substring$ *
  951. t #2 global.max$ substring$ 't :=
  952. }
  953. if$
  954. }
  955. while$
  956. }
  957.  
  958. FUNCTION {word.in}
  959. { bbl.in capitalize
  960. ":" *
  961. " " * }
  962.  
  963. FUNCTION {format.journal.date}
  964. {
  965. month "month" bibinfo.check
  966. duplicate$ empty$
  967. year "year" bibinfo.check duplicate$ empty$
  968. {
  969. swap$ 'skip$
  970. { "there's a month but no year in " cite$ * warning$ }
  971. if$
  972. *
  973. }
  974. { swap$ 'skip$
  975. {
  976. " " * swap$
  977. }
  978. if$
  979. *
  980. remove.dots
  981. }
  982. if$
  983. duplicate$ empty$
  984. 'skip$
  985. {
  986. before.all 'output.state :=
  987. after.sentence 'output.state :=
  988. }
  989. if$
  990. }
  991.  
  992. FUNCTION {format.date}
  993. {
  994. no.blank.or.punct
  995. %% ";" changed by JB
  996. "."
  997. duplicate$ empty$
  998. year "year" bibinfo.check duplicate$ empty$
  999. { swap$ 'skip$
  1000. { "there's a month but no year in " cite$ * warning$ }
  1001. if$
  1002. *
  1003. }
  1004. { swap$ 'skip$
  1005. {
  1006. swap$
  1007. " " * swap$
  1008. }
  1009. if$
  1010. *
  1011. }
  1012. if$
  1013. }
  1014.  
  1015. FUNCTION {format.btitle}
  1016. { title "title" bibinfo.check
  1017. duplicate$ empty$ 'skip$
  1018. {
  1019. }
  1020. if$
  1021. }
  1022.  
  1023. FUNCTION {either.or.check}
  1024. { empty$
  1025. 'pop$
  1026. { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  1027. if$
  1028. }
  1029.  
  1030. FUNCTION {format.bvolume}
  1031. { volume empty$
  1032. { "" }
  1033. { bbl.volume volume tie.or.space.prefix
  1034. "volume" bibinfo.check * *
  1035. series "series" bibinfo.check
  1036. duplicate$ empty$ 'pop$
  1037. { swap$ bbl.of space.word * swap$
  1038. emphasize * }
  1039. if$
  1040. "volume and number" number either.or.check
  1041. }
  1042. if$
  1043. }
  1044.  
  1045. FUNCTION {format.number.series}
  1046. { volume empty$
  1047. { number empty$
  1048. { series field.or.null }
  1049. { series empty$
  1050. { number "number" bibinfo.check }
  1051. { output.state mid.sentence =
  1052. { bbl.number }
  1053. { bbl.number capitalize }
  1054. if$
  1055. number tie.or.space.prefix "number" bibinfo.check * *
  1056. bbl.in space.word *
  1057. series "series" bibinfo.check *
  1058. }
  1059. if$
  1060. }
  1061. if$
  1062. }
  1063. { "" }
  1064. if$
  1065. }
  1066.  
  1067. FUNCTION {is.num}
  1068. { chr.to.int$
  1069. duplicate$ "0" chr.to.int$ < not
  1070. swap$ "9" chr.to.int$ > not and
  1071. }
  1072.  
  1073. FUNCTION {extract.num}
  1074. { duplicate$ 't :=
  1075. "" 's :=
  1076. { t empty$ not }
  1077. { t #1 #1 substring$
  1078. t #2 global.max$ substring$ 't :=
  1079. duplicate$ is.num
  1080. { s swap$ * 's := }
  1081. { pop$ "" 't := }
  1082. if$
  1083. }
  1084. while$
  1085. s empty$
  1086. 'skip$
  1087. { pop$ s }
  1088. if$
  1089. }
  1090.  
  1091. FUNCTION {convert.edition}
  1092. { extract.num "l" change.case$ 's :=
  1093. s "first" = s "1" = or
  1094. { bbl.first 't := }
  1095. { s "second" = s "2" = or
  1096. { bbl.second 't := }
  1097. { s "third" = s "3" = or
  1098. { bbl.third 't := }
  1099. { s "fourth" = s "4" = or
  1100. { bbl.fourth 't := }
  1101. { s "fifth" = s "5" = or
  1102. { bbl.fifth 't := }
  1103. { s #1 #1 substring$ is.num
  1104. { s eng.ord 't := }
  1105. { edition 't := }
  1106. if$
  1107. }
  1108. if$
  1109. }
  1110. if$
  1111. }
  1112. if$
  1113. }
  1114. if$
  1115. }
  1116. if$
  1117. t
  1118. }
  1119.  
  1120. FUNCTION {format.edition}
  1121. { edition duplicate$ empty$ 'skip$
  1122. {
  1123. convert.edition
  1124. output.state mid.sentence =
  1125. { "l" }
  1126. { "t" }
  1127. if$ change.case$
  1128. "edition" bibinfo.check
  1129. " " * bbl.edition *
  1130. }
  1131. if$
  1132. }
  1133. INTEGERS { multiresult }
  1134. FUNCTION {multi.page.check}
  1135. { 't :=
  1136. #0 'multiresult :=
  1137. { multiresult not
  1138. t empty$ not
  1139. and
  1140. }
  1141. { t #1 #1 substring$
  1142. duplicate$ "-" =
  1143. swap$ duplicate$ "," =
  1144. swap$ "+" =
  1145. or or
  1146. { #1 'multiresult := }
  1147. { t #2 global.max$ substring$ 't := }
  1148. if$
  1149. }
  1150. while$
  1151. multiresult
  1152. }
  1153.  
  1154. FUNCTION {format.pages}
  1155. { pages duplicate$ empty$ 'skip$
  1156. { duplicate$ multi.page.check
  1157. {
  1158. bbl.pages swap$
  1159. n.dashify
  1160. }
  1161. {
  1162. bbl.page swap$
  1163. }
  1164. if$
  1165. tie.or.space.prefix
  1166. "pages" bibinfo.check
  1167. * *
  1168. }
  1169. if$
  1170. }
  1171.  
  1172. FUNCTION {format.journal.pages}
  1173. { pages duplicate$ empty$ 'pop$
  1174. { swap$ duplicate$ empty$
  1175. { pop$ pop$ format.pages }
  1176. {
  1177. ":" *
  1178. swap$
  1179. n.dashify
  1180. "pages" bibinfo.check
  1181. *
  1182. }
  1183. if$
  1184. }
  1185. if$
  1186. }
  1187.  
  1188. FUNCTION {format.vol.num}
  1189. { volume field.or.null
  1190. duplicate$ empty$ 'skip$
  1191. {
  1192. "volume" bibinfo.check
  1193. }
  1194. if$
  1195. number "number" bibinfo.check duplicate$ empty$ 'skip$
  1196. {
  1197. swap$ duplicate$ empty$
  1198. { "there's a number but no volume in " cite$ * warning$ }
  1199. 'skip$
  1200. if$
  1201. swap$
  1202. "(" swap$ * ")" *
  1203. }
  1204. if$ *
  1205. }
  1206.  
  1207. FUNCTION {format.vol.num.pages}
  1208. { volume field.or.null
  1209. duplicate$ empty$ 'skip$
  1210. {
  1211. "volume" bibinfo.check
  1212. }
  1213. if$
  1214. number "number" bibinfo.check duplicate$ empty$ 'skip$
  1215. {
  1216. swap$ duplicate$ empty$
  1217. { "there's a number but no volume in " cite$ * warning$ }
  1218. 'skip$
  1219. if$
  1220. swap$
  1221. "(" swap$ * ")" *
  1222. }
  1223. if$ *
  1224. format.journal.pages
  1225. }
  1226.  
  1227. FUNCTION {format.chapter.pages}
  1228. { chapter empty$
  1229. 'format.pages
  1230. { type empty$
  1231. { bbl.chapter }
  1232. { type "l" change.case$
  1233. "type" bibinfo.check
  1234. }
  1235. if$
  1236. chapter tie.or.space.prefix
  1237. "chapter" bibinfo.check
  1238. * *
  1239. pages empty$
  1240. 'skip$
  1241. { ", " * format.pages * }
  1242. if$
  1243. }
  1244. if$
  1245. }
  1246.  
  1247. FUNCTION {format.booktitle}
  1248. {
  1249. booktitle "booktitle" bibinfo.check
  1250. }
  1251.  
  1252. FUNCTION {format.in.ed.booktitle}
  1253. { format.booktitle duplicate$ empty$ 'skip$
  1254. {
  1255. editor "editor" format.names.ed duplicate$ empty$ 'pop$
  1256. {
  1257. "," *
  1258. " " *
  1259. get.bbl.editor
  1260. ". " *
  1261. * swap$
  1262. * }
  1263. if$
  1264. word.in swap$ *
  1265. }
  1266. if$
  1267. }
  1268.  
  1269. FUNCTION {format.in.ed.title}
  1270. { format.title duplicate$ empty$ 'skip$
  1271. {
  1272. editor "editor" format.names.ed duplicate$ empty$ 'pop$
  1273. {
  1274. "," *
  1275. " " *
  1276. get.bbl.editor
  1277. ". " *
  1278. * swap$
  1279. * }
  1280. if$
  1281. word.in swap$ *
  1282. }
  1283. if$
  1284. }
  1285.  
  1286. FUNCTION {empty.misc.check}
  1287. { author empty$ title empty$ howpublished empty$
  1288. month empty$ year empty$ note empty$
  1289. and and and and and
  1290. { "all relevant fields are empty in " cite$ * warning$ }
  1291. 'skip$
  1292. if$
  1293. }
  1294. FUNCTION {format.thesis.type}
  1295. { type duplicate$ empty$
  1296. 'pop$
  1297. { swap$ pop$
  1298. "t" change.case$ "type" bibinfo.check
  1299. }
  1300. if$
  1301. }
  1302. FUNCTION {format.tr.number}
  1303. {
  1304. number "number" bibinfo.check
  1305. %%type duplicate$ empty$
  1306. %%{ pop$ bbl.techrep }
  1307. %%'skip$
  1308. %%if$
  1309. %%"type" bibinfo.check
  1310. %%swap$ duplicate$ empty$
  1311. %%{ pop$ "t" change.case$ }
  1312. %%{ tie.or.space.prefix * * }
  1313. %%if$
  1314. }
  1315.  
  1316. FUNCTION {format.org.or.pub}
  1317. { 't :=
  1318. ""
  1319. address empty$ t empty$ and
  1320. 'skip$
  1321. {
  1322. address "address" bibinfo.check *
  1323. t empty$
  1324. 'skip$
  1325. { address empty$
  1326. 'skip$
  1327. { ": " * }
  1328. if$
  1329. t *
  1330. }
  1331. if$
  1332. }
  1333. if$
  1334. }
  1335.  
  1336. FUNCTION {format.publisher.address}
  1337. { publisher "publisher" bibinfo.warn format.org.or.pub
  1338. }
  1339.  
  1340. FUNCTION {format.organization.address}
  1341. { organization "organization" bibinfo.check format.org.or.pub
  1342. }
  1343.  
  1344. FUNCTION {format.institution.address}
  1345. { institution "institution" bibinfo.check format.org.or.pub
  1346. }
  1347.  
  1348.  
  1349. % urlbst...
  1350. % Functions for making hypertext links.
  1351. % In all cases, the stack has (link-text href-url)
  1352. %
  1353. % make 'null' specials
  1354. FUNCTION {make.href.null}
  1355. {
  1356. pop$
  1357. }
  1358. % make hypertex specials
  1359. FUNCTION {make.href.hypertex}
  1360. {
  1361. "\special {html:<a href=" quote$ *
  1362. swap$ * quote$ * "> }" * swap$ *
  1363. "\special {html:</a>}" *
  1364. }
  1365. % make hyperref specials
  1366. FUNCTION {make.href.hyperref}
  1367. {
  1368. "\href {" swap$ * "} {" * swap$ * "}" *
  1369. }
  1370. FUNCTION {make.href}
  1371. { hrefform #2 =
  1372. 'make.href.hyperref % hrefform = 2
  1373. { hrefform #1 =
  1374. 'make.href.hypertex % hrefform = 1
  1375. 'make.href.null % hrefform = 0 (or anything else)
  1376. if$
  1377. }
  1378. if$
  1379. }
  1380.  
  1381. FUNCTION {format.url}
  1382. { url empty$
  1383. { "" }
  1384. { hrefform #1 =
  1385. { % special case -- add HyperTeX specials
  1386. urlintro "\url{" url * "}" * url make.href.hypertex * }
  1387. { urlintro "\url{" * url * "}" * }
  1388. if$
  1389. }
  1390. if$
  1391. }
  1392.  
  1393. FUNCTION {format.eprint}
  1394. { eprint empty$
  1395. { "" }
  1396. { eprintprefix eprint * eprinturl eprint * make.href }
  1397. if$
  1398. }
  1399.  
  1400. FUNCTION {format.doi}
  1401. { doi empty$
  1402. { "" }
  1403. { doiprefix doi * doiurl doi * make.href }
  1404. if$
  1405. }
  1406.  
  1407. % Output a URL. We can't use the more normal idiom (something like
  1408. % `format.url output'), because the `inbrackets' within
  1409. % format.lastchecked applies to everything between calls to `output',
  1410. % so that `format.url format.lastchecked * output' ends up with both
  1411. % the URL and the lastchecked in brackets.
  1412. FUNCTION {output.url}
  1413. { url empty$
  1414. 'skip$
  1415. { new.block
  1416. format.url output
  1417. format.lastchecked output
  1418. }
  1419. if$
  1420. }
  1421.  
  1422. FUNCTION {output.web.refs}
  1423. {
  1424. new.block
  1425. output.url
  1426. addeprints eprint empty$ not and
  1427. { format.eprint output.nonnull }
  1428. 'skip$
  1429. if$
  1430. adddoiresolver doi empty$ not and
  1431. { format.doi output.nonnull }
  1432. 'skip$
  1433. if$
  1434. % addeprints
  1435. % { eprint empty$
  1436. % 'skip$
  1437. % { format.eprint output.nonnull }
  1438. % if$
  1439. % }
  1440. % 'skip$
  1441. % if$
  1442. }
  1443.  
  1444. % Webpage entry type.
  1445. % Title and url fields required;
  1446. % author, note, year, month, and lastchecked fields optional
  1447. STRINGS {database}
  1448. FUNCTION {webpage}
  1449. { output.bibitem
  1450. author empty$
  1451. { editor empty$
  1452. 'skip$ % author and editor both optional
  1453. { format.editors output.nonnull }
  1454. if$
  1455. }
  1456. { editor empty$
  1457. { format.authors output.nonnull }
  1458. { "can't use both author and editor fields in " cite$ * warning$ }
  1459. if$
  1460. }
  1461. if$
  1462. % author empty$
  1463. % 'skip$
  1464. % { format.authors output.nonnull }
  1465. % if$
  1466. new.block
  1467. format.title "title" output.check
  1468. journal empty$
  1469. {
  1470. format.type "type" output.check
  1471. publisher empty$
  1472. 'skip$
  1473. { format.publisher.address output }
  1474. if$
  1475. "database on the Internet" 'database :=
  1476. type database =
  1477. { format.journal.date "year" output.check }
  1478. { format.date "year" output.check }
  1479. if$
  1480. lastchecked empty$
  1481. 'skip$
  1482. { format.lastchecked output }
  1483. if$
  1484. new.block
  1485. part empty$
  1486. 'skip$
  1487. { part output }
  1488. if$
  1489. pages empty$
  1490. 'skip$
  1491. { pages bracket.check output }
  1492. if$
  1493. }
  1494. { journal
  1495. remove.dots
  1496. "journal" bibinfo.check
  1497. "journal" output.check
  1498. format.type "type" output.check
  1499. format.journal.date "year" output.check
  1500. lastchecked empty$
  1501. 'skip$
  1502. { format.lastchecked output
  1503. ";" no.blank.or.punct output
  1504. }
  1505. if$
  1506. no.blank.or.punct format.vol.num output
  1507. pages empty$
  1508. 'skip$
  1509. { ":" no.blank.or.punct output
  1510. no.blank.or.punct pages bracket.check output
  1511. }
  1512. if$
  1513. new.block
  1514. }
  1515. if$
  1516. format.url "url" output.check
  1517. new.block
  1518. note output
  1519. fin.entry
  1520. }
  1521. % ...urlbst to here
  1522.  
  1523. FUNCTION {misc}
  1524. { output.bibitem
  1525. format.authors "author" output.check
  1526. format.editors "author and editor" output.check
  1527. format.title "title" output.check % commented out by JB
  1528. type missing$
  1529. { skip$ }
  1530. { format.type "type" output.check }
  1531. %%{ inbrackets type output }
  1532. if$
  1533. format.publisher.address output
  1534. format.date "year" output.check
  1535. new.block
  1536. format.note output
  1537. new.block
  1538. howpublished new.block.checka
  1539. howpublished "howpublished" bibinfo.check output
  1540. output.web.refs % urlbst
  1541. fin.entry
  1542. empty.misc.check
  1543. }
  1544.  
  1545. FUNCTION {article}
  1546. { output.bibitem
  1547. format.authors "author" output.check
  1548. organization empty$
  1549. 'skip$
  1550. { author empty$
  1551. {
  1552. format.organizations "organization" output.check
  1553. }
  1554. {
  1555. "; " *
  1556. no.blank.or.punct
  1557. format.organizations "organization" output.check
  1558. }
  1559. if$
  1560. }
  1561. if$
  1562. new.block
  1563. format.title "title" output.check
  1564. type missing$
  1565. { skip$ }
  1566. { format.type "type" output.check }
  1567. if$
  1568. new.block
  1569. journal
  1570. remove.dots
  1571. "journal" bibinfo.check
  1572. "journal" output.check
  1573. format.journal.date "year" output.check
  1574. add.semicolon
  1575. format.vol.num.pages output
  1576. new.block
  1577. format.note output
  1578. output.web.refs % urlbst
  1579. fin.entry
  1580. }
  1581.  
  1582. FUNCTION {book}
  1583. { output.bibitem
  1584. author empty$
  1585. { editor empty$
  1586. { format.organizations "organization" output.check }
  1587. { format.editors "author and editor" output.check }
  1588. if$
  1589. }
  1590. { format.authors output.nonnull
  1591. "author and editor" editor either.or.check
  1592. }
  1593. if$
  1594. new.block
  1595. format.btitle "title" output.check
  1596. format.bvolume output
  1597. new.block
  1598. format.edition output
  1599. new.sentence
  1600. author empty$ not
  1601. editor empty$ not
  1602. and
  1603. { format.editors "author and editor" output.check }
  1604. 'skip$
  1605. if$
  1606. format.number.series output
  1607. format.publisher.address output
  1608. format.date "year" output.check
  1609. new.block
  1610. format.note output
  1611. output.web.refs % urlbst
  1612. fin.entry
  1613. }
  1614.  
  1615. FUNCTION {booklet}
  1616. { misc }
  1617.  
  1618. FUNCTION {dictionary}
  1619. { output.bibitem
  1620. format.booktitle "booktitle" output.check
  1621. format.bvolume output
  1622. new.block
  1623. format.edition output
  1624. new.sentence
  1625. format.publisher.address output
  1626. format.date "year" output.check
  1627. format.btitle "title" output.check
  1628. add.semicolon
  1629. add.blank
  1630. format.pages "pages" output.check
  1631. new.block
  1632. format.note output
  1633. output.web.refs % urlbst
  1634. fin.entry
  1635. }
  1636.  
  1637. FUNCTION {inbook}
  1638. { output.bibitem
  1639. format.authors "author" output.check
  1640. new.block
  1641. chapter "chapter" output.check
  1642. new.block
  1643. format.in.ed.title "title" output.check
  1644. format.bvolume output
  1645. format.edition output
  1646. new.sentence
  1647. format.number.series output
  1648. format.publisher.address output
  1649. format.date "year" output.check
  1650. date.block
  1651. add.blank
  1652. format.pages "pages" output.check
  1653. new.block
  1654. format.note output
  1655. output.web.refs % urlbst
  1656. fin.entry
  1657. }
  1658.  
  1659. FUNCTION {incollection}
  1660. { output.bibitem
  1661. format.authors "author" output.check
  1662. new.block
  1663. format.title "title" output.check
  1664. new.block
  1665. format.in.ed.booktitle "booktitle" output.check
  1666. format.bvolume output
  1667. format.edition output
  1668. new.sentence
  1669. format.number.series output
  1670. format.publisher.address output
  1671. format.date "year" output.check
  1672. date.block
  1673. add.blank
  1674. format.pages "pages" output.check
  1675. new.block
  1676. format.note output
  1677. output.web.refs % urlbst
  1678. fin.entry
  1679. }
  1680.  
  1681. FUNCTION {inproceedings}
  1682. { output.bibitem
  1683. format.authors "author" output.check
  1684. new.block
  1685. format.title "title" output.check
  1686. new.block
  1687. format.in.ed.booktitle "booktitle" output.check
  1688. format.bvolume output
  1689. new.sentence
  1690. format.number.series output
  1691. publisher empty$
  1692. { format.organization.address output }
  1693. { organization "organization" bibinfo.check output
  1694. format.publisher.address output
  1695. }
  1696. if$
  1697. format.date "year" output.check
  1698. date.block
  1699. add.blank
  1700. format.pages "pages" output.check
  1701. new.block
  1702. format.note output
  1703. output.web.refs % urlbst
  1704. fin.entry
  1705. }
  1706.  
  1707. FUNCTION {conference}
  1708. {inproceedings}
  1709.  
  1710. FUNCTION {manual}
  1711. {misc}
  1712.  
  1713. FUNCTION {phdthesis}
  1714. { output.bibitem
  1715. format.authors "author" output.check
  1716. new.block
  1717. format.btitle
  1718. "title" output.check
  1719. format.type "type" output.check
  1720. new.block
  1721. school "school" bibinfo.warn output
  1722. address "address" bibinfo.check output
  1723. format.date "year" output.check
  1724. new.block
  1725. format.note output
  1726. output.web.refs % urlbst
  1727. fin.entry
  1728. }
  1729.  
  1730. FUNCTION {mastersthesis}
  1731. {phdthesis}
  1732.  
  1733. FUNCTION {proceedings}
  1734. { output.bibitem
  1735. editor empty$
  1736. { organization "organization" bibinfo.check output
  1737. }
  1738. { format.editors output.nonnull }
  1739. if$
  1740. new.block
  1741. format.btitle "title" output.check
  1742. format.bvolume output
  1743. editor empty$
  1744. { publisher empty$
  1745. 'skip$
  1746. {
  1747. new.sentence
  1748. format.number.series output
  1749. format.publisher.address output
  1750. }
  1751. if$
  1752. }
  1753. { publisher empty$
  1754. {
  1755. new.sentence
  1756. format.organization.address output }
  1757. {
  1758. new.sentence
  1759. organization "organization" bibinfo.check output
  1760. format.publisher.address output
  1761. }
  1762. if$
  1763. }
  1764. if$
  1765. format.date "year" output.check
  1766. new.block
  1767. format.note output
  1768. output.web.refs % urlbst
  1769. fin.entry
  1770. }
  1771.  
  1772. FUNCTION {techreport}
  1773. { output.bibitem
  1774. format.authors "author" output.check
  1775. new.block
  1776. format.title
  1777. "title" output.check
  1778. new.block
  1779. format.institution.address output
  1780. format.date "year" output.check
  1781. format.tr.number output.nonnull
  1782. new.block
  1783. format.note output
  1784. output.web.refs % urlbst
  1785. fin.entry
  1786. }
  1787.  
  1788. FUNCTION {map}
  1789. { output.bibitem
  1790. format.cartographers "cartographer" output.check
  1791. new.block
  1792. format.title
  1793. "title" output.check
  1794. format.type "type" output.check
  1795. new.block
  1796. format.publisher.address output
  1797. format.date "year" output.check
  1798. new.block
  1799. format.note output
  1800. output.web.refs % urlbst
  1801. fin.entry
  1802. }
  1803.  
  1804. FUNCTION {patent}
  1805. { output.bibitem
  1806. format.inventors "inventor" output.check
  1807. "; " *
  1808. no.blank.or.punct
  1809. format.assignees "assignee" output.check
  1810. new.block
  1811. format.title
  1812. "title" output.check
  1813. new.block
  1814. format.tr.number output.nonnull
  1815. format.date "year" output.check
  1816. new.block
  1817. format.note output
  1818. output.web.refs % urlbst
  1819. fin.entry
  1820. }
  1821.  
  1822. FUNCTION {unpublished}
  1823. { output.bibitem
  1824. format.authors "author" output.check
  1825. new.block
  1826. format.title "title" output.check
  1827. format.date output
  1828. new.block
  1829. format.note "note" output.check
  1830. output.web.refs % urlbst
  1831. fin.entry
  1832. }
  1833.  
  1834. FUNCTION {default.type} { misc }
  1835. READ
  1836. STRINGS { longest.label }
  1837. INTEGERS { number.label longest.label.width }
  1838. FUNCTION {initialize.longest.label}
  1839. { "" 'longest.label :=
  1840. #1 'number.label :=
  1841. #0 'longest.label.width :=
  1842. }
  1843. FUNCTION {longest.label.pass}
  1844. { number.label int.to.str$ 'label :=
  1845. number.label #1 + 'number.label :=
  1846. label width$ longest.label.width >
  1847. { label 'longest.label :=
  1848. label width$ 'longest.label.width :=
  1849. }
  1850. 'skip$
  1851. if$
  1852. }
  1853. EXECUTE {initialize.longest.label}
  1854. ITERATE {longest.label.pass}
  1855. FUNCTION {begin.bib}
  1856. { preamble$ empty$
  1857. 'skip$
  1858. { preamble$ write$ newline$ }
  1859. if$
  1860. "\begin{thebibliography}{" longest.label * "}" *
  1861. write$ newline$
  1862. }
  1863. EXECUTE {begin.bib}
  1864. EXECUTE {init.config.constants}
  1865. EXECUTE {init.state.consts}
  1866. ITERATE {call.type$}
  1867. FUNCTION {end.bib}
  1868. { newline$
  1869. "\end{thebibliography}" write$ newline$
  1870. }
  1871. EXECUTE {end.bib}
  1872. %% End of customized bst file
  1873. %%
  1874. %% End of file `vancouver.bst'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement