Guest User

aa.bst

a guest
Dec 26th, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.01 KB | None | 0 0
  1. %% 2001/06/10 EDP Sciences
  2. %% APJ, corrected by hand to get results for A&A, using Natbib
  3.  
  4. %% 1998/08/12 J Baker
  5. %% Tweaked by hand to get correct results for ApJ. Added functions from
  6. %% astrobib.
  7.  
  8. %% $Log: apj.bst,v $
  9. %% Revision 1.3 2000/04/20 22:17:50 jbaker
  10. %% Fixed INBOOK bug, now works essentially like BOOK.
  11. %%
  12. %% Revision 1.2 1998/08/30 22:35:45 jbaker
  13. %% Added RCS keywords.
  14. %%
  15.  
  16. %%
  17. %% This is file `apj.bst',
  18. %% generated with the docstrip utility.
  19. %%
  20. %% The original source files were:
  21. %%
  22. %% merlin.mbs (with options: `,ay,nat,nm-rev,nmdash,dt-beg,yr-per,note-yr,atit-u,jtit-x,jttl-rm,thtit-a,vnum-x,volp-com,jpg-1,pp-last,btit-rm,add-pub,pub-par,pre-edn,edby,edbyx,blk-com,fin-bare,ppx,ed,abr,ord,jabr,eprint,amper,em-x')
  23. %% ----------------------------------------
  24. %% *** Bibliographic Style for ApJ ***
  25. %%
  26. %-------------------------------------------------------------------
  27. % The original source file contains the following version information:
  28. % \ProvidesFile{merlin.mbs}[1998/02/25 3.85a (PWD)]
  29. %
  30. % NOTICE:
  31. % This file may be used for non-profit purposes.
  32. % It may not be distributed in exchange for money,
  33. % other than distribution costs.
  34. %
  35. % The author provides it `as is' and does not guarantee it in any way.
  36. %
  37. % Copyright (C) 1994-98 Patrick W. Daly
  38. %-------------------------------------------------------------------
  39. % For use with BibTeX version 0.99a or later
  40. %-------------------------------------------------------------------
  41. % This bibliography style file is intended for texts in ENGLISH
  42. % This is an author-year citation style bibliography. As such, it is
  43. % non-standard LaTeX, and requires a special package file to function properly.
  44. % Such a package is natbib.sty by Patrick W. Daly
  45. % The form of the \bibitem entries is
  46. % \bibitem[Jones et al.(1990)]{key}...
  47. % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
  48. % The essential feature is that the label (the part in brackets) consists
  49. % of the author names, as they should appear in the citation, with the year
  50. % in parentheses following. There must be no space before the opening
  51. % parenthesis!
  52. % With natbib v5.3, a full list of authors may also follow the year.
  53. % In natbib.sty, it is possible to define the type of enclosures that is
  54. % really wanted (brackets or parentheses), but in either case, there must
  55. % be parentheses in the label.
  56. % The \cite command functions as follows:
  57. % \citet{key} ==>> Jones et al. (1990)
  58. % \citet*{key} ==>> Jones, Baker, and Smith (1990)
  59. % \citep{key} ==>> (Jones et al., 1990)
  60. % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
  61. % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
  62. % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
  63. % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
  64. % \citeauthor{key} ==>> Jones et al.
  65. % \citeauthor*{key} ==>> Jones, Baker, and Smith
  66. % \citeyear{key} ==>> 1990
  67. %---------------------------------------------------------------------
  68.  
  69. ENTRY
  70. { address
  71. archiveprefix %EDP Sciences le 30/11/2014
  72. author
  73. booktitle
  74. chapter
  75. edition
  76. editor
  77. howpublished
  78. institution
  79. eprint %EDP Sciences le 30/11/2014
  80. journal
  81. key
  82. month
  83. note
  84. number
  85. organization
  86. pages
  87. publisher
  88. school
  89. series
  90. title
  91. type
  92. volume
  93. year
  94. }
  95. {}
  96. { label extra.label sort.label short.list }
  97.  
  98. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  99.  
  100. FUNCTION {init.state.consts}
  101. { #0 'before.all :=
  102. #1 'mid.sentence :=
  103. #2 'after.sentence :=
  104. #3 'after.block :=
  105. }
  106.  
  107. STRINGS { s t }
  108.  
  109. FUNCTION {output.nonnull}
  110. { 's :=
  111. output.state mid.sentence =
  112. { ", " * write$ }
  113. { output.state after.block =
  114. { add.period$ write$
  115. newline$
  116. "\newblock " write$
  117. }
  118. { output.state before.all =
  119. 'write$
  120. { add.period$ " " * write$ }
  121. if$
  122. }
  123. if$
  124. mid.sentence 'output.state :=
  125. }
  126. if$
  127. s
  128. }
  129.  
  130. %EDP Sciences le 30/11/2014
  131. FUNCTION {output.eprint}
  132. { 's :=
  133. output.state mid.sentence =
  134. { " " * write$ }
  135. { output.state after.block =
  136. { add.period$ write$
  137. newline$
  138. "\newblock " write$
  139. }
  140. { output.state before.all =
  141. 'write$
  142. { add.period$ " " * write$ }
  143. if$
  144. }
  145. if$
  146. mid.sentence 'output.state :=
  147. }
  148. if$
  149. s
  150. }
  151. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  152.  
  153. FUNCTION {output}
  154. { duplicate$ empty$
  155. 'pop$
  156. 'output.nonnull
  157. if$
  158. }
  159.  
  160. %EDP Sciences le 30/11/2014
  161. FUNCTION {outputeprint}
  162. { duplicate$ empty$
  163. 'pop$
  164. 'output.eprint
  165. if$
  166. }
  167. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  168.  
  169. FUNCTION {output.check}
  170. { 't :=
  171. duplicate$ empty$
  172. { pop$ "empty " t * " in " * cite$ * warning$ }
  173. 'output.nonnull
  174. if$
  175. }
  176.  
  177. FUNCTION {fin.entry}
  178. { duplicate$ empty$
  179. 'pop$
  180. 'write$
  181. if$
  182. newline$
  183. }
  184.  
  185. FUNCTION {new.block}
  186. { output.state before.all =
  187. 'skip$
  188. { after.block 'output.state := }
  189. if$
  190. }
  191.  
  192. FUNCTION {new.sentence}
  193. { output.state after.block =
  194. 'skip$
  195. { output.state before.all =
  196. 'skip$
  197. { after.sentence 'output.state := }
  198. if$
  199. }
  200. if$
  201. }
  202.  
  203. FUNCTION {add.blank}
  204. { " " * before.all 'output.state :=
  205. }
  206.  
  207. FUNCTION {date.block}
  208. {
  209. skip$
  210. }
  211.  
  212. FUNCTION {not}
  213. { { #0 }
  214. { #1 }
  215. if$
  216. }
  217.  
  218. FUNCTION {and}
  219. { 'skip$
  220. { pop$ #0 }
  221. if$
  222. }
  223.  
  224. FUNCTION {or}
  225. { { pop$ #1 }
  226. 'skip$
  227. if$
  228. }
  229.  
  230. FUNCTION {new.block.checkb}
  231. { empty$
  232. swap$ empty$
  233. and
  234. 'skip$
  235. 'new.block
  236. if$
  237. }
  238.  
  239. FUNCTION {field.or.null}
  240. { duplicate$ empty$
  241. { pop$ "" }
  242. 'skip$
  243. if$
  244. }
  245.  
  246. FUNCTION {emphasize}
  247. { skip$ }
  248.  
  249. FUNCTION {capitalize}
  250. { "u" change.case$ "t" change.case$ }
  251.  
  252. FUNCTION {space.word}
  253. { " " swap$ * " " * }
  254.  
  255. % Here are the language-specific definitions for explicit words.
  256. % Each function has a name bbl.xxx where xxx is the English word.
  257. % The language selected here is ENGLISH
  258. FUNCTION {bbl.and}
  259. { "and"}
  260.  
  261. FUNCTION {bbl.editors}
  262. { "eds." }
  263.  
  264. FUNCTION {bbl.editor}
  265. { "ed." }
  266.  
  267. FUNCTION {bbl.edby}
  268. { "edited by" }
  269.  
  270. FUNCTION {bbl.edition}
  271. { "edn." }
  272.  
  273. FUNCTION {bbl.volume}
  274. { "Vol." }
  275.  
  276. FUNCTION {bbl.of}
  277. { "of" }
  278.  
  279. FUNCTION {bbl.number}
  280. { "no." }
  281.  
  282. FUNCTION {bbl.nr}
  283. { "no." }
  284.  
  285. FUNCTION {bbl.in}
  286. { "in" }
  287.  
  288. FUNCTION {bbl.pages}
  289. { "" }
  290.  
  291. FUNCTION {bbl.page}
  292. { "" }
  293.  
  294. FUNCTION {bbl.chapter}
  295. { "Ch." }
  296. %{ "chap." }
  297.  
  298. FUNCTION {bbl.techrep}
  299. { "Tech. Rep." }
  300.  
  301. FUNCTION {bbl.mthesis}
  302. { "Master's thesis" }
  303.  
  304. FUNCTION {bbl.phdthesis}
  305. { "PhD thesis" }
  306.  
  307. FUNCTION {bbl.first}
  308. { "1st" }
  309.  
  310. FUNCTION {bbl.second}
  311. { "2nd" }
  312.  
  313. FUNCTION {bbl.third}
  314. { "3rd" }
  315.  
  316. FUNCTION {bbl.fourth}
  317. { "4th" }
  318.  
  319. FUNCTION {bbl.fifth}
  320. { "5th" }
  321.  
  322. FUNCTION {bbl.st}
  323. { "st" }
  324.  
  325. FUNCTION {bbl.nd}
  326. { "nd" }
  327.  
  328. FUNCTION {bbl.rd}
  329. { "rd" }
  330.  
  331. FUNCTION {bbl.th}
  332. { "th" }
  333.  
  334. MACRO {jan} {"Jan."}
  335.  
  336. MACRO {feb} {"Feb."}
  337.  
  338. MACRO {mar} {"Mar."}
  339.  
  340. MACRO {apr} {"Apr."}
  341.  
  342. MACRO {may} {"May"}
  343.  
  344. MACRO {jun} {"Jun."}
  345.  
  346. MACRO {jul} {"Jul."}
  347.  
  348. MACRO {aug} {"Aug."}
  349.  
  350. MACRO {sep} {"Sep."}
  351.  
  352. MACRO {oct} {"Oct."}
  353.  
  354. MACRO {nov} {"Nov."}
  355.  
  356. MACRO {dec} {"Dec."}
  357.  
  358. FUNCTION {eng.ord}
  359. { duplicate$ "1" swap$ *
  360. #-2 #1 substring$ "1" =
  361. { bbl.th * }
  362. { duplicate$ #-1 #1 substring$
  363. duplicate$ "1" =
  364. { pop$ bbl.st * }
  365. { duplicate$ "2" =
  366. { pop$ bbl.nd * }
  367. { "3" =
  368. { bbl.rd * }
  369. { bbl.th * }
  370. if$
  371. }
  372. if$
  373. }
  374. if$
  375. }
  376. if$
  377. }
  378.  
  379. MACRO {acmcs} {"ACM Comput. Surv."}
  380.  
  381. MACRO {acta} {"Acta Inf."}
  382.  
  383. MACRO {cacm} {"Commun. ACM"}
  384.  
  385. MACRO {ibmjrd} {"IBM J. Res. Dev."}
  386.  
  387. MACRO {ibmsj} {"IBM Syst.~J."}
  388.  
  389. MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  390.  
  391. MACRO {ieeetc} {"IEEE Trans. Comput."}
  392.  
  393. MACRO {ieeetcad}
  394. {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  395.  
  396. MACRO {ipl} {"Inf. Process. Lett."}
  397.  
  398. MACRO {jacm} {"J.~ACM"}
  399.  
  400. MACRO {jcss} {"J.~Comput. Syst. Sci."}
  401.  
  402. MACRO {scp} {"Sci. Comput. Programming"}
  403.  
  404. MACRO {sicomp} {"SIAM J. Comput."}
  405.  
  406. MACRO {tocs} {"ACM Trans. Comput. Syst."}
  407.  
  408. MACRO {tods} {"ACM Trans. Database Syst."}
  409.  
  410. MACRO {tog} {"ACM Trans. Gr."}
  411.  
  412. MACRO {toms} {"ACM Trans. Math. Softw."}
  413.  
  414. MACRO {toois} {"ACM Trans. Office Inf. Syst."}
  415.  
  416. MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  417.  
  418. MACRO {tcs} {"Theoretical Comput. Sci."}
  419.  
  420. INTEGERS { nameptr namesleft numnames }
  421.  
  422. FUNCTION {format.names}
  423. { 's :=
  424. #1 'nameptr :=
  425. s num.names$ 'numnames :=
  426. numnames 'namesleft :=
  427. { namesleft #0 > }
  428. { s nameptr
  429. "{vv~}{ll}{, jj}{, f.}" format.name$
  430. 't :=
  431.  
  432. numnames #5 >
  433. {
  434. nameptr #1 >
  435. {
  436. nameptr #4 =
  437. {
  438. ", {et~al.}" *
  439. }
  440. {
  441. nameptr #4 >
  442. { "" * }
  443. { ", " * t * }
  444. if$
  445. }
  446. if$
  447.  
  448. }
  449. 't
  450. if$
  451. }
  452. {
  453. nameptr #1 >
  454. {
  455. namesleft #1 >
  456. { ", " * t * }
  457. {
  458. numnames #2 >
  459. { "," * }
  460. 'skip$
  461. if$
  462. s nameptr "{ll}" format.name$ duplicate$ "others" =
  463. { 't := }
  464. { pop$ }
  465. if$
  466. t "others" =
  467. {
  468. " {et~al.}" *
  469. }
  470. { " \& " * t * }
  471. if$
  472. }
  473. if$
  474. }
  475. 't
  476. if$
  477. } if$
  478.  
  479. nameptr #1 + 'nameptr :=
  480. namesleft #1 - 'namesleft :=
  481. }
  482. while$
  483. }
  484.  
  485. FUNCTION {format.names.ed}
  486. { 's :=
  487. #1 'nameptr :=
  488. s num.names$ 'numnames :=
  489. numnames 'namesleft :=
  490. { namesleft #0 > }
  491. { s nameptr
  492. "{f.~}{vv~}{ll}{, jj}"
  493. format.name$
  494. 't :=
  495. nameptr #1 >
  496. {
  497. namesleft #1 >
  498. { ", " * t * }
  499. {
  500. numnames #2 >
  501. { "," * }
  502. 'skip$
  503. if$
  504. s nameptr "{ll}" format.name$ duplicate$ "others" =
  505. { 't := }
  506. { pop$ }
  507. if$
  508. t "others" =
  509. {
  510. " {et~al.}" *
  511. }
  512. { " \& " * t * }
  513. if$
  514. }
  515. if$
  516. }
  517. 't
  518. if$
  519. nameptr #1 + 'nameptr :=
  520. namesleft #1 - 'namesleft :=
  521. }
  522. while$
  523. }
  524.  
  525. FUNCTION {format.key}
  526. { empty$
  527. { key field.or.null }
  528. { "" }
  529. if$
  530. }
  531.  
  532. FUNCTION {format.authors}
  533. { author empty$
  534. { "" }
  535. { author format.names }
  536. if$
  537. }
  538.  
  539. FUNCTION {format.editors}
  540. { editor empty$
  541. { "" }
  542. { editor format.names
  543. editor num.names$ #1 >
  544. { ", " * bbl.editors * }
  545. { ", " * bbl.editor * }
  546. if$
  547. }
  548. if$
  549. }
  550.  
  551. FUNCTION {format.in.editors}
  552. { editor empty$
  553. { "" }
  554. { editor format.names.ed
  555. }
  556. if$
  557. }
  558.  
  559. FUNCTION {format.note}
  560. { note empty$
  561. { "" }
  562. { note #1 #1 substring$
  563. duplicate$ "{" =
  564. 'skip$
  565. { output.state mid.sentence =
  566. { "l" }
  567. { "u" }
  568. if$
  569. change.case$
  570. }
  571. if$
  572. note #2 global.max$ substring$ *
  573. }
  574. if$
  575. }
  576.  
  577. %EDP Sciences le 30/11/2014
  578. FUNCTION {format.eprint}
  579. { eprint duplicate$ empty$
  580. 'skip$
  581. { "[\eprint"
  582. archiveprefix empty$
  583. 'skip$
  584. { "[" * archiveprefix * "]" * }
  585. if$
  586. "{" * swap$ * "}]" *
  587. }
  588. if$
  589. }
  590. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  591.  
  592. FUNCTION {format.title}
  593. { title empty$
  594. { "" }
  595. { title
  596. }
  597. if$
  598. }
  599.  
  600. FUNCTION {format.full.names}
  601. {'s :=
  602. #1 'nameptr :=
  603. s num.names$ 'numnames :=
  604. numnames 'namesleft :=
  605. { namesleft #0 > }
  606. { s nameptr
  607. "{vv~}{ll}" format.name$
  608. 't :=
  609. nameptr #1 >
  610. {
  611. namesleft #1 >
  612. { ", " * t * }
  613. {
  614. numnames #2 >
  615. { "," * }
  616. 'skip$
  617. if$
  618. s nameptr "{ll}" format.name$ duplicate$ "others" =
  619. { 't := }
  620. { pop$ }
  621. if$
  622. t "others" =
  623. {
  624. " {et~al.}" *
  625. }
  626. { " \& " * t * }
  627. if$
  628. }
  629. if$
  630. }
  631. 't
  632. if$
  633. nameptr #1 + 'nameptr :=
  634. namesleft #1 - 'namesleft :=
  635. }
  636. while$
  637. }
  638.  
  639. FUNCTION {author.editor.key.full}
  640. { author empty$
  641. { editor empty$
  642. { key empty$
  643. { cite$ #1 #3 substring$ }
  644. 'key
  645. if$
  646. }
  647. { editor format.full.names }
  648. if$
  649. }
  650. { author format.full.names }
  651. if$
  652. }
  653.  
  654. FUNCTION {author.key.full}
  655. { author empty$
  656. { key empty$
  657. { cite$ #1 #3 substring$ }
  658. 'key
  659. if$
  660. }
  661. { author format.full.names }
  662. if$
  663. }
  664.  
  665. FUNCTION {editor.key.full}
  666. { editor empty$
  667. { key empty$
  668. { cite$ #1 #3 substring$ }
  669. 'key
  670. if$
  671. }
  672. { editor format.full.names }
  673. if$
  674. }
  675.  
  676. FUNCTION {make.full.names}
  677. { type$ "book" =
  678. type$ "inbook" =
  679. or
  680. 'author.editor.key.full
  681. { type$ "proceedings" =
  682. 'editor.key.full
  683. 'author.key.full
  684. if$
  685. }
  686. if$
  687. }
  688.  
  689. FUNCTION {output.bibitem}
  690. { newline$
  691. "\bibitem[{" write$
  692. label write$
  693. ")" make.full.names duplicate$ short.list =
  694. { pop$ }
  695. { * }
  696. if$
  697. "}]{" * write$
  698. cite$ write$
  699. "}" write$
  700. newline$
  701. ""
  702. before.all 'output.state :=
  703. }
  704.  
  705. FUNCTION {n.dashify}
  706. {
  707. 't :=
  708. ""
  709. { t empty$ not }
  710. { t #1 #1 substring$ "-" =
  711. { t #1 #2 substring$ "--" = not
  712. { "--" *
  713. t #2 global.max$ substring$ 't :=
  714. }
  715. { { t #1 #1 substring$ "-" = }
  716. { "-" *
  717. t #2 global.max$ substring$ 't :=
  718. }
  719. while$
  720. }
  721. if$
  722. }
  723. { t #1 #1 substring$ *
  724. t #2 global.max$ substring$ 't :=
  725. }
  726. if$
  727. }
  728. while$
  729. }
  730.  
  731. FUNCTION {word.in}
  732. { bbl.in
  733. " " * }
  734.  
  735. FUNCTION {format.date}
  736. { year duplicate$ empty$
  737. { "empty year in " cite$ * "; set to ????" * warning$
  738. pop$ "????" }
  739. 'skip$
  740. if$
  741. extra.label *
  742. before.all 'output.state :=
  743. after.sentence 'output.state :=
  744. }
  745.  
  746. FUNCTION {format.btitle}
  747. { title
  748. }
  749.  
  750. FUNCTION {tie.or.space.connect}
  751. { duplicate$ text.length$ #3 <
  752. { "~" }
  753. { " " }
  754. if$
  755. swap$ * *
  756. }
  757.  
  758. FUNCTION {either.or.check}
  759. { empty$
  760. 'pop$
  761. { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  762. if$
  763. }
  764.  
  765. FUNCTION {format.bvolume}
  766. { volume empty$
  767. { "" }
  768. { bbl.volume volume tie.or.space.connect
  769. series empty$
  770. 'skip$
  771. { bbl.of space.word * series emphasize * }
  772. if$
  773. "volume and number" number either.or.check
  774. }
  775. if$
  776. }
  777.  
  778. FUNCTION {format.number.series}
  779. { volume empty$
  780. { number empty$
  781. { series field.or.null }
  782. { output.state mid.sentence =
  783. { bbl.number }
  784. { bbl.number capitalize }
  785. if$
  786. number tie.or.space.connect
  787. series empty$
  788. { "there's a number but no series in " cite$ * warning$ }
  789. { bbl.in space.word * series * }
  790. if$
  791. }
  792. if$
  793. }
  794. { "" }
  795. if$
  796. }
  797.  
  798. FUNCTION {is.num}
  799. { chr.to.int$
  800. duplicate$ "0" chr.to.int$ < not
  801. swap$ "9" chr.to.int$ > not and
  802. }
  803.  
  804. FUNCTION {extract.num}
  805. { duplicate$ 't :=
  806. "" 's :=
  807. { t empty$ not }
  808. { t #1 #1 substring$
  809. t #2 global.max$ substring$ 't :=
  810. duplicate$ is.num
  811. { s swap$ * 's := }
  812. { pop$ "" 't := }
  813. if$
  814. }
  815. while$
  816. s empty$
  817. 'skip$
  818. { pop$ s }
  819. if$
  820. }
  821.  
  822. FUNCTION {convert.edition}
  823. { edition extract.num "l" change.case$ 's :=
  824. s "first" = s "1" = or
  825. { bbl.first 't := }
  826. { s "second" = s "2" = or
  827. { bbl.second 't := }
  828. { s "third" = s "3" = or
  829. { bbl.third 't := }
  830. { s "fourth" = s "4" = or
  831. { bbl.fourth 't := }
  832. { s "fifth" = s "5" = or
  833. { bbl.fifth 't := }
  834. { s #1 #1 substring$ is.num
  835. { s eng.ord 't := }
  836. { edition 't := }
  837. if$
  838. }
  839. if$
  840. }
  841. if$
  842. }
  843. if$
  844. }
  845. if$
  846. }
  847. if$
  848. t
  849. }
  850.  
  851. FUNCTION {format.edition}
  852. { edition empty$
  853. { "" }
  854. { output.state mid.sentence =
  855. { convert.edition "l" change.case$ " " * bbl.edition * }
  856. { convert.edition "t" change.case$ " " * bbl.edition * }
  857. if$
  858. }
  859. if$
  860. }
  861.  
  862. INTEGERS { multiresult }
  863.  
  864. FUNCTION {multi.page.check}
  865. { 't :=
  866. #0 'multiresult :=
  867. { multiresult not
  868. t empty$ not
  869. and
  870. }
  871. { t #1 #1 substring$
  872. duplicate$ "-" =
  873. swap$ duplicate$ "," =
  874. swap$ "+" =
  875. or or
  876. { #1 'multiresult := }
  877. { t #2 global.max$ substring$ 't := }
  878. if$
  879. }
  880. while$
  881. multiresult
  882. }
  883.  
  884. FUNCTION {format.pages}
  885. { pages empty$
  886. { "" }
  887. { pages multi.page.check
  888. % { bbl.pages pages n.dashify tie.or.space.connect }
  889. % { bbl.page pages tie.or.space.connect }
  890. { pages n.dashify }
  891. { pages }
  892. if$
  893. }
  894. if$
  895. }
  896.  
  897. FUNCTION {first.page}
  898. { 't :=
  899. ""
  900. { t empty$ not t #1 #1 substring$ "-" = not and }
  901. { t #1 #1 substring$ *
  902. t #2 global.max$ substring$ 't :=
  903. }
  904. while$
  905. }
  906.  
  907. FUNCTION {format.journal.pages}
  908. { pages empty$
  909. { format.eprint outputeprint %EDP Sciences le 30/11/2014
  910. }
  911. { duplicate$ empty$
  912. { pop$ format.pages }
  913. {
  914. ", " *
  915. pages first.page *
  916. }
  917. if$
  918. }
  919. if$
  920. }
  921.  
  922. FUNCTION {format.vol.num.pages}
  923. { volume field.or.null
  924. }
  925.  
  926. FUNCTION {format.chapter.pages}
  927. { chapter empty$
  928. { "" }
  929. { type empty$
  930. { bbl.chapter }
  931. { type "l" change.case$ }
  932. if$
  933. chapter tie.or.space.connect
  934. }
  935. if$
  936. }
  937.  
  938. FUNCTION {format.in.ed.booktitle}
  939. { booktitle empty$
  940. { "" }
  941. { editor empty$
  942. { word.in booktitle emphasize * }
  943. { word.in booktitle emphasize *
  944. ", " *
  945. editor num.names$ #1 >
  946. { bbl.editors }
  947. { bbl.editor }
  948. if$
  949. * " " *
  950. format.in.editors *
  951. }
  952. if$
  953. }
  954. if$
  955. }
  956.  
  957. FUNCTION {format.thesis.type}
  958. { type empty$
  959. 'skip$
  960. { pop$
  961. type "t" change.case$
  962. }
  963. if$
  964. }
  965.  
  966. FUNCTION {format.tr.number}
  967. { type empty$
  968. { bbl.techrep }
  969. 'type
  970. if$
  971. number empty$
  972. { "t" change.case$ }
  973. { number tie.or.space.connect }
  974. if$
  975. }
  976.  
  977. FUNCTION {format.article.crossref}
  978. {
  979. word.in
  980. " \cite{" * crossref * "}" *
  981. }
  982.  
  983. FUNCTION {format.book.crossref}
  984. { volume empty$
  985. { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  986. word.in
  987. }
  988. { bbl.volume volume tie.or.space.connect
  989. bbl.of space.word *
  990. }
  991. if$
  992. " \cite{" * crossref * "}" *
  993. }
  994.  
  995. FUNCTION {format.incoll.inproc.crossref}
  996. {
  997. word.in
  998. " \cite{" * crossref * "}" *
  999. }
  1000.  
  1001. FUNCTION {format.publisher}
  1002. { publisher empty$
  1003. { "empty publisher in " cite$ * warning$ }
  1004. 'skip$
  1005. if$
  1006. ""
  1007. address empty$ publisher empty$ and
  1008. 'skip$
  1009. {
  1010. add.blank "(" *
  1011. address empty$
  1012. 'skip$
  1013. { address * }
  1014. if$
  1015. publisher empty$
  1016. 'skip$
  1017. { address empty$
  1018. 'skip$
  1019. { ": " * }
  1020. if$
  1021. publisher *
  1022. }
  1023. if$
  1024. ")" *
  1025. }
  1026. if$
  1027. output
  1028. }
  1029.  
  1030. STRINGS {oldname}
  1031.  
  1032. %%%%%%%% To repeat the same authors
  1033.  
  1034. %FUNCTION {name.or.dash}
  1035. %{ 's :=
  1036. % oldname empty$
  1037. % { s 'oldname := s }
  1038. % { s oldname =
  1039. % { "---" }
  1040. % { s 'oldname := s }
  1041. % if$
  1042. % }
  1043. % if$
  1044. %}
  1045.  
  1046. %%%%%%%% Functions added from astrobib
  1047.  
  1048. FUNCTION {format.edn.btitle} % Title should be on stack.
  1049. { duplicate$ empty$ edition empty$ or
  1050. 'skip$
  1051. { ", " * format.edition * }
  1052. if$
  1053. }
  1054.  
  1055. FUNCTION {format.ed.booktitle} % The title should be on the stack.
  1056. { duplicate$ empty$
  1057. { "no book title in " cite$ * warning$ "" pop$ }
  1058. { editor empty$
  1059. author empty$ or % Empty author means editor already given.
  1060. 'format.edn.btitle
  1061. { format.edn.btitle ", " * bbl.editor * " " * format.in.editors * }
  1062. if$
  1063. }
  1064. if$
  1065. }
  1066.  
  1067. FUNCTION {format.full.book.spec} % The title should be on the stack.
  1068. { series empty$
  1069. { format.ed.booktitle
  1070. volume empty$
  1071. { number empty$
  1072. 'skip$
  1073. { " there's a number but no series in " cite$ * warning$
  1074. " No." number tie.or.space.connect * }
  1075. if$
  1076. }
  1077. { ", Vol." volume tie.or.space.connect *
  1078. number empty$
  1079. 'skip$
  1080. {"Both volume and number fields in " * cite$ * warning$ }
  1081. if$
  1082. }
  1083. if$
  1084. }
  1085. { volume empty$
  1086. { format.ed.booktitle ", " * series *
  1087. number empty$
  1088. 'skip$
  1089. { " No." number tie.or.space.connect * }
  1090. if$
  1091. }
  1092. { series ", Vol." volume tie.or.space.connect *
  1093. ", " * swap$ format.ed.booktitle *
  1094. number empty$
  1095. 'skip$
  1096. {"Both volume and number fields in " * cite$ * warning$ }
  1097. if$
  1098. }
  1099. if$
  1100. }
  1101. if$
  1102. }
  1103.  
  1104. %%%%%%% End of functions from astrobib
  1105.  
  1106. FUNCTION {article}
  1107. { output.bibitem
  1108. format.authors "author" output.check
  1109. author format.key output
  1110. %%%%% name.or.dash
  1111. format.date "year" output.check
  1112. date.block
  1113. crossref missing$
  1114. { journal
  1115. "journal" output.check
  1116. format.vol.num.pages output
  1117. }
  1118. { format.article.crossref output.nonnull
  1119. format.pages output
  1120. }
  1121. if$
  1122. format.journal.pages
  1123. format.note output
  1124. %format.eprint outputeprint %EDP Sciences le 30/11/2014
  1125. fin.entry
  1126. }
  1127.  
  1128. FUNCTION {book}
  1129. { output.bibitem
  1130. author empty$
  1131. { format.editors "author and editor" output.check
  1132. editor format.key output
  1133. %%%%% name.or.dash
  1134. }
  1135. { format.authors output.nonnull
  1136. %%%%% name.or.dash
  1137. crossref missing$
  1138. { "author and editor" editor either.or.check }
  1139. 'skip$
  1140. if$
  1141. }
  1142. if$
  1143. format.date "year" output.check
  1144. date.block
  1145. title format.full.book.spec output
  1146. % format.btitle "title" output.check
  1147. % crossref missing$
  1148. % { format.bvolume output
  1149. % format.number.series output
  1150. % format.edition output
  1151. format.publisher
  1152. % }
  1153. % {
  1154. % format.book.crossref output.nonnull
  1155. % }
  1156. % if$
  1157. format.pages output
  1158. format.note output
  1159. fin.entry
  1160. }
  1161.  
  1162. FUNCTION {booklet}
  1163. { output.bibitem
  1164. format.authors output
  1165. author format.key output
  1166. %%%%% name.or.dash
  1167. format.date "year" output.check
  1168. date.block
  1169. format.title "title" output.check
  1170. howpublished output
  1171. address output
  1172. format.note output
  1173. fin.entry
  1174. }
  1175.  
  1176. FUNCTION {inbook}
  1177. { output.bibitem
  1178. author empty$
  1179. { format.editors "author and editor" output.check
  1180. editor format.key output
  1181. %%%%% name.or.dash
  1182. }
  1183. { format.authors output.nonnull
  1184. %%%%% name.or.dash
  1185. crossref missing$
  1186. { "author and editor" editor either.or.check }
  1187. 'skip$
  1188. if$
  1189. }
  1190. if$
  1191. format.date "year" output.check
  1192. date.block
  1193. title format.full.book.spec output
  1194. % format.btitle "title" output.check
  1195. % crossref missing$
  1196. % {
  1197. % format.bvolume output
  1198. % format.chapter.pages "chapter and pages" output.check
  1199. % format.number.series output
  1200. % format.edition output
  1201. format.publisher
  1202. % }
  1203. % {
  1204. % format.chapter.pages "chapter and pages" output.check
  1205. % format.book.crossref output.nonnull
  1206. % }
  1207. % if$
  1208. format.pages "pages" output.check
  1209. format.note output
  1210. fin.entry
  1211. }
  1212.  
  1213. FUNCTION {incollection}
  1214. { output.bibitem
  1215. format.authors "author" output.check
  1216. author format.key output
  1217. %%%%%% name.or.dash
  1218. format.date "year" output.check
  1219. date.block
  1220. bbl.in " " * booktitle format.full.book.spec * output
  1221. % crossref missing$
  1222. % { format.in.ed.booktitle "booktitle" output.check
  1223. % format.bvolume output
  1224. % format.number.series output
  1225. % format.edition output
  1226. % format.chapter.pages output
  1227. format.publisher
  1228. % }
  1229. % { format.incoll.inproc.crossref output.nonnull
  1230. % format.chapter.pages output
  1231. % }
  1232. % if$
  1233. format.pages "pages" output.check
  1234. format.note output
  1235. fin.entry
  1236. }
  1237.  
  1238. FUNCTION {inproceedings}
  1239. { output.bibitem
  1240. format.authors "author" output.check
  1241. author format.key output % added
  1242. format.date "year" output.check
  1243. date.block
  1244. bbl.in " " * booktitle format.full.book.spec * output
  1245. % crossref missing$
  1246. % { format.in.ed.booktitle "booktitle" output.check
  1247. % format.bvolume output
  1248. % format.number.series output
  1249. publisher empty$
  1250. { organization output
  1251. address output
  1252. }
  1253. { organization output
  1254. format.publisher
  1255. }
  1256. if$
  1257. % }
  1258. % { format.incoll.inproc.crossref output.nonnull
  1259. % }
  1260. % if$
  1261. format.pages output
  1262. format.note output
  1263. fin.entry
  1264. }
  1265.  
  1266. FUNCTION {conference} { inproceedings }
  1267.  
  1268. FUNCTION {manual}
  1269. { output.bibitem
  1270. format.authors output
  1271. author format.key output
  1272. %%%%% name.or.dash
  1273. format.date "year" output.check
  1274. date.block
  1275. format.btitle "title" output.check
  1276. format.edition output
  1277. organization output
  1278. address output
  1279. format.note output
  1280. fin.entry
  1281. }
  1282.  
  1283. FUNCTION {mastersthesis}
  1284. { output.bibitem
  1285. format.authors "author" output.check
  1286. author format.key output
  1287. %%%%% name.or.dash
  1288. format.date "year" output.check
  1289. date.block
  1290. % format.title "title" output.check
  1291. bbl.mthesis format.thesis.type output.nonnull
  1292. school "school" output.check
  1293. address output
  1294. format.note output
  1295. fin.entry
  1296. }
  1297.  
  1298. FUNCTION {misc}
  1299. { output.bibitem
  1300. format.authors output
  1301. author format.key output
  1302. %%%%% name.or.dash
  1303. format.date "year" output.check
  1304. date.block
  1305. format.title output
  1306. howpublished output
  1307. format.note output
  1308. fin.entry
  1309. }
  1310.  
  1311. FUNCTION {phdthesis}
  1312. { output.bibitem
  1313. format.authors "author" output.check
  1314. author format.key output
  1315. %%%%% name.or.dash
  1316. format.date "year" output.check
  1317. date.block
  1318. % format.title "title" output.check
  1319. bbl.phdthesis format.thesis.type output.nonnull
  1320. school "school" output.check
  1321. address output
  1322. format.note output
  1323. fin.entry
  1324. }
  1325.  
  1326. FUNCTION {proceedings}
  1327. { output.bibitem
  1328. editor empty$
  1329. { organization output
  1330. organization format.key output }
  1331. { format.editors output }
  1332. if$
  1333. % format.editors output
  1334. % editor format.key output
  1335. %%%%% name.or.dash
  1336. format.date "year" output.check
  1337. date.block
  1338. title format.full.book.spec output
  1339. % format.btitle "title" output.check
  1340. % format.bvolume output
  1341. % format.number.series output
  1342. publisher empty$ not % No need for warning if no pub.
  1343. { format.publisher }
  1344. { editor empty$ % For empty editor, organization was already given.
  1345. 'skip$
  1346. { organization output }
  1347. if$
  1348. address output
  1349. }
  1350. if$
  1351. % address output
  1352. % organization output
  1353. % publisher output
  1354. format.pages output
  1355. format.note output
  1356. fin.entry
  1357. }
  1358.  
  1359. FUNCTION {techreport}
  1360. { output.bibitem
  1361. format.authors "author" output.check
  1362. author format.key output
  1363. %%%%% name.or.dash
  1364. format.date "year" output.check
  1365. date.block
  1366. format.title "title" output.check
  1367. format.tr.number output.nonnull
  1368. institution "institution" output.check
  1369. address output
  1370. format.note output
  1371. fin.entry
  1372. }
  1373.  
  1374. FUNCTION {unpublished}
  1375. { output.bibitem
  1376. format.authors "author" output.check
  1377. author format.key output
  1378. %%%%% name.or.dash
  1379. format.date "year" output.check
  1380. date.block
  1381. % format.title "title" output.check
  1382. format.note "note" output.check
  1383. fin.entry
  1384. }
  1385.  
  1386. FUNCTION {default.type} { misc }
  1387.  
  1388. READ
  1389.  
  1390. FUNCTION {sortify}
  1391. { purify$
  1392. "l" change.case$
  1393. }
  1394.  
  1395. INTEGERS { len }
  1396.  
  1397. FUNCTION {chop.word}
  1398. { 's :=
  1399. 'len :=
  1400. s #1 len substring$ =
  1401. { s len #1 + global.max$ substring$ }
  1402. 's
  1403. if$
  1404. }
  1405.  
  1406. FUNCTION {format.lab.names}
  1407. { 's :=
  1408. s #1 "{vv~}{ll}" format.name$
  1409. s num.names$ duplicate$
  1410. #2 >
  1411. { pop$
  1412. " {et~al.}" *
  1413. }
  1414. { #2 <
  1415. 'skip$
  1416. { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1417. {
  1418. " {et~al.}" *
  1419. }
  1420. { " \& " * s #2 "{vv~}{ll}" format.name$
  1421. * }
  1422. if$
  1423. }
  1424. if$
  1425. }
  1426. if$
  1427. }
  1428.  
  1429. FUNCTION {author.key.label}
  1430. { author empty$
  1431. { key empty$
  1432. { cite$ #1 #3 substring$ }
  1433. 'key
  1434. if$
  1435. }
  1436. { author format.lab.names }
  1437. if$
  1438. }
  1439.  
  1440. FUNCTION {author.editor.key.label}
  1441. { author empty$
  1442. { editor empty$
  1443. { key empty$
  1444. { cite$ #1 #3 substring$ }
  1445. 'key
  1446. if$
  1447. }
  1448. { editor format.lab.names }
  1449. if$
  1450. }
  1451. { author format.lab.names }
  1452. if$
  1453. }
  1454.  
  1455. FUNCTION {editor.key.label}
  1456. { editor empty$
  1457. { key empty$
  1458. { cite$ #1 #3 substring$ }
  1459. 'key
  1460. if$
  1461. }
  1462. { editor format.lab.names }
  1463. if$
  1464. }
  1465.  
  1466. FUNCTION {calc.short.authors}
  1467. { type$ "book" =
  1468. type$ "inbook" =
  1469. or
  1470. 'author.editor.key.label
  1471. { type$ "proceedings" =
  1472. 'editor.key.label
  1473. 'author.key.label
  1474. if$
  1475. }
  1476. if$
  1477. 'short.list :=
  1478. }
  1479.  
  1480. FUNCTION {calc.label}
  1481. { calc.short.authors
  1482. short.list
  1483. "("
  1484. *
  1485. year duplicate$ empty$
  1486. { pop$ "????" }
  1487. 'skip$
  1488. if$
  1489. *
  1490. 'label :=
  1491. }
  1492.  
  1493. FUNCTION {sort.format.names}
  1494. { 's :=
  1495. #1 'nameptr :=
  1496. ""
  1497. s num.names$ 'numnames :=
  1498. numnames 'namesleft :=
  1499. { namesleft #0 > }
  1500. { s nameptr
  1501. "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
  1502. format.name$ 't :=
  1503. nameptr #1 >
  1504. {
  1505. " " *
  1506. namesleft #1 = t "others" = and
  1507. { "zzzzz" * }
  1508. { t sortify * }
  1509. if$
  1510. }
  1511. { t sortify * }
  1512. if$
  1513. nameptr #1 + 'nameptr :=
  1514. namesleft #1 - 'namesleft :=
  1515. }
  1516. while$
  1517. }
  1518.  
  1519. FUNCTION {sort.format.title}
  1520. { 't :=
  1521. "A " #2
  1522. "An " #3
  1523. "The " #4 t chop.word
  1524. chop.word
  1525. chop.word
  1526. sortify
  1527. #1 global.max$ substring$
  1528. }
  1529.  
  1530. FUNCTION {author.sort}
  1531. { author empty$
  1532. { key empty$
  1533. { "to sort, need author or key in " cite$ * warning$
  1534. ""
  1535. }
  1536. { key sortify }
  1537. if$
  1538. }
  1539. { author sort.format.names }
  1540. if$
  1541. }
  1542.  
  1543. FUNCTION {author.editor.sort}
  1544. { author empty$
  1545. { editor empty$
  1546. { key empty$
  1547. { "to sort, need author, editor, or key in " cite$ * warning$
  1548. ""
  1549. }
  1550. { key sortify }
  1551. if$
  1552. }
  1553. { editor sort.format.names }
  1554. if$
  1555. }
  1556. { author sort.format.names }
  1557. if$
  1558. }
  1559.  
  1560. FUNCTION {editor.sort}
  1561. { editor empty$
  1562. { key empty$
  1563. { "to sort, need editor or key in " cite$ * warning$
  1564. ""
  1565. }
  1566. { key sortify }
  1567. if$
  1568. }
  1569. { editor sort.format.names }
  1570. if$
  1571. }
  1572.  
  1573. FUNCTION {presort}
  1574. { calc.label
  1575. label sortify
  1576. " "
  1577. *
  1578. type$ "book" =
  1579. type$ "inbook" =
  1580. or
  1581. 'author.editor.sort
  1582. { type$ "proceedings" =
  1583. 'editor.sort
  1584. 'author.sort
  1585. if$
  1586. }
  1587. if$
  1588. #1 entry.max$ substring$
  1589. 'sort.label :=
  1590. sort.label
  1591. *
  1592. " "
  1593. *
  1594. title field.or.null
  1595. sort.format.title
  1596. *
  1597. #1 entry.max$ substring$
  1598. 'sort.key$ :=
  1599. }
  1600.  
  1601. ITERATE {presort}
  1602.  
  1603. SORT
  1604.  
  1605. STRINGS { last.label next.extra }
  1606.  
  1607. INTEGERS { last.extra.num number.label }
  1608.  
  1609. FUNCTION {initialize.extra.label.stuff}
  1610. { #0 int.to.chr$ 'last.label :=
  1611. "" 'next.extra :=
  1612. #0 'last.extra.num :=
  1613. #0 'number.label :=
  1614. }
  1615.  
  1616. FUNCTION {forward.pass}
  1617. { last.label label =
  1618. { last.extra.num #1 + 'last.extra.num :=
  1619. last.extra.num int.to.chr$ 'extra.label :=
  1620. }
  1621. { "a" chr.to.int$ 'last.extra.num :=
  1622. "" 'extra.label :=
  1623. label 'last.label :=
  1624. }
  1625. if$
  1626. number.label #1 + 'number.label :=
  1627. }
  1628.  
  1629. FUNCTION {reverse.pass}
  1630. { next.extra "b" =
  1631. { "a" 'extra.label := }
  1632. 'skip$
  1633. if$
  1634. extra.label 'next.extra :=
  1635. extra.label
  1636. duplicate$ empty$
  1637. 'skip$
  1638. { "{\natexlab{" swap$ * "}}" * }
  1639. if$
  1640. 'extra.label :=
  1641. label extra.label * 'label :=
  1642. }
  1643.  
  1644. EXECUTE {initialize.extra.label.stuff}
  1645.  
  1646. ITERATE {forward.pass}
  1647.  
  1648. REVERSE {reverse.pass}
  1649.  
  1650. FUNCTION {bib.sort.order}
  1651. { sort.label
  1652. " "
  1653. *
  1654. year field.or.null sortify
  1655. *
  1656. " "
  1657. *
  1658. title field.or.null
  1659. sort.format.title
  1660. *
  1661. #1 entry.max$ substring$
  1662. 'sort.key$ :=
  1663. }
  1664.  
  1665. ITERATE {bib.sort.order}
  1666.  
  1667. SORT
  1668.  
  1669. FUNCTION {begin.bib}
  1670. { preamble$ empty$
  1671. 'skip$
  1672. { preamble$ write$ newline$ }
  1673. if$
  1674. "\begin{thebibliography}{" number.label int.to.str$ * "}" *
  1675. write$ newline$
  1676. "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
  1677. write$ newline$
  1678. }
  1679.  
  1680. EXECUTE {begin.bib}
  1681.  
  1682. EXECUTE {init.state.consts}
  1683.  
  1684. ITERATE {call.type$}
  1685.  
  1686. FUNCTION {end.bib}
  1687. { newline$
  1688. "\end{thebibliography}" write$ newline$
  1689. }
  1690.  
  1691. EXECUTE {end.bib}
  1692. %% End of customized bst file
  1693. %%
  1694. %% End of file `apj.bst'.
Add Comment
Please, Sign In to add comment