aea.bst 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270
  1. % BibTeX standard bibliography style `aea' (one of the harvard family)
  2. % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  3. % Copyright (C) 2008, all rights reserved.
  4. % Melissa Rice ([email protected]), Full Moon Technical Solutions, LLC (dba FMTek)
  5. % last revised: 20 May 2009
  6. ENTRY
  7. { address
  8. author
  9. booktitle
  10. chapter
  11. edition
  12. editor
  13. howpublished
  14. institution
  15. journal
  16. key
  17. month
  18. note
  19. number
  20. organization
  21. pages
  22. presented
  23. publisher
  24. school
  25. series
  26. title
  27. type
  28. URL
  29. volume
  30. year
  31. }
  32. { field.used etal.allowed etal.required}
  33. { extra.label sort.label list.year }
  34. STRINGS { s t f }
  35. % BOOLEAN OPERATORS
  36. FUNCTION {not}
  37. { { #0 }
  38. { #1 }
  39. if$
  40. }
  41. FUNCTION {and}
  42. { 'skip$
  43. { pop$ #0 }
  44. if$
  45. }
  46. FUNCTION {or}
  47. { { pop$ #1 }
  48. 'skip$
  49. if$
  50. }
  51. % CHECKS
  52. FUNCTION {author.or.editor.check}
  53. { author empty$ editor empty$ and
  54. { "empty author and editor in " cite$ * warning$ }
  55. { skip$ }
  56. if$
  57. }
  58. FUNCTION {chapter.or.pages.check}
  59. { chapter empty$ pages empty$ and
  60. { "empty chapter and pages in " cite$ * warning$ }
  61. { skip$ }
  62. if$
  63. }
  64. FUNCTION {required}
  65. { 't := % name of variable
  66. empty$ % value of variable on stack
  67. { "empty " t * " in " * cite$ * warning$ }
  68. { skip$ }
  69. if$
  70. }
  71. FUNCTION {field.or.null}
  72. { duplicate$ empty$
  73. { pop$ "" }
  74. 'skip$
  75. if$
  76. }
  77. % GENERAL FORMATTING
  78. FUNCTION {emphasize}
  79. { duplicate$ empty$
  80. { pop$ "" }
  81. { "{\em " swap$ * "}" * }
  82. if$
  83. }
  84. FUNCTION {embolden}
  85. { duplicate$ empty$
  86. { pop$ "" }
  87. { "{\bf " swap$ * "}" * }
  88. if$
  89. }
  90. FUNCTION {quote}
  91. { duplicate$ empty$
  92. { pop$ "" }
  93. { "`" swap$ * "'" * }
  94. if$
  95. }
  96. FUNCTION {doublequote}
  97. { duplicate$ empty$
  98. { pop$ "" }
  99. { "``" swap$ * "''" * }
  100. if$
  101. }
  102. FUNCTION {join}
  103. { 't := % second string
  104. 'f := % join character
  105. 's := % first string
  106. s empty$
  107. { t empty$
  108. { "" }
  109. { t }
  110. if$
  111. }
  112. { t empty$
  113. { s }
  114. { f ". " =
  115. { s add.period$ " " * t * }
  116. { s f * t * }
  117. if$
  118. }
  119. if$
  120. }
  121. if$
  122. }
  123. FUNCTION {tie.or.space.connect}
  124. { duplicate$ text.length$ #3 <
  125. { "~" }
  126. { " " }
  127. if$
  128. swap$ * *
  129. }
  130. INTEGERS { len }
  131. FUNCTION {chop.word}
  132. { 's :=
  133. 'len :=
  134. s #1 len substring$ =
  135. { s len #1 + global.max$ substring$ }
  136. 's
  137. if$
  138. }
  139. INTEGERS { ind tsslen }
  140. STRINGS { tss ret rss istr }
  141. FUNCTION {replace.substring}{
  142. 'rss :=
  143. 'tss :=
  144. 'istr :=
  145. "" 'ret :=
  146. tss text.length$ 'tsslen :=
  147. #1 'ind :=
  148. { istr ind tsslen substring$ "" = not }
  149. { istr ind tsslen substring$ tss =
  150. { ret rss * 'ret :=
  151. ind tsslen + 'ind :=
  152. }
  153. { ret istr ind #1 substring$ * 'ret :=
  154. ind #1 + 'ind :=
  155. }
  156. if$
  157. }
  158. while$
  159. ret
  160. }
  161. FUNCTION {n.dashify}
  162. { 't :=
  163. ""
  164. { t empty$ not }
  165. { t #1 #1 substring$ "-" =
  166. { t #1 #2 substring$ "--" = not
  167. { "--" *
  168. t #2 global.max$ substring$ 't :=
  169. }
  170. { { t #1 #1 substring$ "-" = }
  171. { "-" *
  172. t #2 global.max$ substring$ 't :=
  173. }
  174. while$
  175. }
  176. if$
  177. }
  178. { t #1 #1 substring$ *
  179. t #2 global.max$ substring$ 't :=
  180. }
  181. if$
  182. }
  183. while$
  184. }
  185. INTEGERS { multiresult }
  186. FUNCTION {multi.page.check}
  187. { 't :=
  188. #0 'multiresult :=
  189. { multiresult not
  190. t empty$ not
  191. and
  192. }
  193. { t #1 #1 substring$
  194. duplicate$ "-" =
  195. swap$ duplicate$ "," =
  196. swap$ "+" =
  197. or or
  198. { #1 'multiresult := }
  199. { t #2 global.max$ substring$ 't := }
  200. if$
  201. }
  202. while$
  203. multiresult
  204. }
  205. % OUTPUT FUNCTIONS
  206. FUNCTION {output} % writ
  207. { duplicate$ empty$
  208. { pop$ }
  209. { write$}
  210. if$
  211. }
  212. FUNCTION {output.year} % writ
  213. { list.year empty$
  214. { skip$ }
  215. { list.year ". " * write$}
  216. if$
  217. }
  218. FUNCTION {output.title.quoted}
  219. { title empty$
  220. { skip$ }
  221. { title add.period$ doublequote " " * write$ }
  222. if$
  223. }
  224. FUNCTION {output.title.italic}
  225. { title empty$
  226. { skip$ }
  227. { title add.period$ emphasize " " * write$ }
  228. if$
  229. }
  230. FUNCTION {output.entry}
  231. { duplicate$ "" =
  232. { pop$ }
  233. { add.period$
  234. write$
  235. }
  236. if$
  237. newline$
  238. }
  239. % FIELD FORMATTING
  240. FUNCTION {format.address.only}
  241. { address empty$
  242. { "" }
  243. { address }
  244. if$
  245. }
  246. FUNCTION {format.journal}
  247. { journal empty$
  248. { "" }
  249. { journal emphasize }
  250. if$
  251. }
  252. FUNCTION {format.type}
  253. { type empty$
  254. { "" }
  255. { type }
  256. if$
  257. }
  258. FUNCTION {format.number}
  259. { number empty$
  260. { "" }
  261. { number }
  262. if$
  263. }
  264. FUNCTION {format.school}
  265. { school empty$
  266. { "" }
  267. { school }
  268. if$
  269. }
  270. FUNCTION {format.institution}
  271. { institution empty$
  272. { "" }
  273. { institution }
  274. if$
  275. }
  276. FUNCTION {format.masters}
  277. { "Master's diss."
  278. }
  279. FUNCTION {format.phd}
  280. { "PhD diss."
  281. }
  282. FUNCTION {format.note}
  283. { note empty$
  284. { "" }
  285. { note }
  286. if$
  287. }
  288. FUNCTION {format.booktitle}
  289. { booktitle empty$
  290. { "" }
  291. { booktitle emphasize }
  292. if$
  293. }
  294. FUNCTION {format.booktitle.label}
  295. { booktitle empty$
  296. { "" }
  297. { booktitle embolden }
  298. if$
  299. }
  300. FUNCTION {format.title.bold}
  301. { title empty$
  302. { "" }
  303. { title add.period$ embolden }
  304. if$
  305. }
  306. FUNCTION {format.month}
  307. { month empty$
  308. { "" }
  309. { month }
  310. if$
  311. }
  312. FUNCTION {format.vol.num.pages} % writ
  313. { volume empty$
  314. { number empty$
  315. {""}
  316. { "there's a number but no volume in " cite$ * warning$ ", (" number * ")" *}
  317. if$
  318. }
  319. { number empty$
  320. { volume }
  321. { volume "(" * number * ")" *}
  322. if$
  323. }
  324. if$
  325. pages empty$
  326. { skip$ }
  327. { duplicate$ "" =
  328. { pages n.dashify * }
  329. { ":~" * pages n.dashify * }
  330. if$
  331. }
  332. if$
  333. }
  334. FUNCTION {format.edition} % writ
  335. { edition empty$
  336. { "" }
  337. { edition " ed." * }
  338. if$
  339. }
  340. FUNCTION {format.book.vol.series.ed} % writ
  341. { volume empty$
  342. { series empty$
  343. { "" }
  344. { series emphasize }
  345. if$
  346. }
  347. { "Vol." volume tie.or.space.connect
  348. series empty$
  349. 'skip$
  350. { " of " * series emphasize * }
  351. if$
  352. }
  353. if$
  354. edition empty$
  355. { skip$ }
  356. { ". " * edition * " ed." *}
  357. if$
  358. }
  359. FUNCTION {format.address.publisher} % writ
  360. { address empty$
  361. { publisher empty$
  362. { "" }
  363. { publisher }
  364. if$
  365. }
  366. { publisher empty$
  367. { address }
  368. { address ":" * publisher *}
  369. if$
  370. }
  371. if$
  372. }
  373. FUNCTION {format.howpublished}
  374. { howpublished empty$
  375. { "" }
  376. { howpublished emphasize }
  377. if$
  378. }
  379. FUNCTION {format.organization}
  380. { organization empty$
  381. { "" }
  382. { organization }
  383. if$
  384. }
  385. FUNCTION {format.organization.presented}
  386. { organization empty$
  387. { "" }
  388. { presented empty$
  389. { organization }
  390. { presented " " * organization * }
  391. if$
  392. }
  393. if$
  394. }
  395. FUNCTION {format.pages}
  396. { pages empty$
  397. { "" }
  398. { pages multi.page.check
  399. { pages n.dashify }
  400. { pages }
  401. if$
  402. }
  403. if$
  404. }
  405. FUNCTION {format.chapter.pages}
  406. { chapter empty$
  407. { pages empty$
  408. { "" }
  409. { format.pages }
  410. if$
  411. }
  412. { pages empty$
  413. { "Chapter " chapter * }
  414. { "Chapter " chapter * ", " * format.pages * }
  415. if$
  416. }
  417. if$
  418. }
  419. INTEGERS { nameptr namesleft numnames }
  420. % Format names so that first author is "last, first" and subsequent authors are "first last" with commas
  421. % separating authors whenever there are two or more and "and" precedes last author if 2 or more.
  422. FUNCTION {format.names}
  423. { 's :=
  424. #1 'nameptr :=
  425. s num.names$ 'numnames :=
  426. numnames 'namesleft :=
  427. { namesleft #0 > }
  428. { nameptr #1 =
  429. { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }
  430. { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't := }
  431. if$
  432. nameptr #1 >
  433. { namesleft #1 >
  434. { ", " * t * }
  435. { t "others" =
  436. { ", et~al." * }
  437. { ", and " * t * }
  438. if$
  439. }
  440. if$
  441. }
  442. 't
  443. if$
  444. nameptr #1 + 'nameptr :=
  445. namesleft #1 - 'namesleft :=
  446. }
  447. while$
  448. }
  449. FUNCTION {format.names.forward}
  450. { 's :=
  451. #1 'nameptr :=
  452. s num.names$ 'numnames :=
  453. numnames 'namesleft :=
  454. { namesleft #0 > }
  455. { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't :=
  456. nameptr #1 >
  457. { namesleft #1 >
  458. { ", " * t * }
  459. { t "others" =
  460. { " et~al." * }
  461. { " and " * t * }
  462. if$
  463. }
  464. if$
  465. }
  466. 't
  467. if$
  468. nameptr #1 + 'nameptr :=
  469. namesleft #1 - 'namesleft :=
  470. }
  471. while$
  472. }
  473. INTEGERS { author.field editor.field organization.field title.field key.field }
  474. FUNCTION {init.field.constants}
  475. { #0 'author.field :=
  476. #1 'editor.field :=
  477. #2 'organization.field :=
  478. #3 'title.field :=
  479. #4 'key.field :=
  480. }
  481. FUNCTION {format.names.label}
  482. { 's :=
  483. #1 'nameptr :=
  484. s num.names$ 'numnames :=
  485. numnames 'namesleft :=
  486. { namesleft #0 > }
  487. { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't :=
  488. nameptr #1 >
  489. { namesleft #1 >
  490. { ", " * t * }
  491. { t "others" =
  492. { " et~al." * }
  493. { " \harvardand\ " * t * }
  494. if$
  495. }
  496. if$
  497. }
  498. 't
  499. if$
  500. nameptr #1 + 'nameptr :=
  501. namesleft #1 - 'namesleft :=
  502. }
  503. while$
  504. }
  505. FUNCTION {format.names.label.short}
  506. { 's :=
  507. #1 'nameptr :=
  508. s num.names$ 'numnames :=
  509. numnames #3 >
  510. { s #1 "{vv~}{ll}" format.name$ " et~al." *}
  511. { numnames 'namesleft :=
  512. { namesleft #0 > }
  513. { s nameptr "{vv~}{ll}" format.name$ 't :=
  514. nameptr #1 >
  515. { namesleft #1 >
  516. { ", " * t * }
  517. { t "others" =
  518. { " et~al." * }
  519. { " \harvardand\ " * t * }
  520. if$
  521. }
  522. if$
  523. }
  524. 't
  525. if$
  526. nameptr #1 + 'nameptr :=
  527. namesleft #1 - 'namesleft :=
  528. }
  529. while$
  530. }
  531. if$
  532. }
  533. FUNCTION {format.authors}
  534. { author empty$
  535. { "" }
  536. { author format.names add.period$ embolden}
  537. if$
  538. }
  539. FUNCTION {format.editors}
  540. { editor empty$
  541. { "" }
  542. { editor format.names add.period$ embolden}
  543. if$
  544. }
  545. FUNCTION {format.editors.primary}
  546. { editor empty$
  547. { "" }
  548. { editor format.names ", " * embolden " ed" *}
  549. if$
  550. }
  551. FUNCTION {format.editors.secondary}
  552. { editor empty$
  553. { "" }
  554. { ", ed. " editor format.names.forward *}
  555. if$
  556. }
  557. FUNCTION {make.list.label} % writ
  558. { author.field field.used =
  559. { format.authors }
  560. { editor.field field.used =
  561. { format.editors.primary }
  562. { organization.field field.used =
  563. { "The " #4 organization chop.word embolden }
  564. { title.field field.used =
  565. { format.title.bold }
  566. { key.field field.used =
  567. { key }
  568. { "Internal error :001 on " cite$ * " label" * warning$ }
  569. if$
  570. }
  571. if$
  572. }
  573. if$
  574. }
  575. if$
  576. }
  577. if$
  578. }
  579. FUNCTION {output.list.label} % writ
  580. { make.list.label add.period$ " " * write$
  581. }
  582. FUNCTION {make.label.short} % writ
  583. { author.field field.used =
  584. { author format.names.label.short }
  585. { editor.field field.used =
  586. { editor format.names.label.short }
  587. { organization.field field.used =
  588. { "The " #4 organization chop.word}
  589. { title.field field.used =
  590. { format.booktitle.label }
  591. { key.field field.used =
  592. { key }
  593. {"Internal error :001 on " cite$ * " label" * warning$ }
  594. if$
  595. }
  596. if$
  597. }
  598. if$
  599. }
  600. if$
  601. }
  602. if$
  603. }
  604. FUNCTION {make.label.full} % writ
  605. { author.field field.used =
  606. { author format.names.label }
  607. { editor.field field.used =
  608. { editor format.names.label }
  609. { organization.field field.used =
  610. { "The " #4 organization chop.word}
  611. { title.field field.used =
  612. { format.booktitle.label }
  613. { key.field field.used =
  614. { key }
  615. {"Internal error :001 on " cite$ * " label" * warning$ }
  616. if$
  617. }
  618. if$
  619. }
  620. if$
  621. }
  622. if$
  623. }
  624. if$
  625. }
  626. % bibitem syntax:
  627. % \harvarditem[abbr-citation]{full-citation}{citation-year}{cite-key}
  628. % abbr-citation: names for 2nd and subsequent citations
  629. % full-citation: names for 1st citation
  630. % Give full name (first name, middle initial, and last name) of author(s) and year of publication in the first citation.
  631. % Give the last name of author and year of publication in parentheses for each subsequent citation.
  632. % If there are four or more authors, refer to the first author, followed by et al. and the year.
  633. FUNCTION {output.bibitem} % writ
  634. { newline$
  635. "\harvarditem[" make.label.short * "]" *
  636. "{" make.label.full * "}" * *
  637. "{" list.year * "}" * *
  638. "{" cite$ * "}" * * write$
  639. newline$
  640. }
  641. FUNCTION {stack.show}
  642. { duplicate$ "stack top: " swap$ * " in " * cite$ * warning$
  643. duplicate$ "" =
  644. { "stack top is blank" warning$ }
  645. { "stack top is non-blank" warning$ }
  646. if$
  647. }
  648. FUNCTION {article} % writ
  649. { output.bibitem
  650. output.list.label % write author or surrogate label
  651. output.year
  652. output.title.quoted
  653. author "author" required
  654. title "title" required
  655. journal "journal" required
  656. year "year" required
  657. format.journal ", "
  658. % format.month join ", "
  659. format.vol.num.pages join ". "
  660. format.note join
  661. output.entry
  662. }
  663. FUNCTION {book}
  664. { output.bibitem
  665. output.list.label % write author or surrogate label
  666. output.year
  667. output.title.italic
  668. author.or.editor.check
  669. title "title" required
  670. publisher "publisher" required
  671. year "year" required
  672. % format.month ", "
  673. % format.book.vol.series.ed join ", "
  674. format.book.vol.series.ed ", "
  675. format.address.publisher join ". "
  676. format.note join
  677. output.entry
  678. }
  679. FUNCTION {booklet}
  680. { output.bibitem
  681. output.list.label % write author or surrogate label
  682. year empty$
  683. { skip$ }
  684. { output.year }
  685. if$
  686. author empty$
  687. { skip$ }
  688. { output.title.quoted }
  689. if$
  690. title "title" required
  691. format.howpublished ", "
  692. % format.month join ", "
  693. format.address.only join ". "
  694. format.note join
  695. output.entry
  696. }
  697. FUNCTION {inbook}
  698. { output.bibitem
  699. output.list.label % write author or surrogate label
  700. output.year
  701. output.title.quoted
  702. author.or.editor.check
  703. chapter.or.pages.check
  704. title "title" required
  705. publisher "publisher" required
  706. year "year" required
  707. format.booktitle ", "
  708. format.editors.secondary join " "
  709. format.book.vol.series.ed join ", "
  710. format.chapter.pages join ". "
  711. format.address.publisher join ". "
  712. format.note join
  713. output.entry
  714. }
  715. FUNCTION {incollection}
  716. { output.bibitem
  717. output.list.label % write author or surrogate label
  718. output.year
  719. output.title.quoted
  720. "In " format.booktitle * ". " * output
  721. author "author" required
  722. title "title" required
  723. booktitle "booktitle" required
  724. publisher "publisher" required
  725. year "year" required
  726. format.book.vol.series.ed ", "
  727. format.editors.secondary join ", "
  728. format.chapter.pages join ". "
  729. format.address.publisher join ". "
  730. format.note join
  731. output.entry
  732. }
  733. FUNCTION {inproceedings}
  734. { output.bibitem
  735. output.list.label % write author or surrogate label
  736. output.year
  737. output.title.quoted
  738. author "author" required
  739. title "title" required
  740. booktitle "booktitle" required
  741. year "year" required
  742. format.book.vol.series.ed ", "
  743. format.pages join ", "
  744. format.organization.presented join ". "
  745. format.address.publisher join ". "
  746. format.note join
  747. output.entry
  748. }
  749. FUNCTION {conference} { inproceedings }
  750. FUNCTION {manual}
  751. { output.bibitem
  752. output.list.label % write author or surrogate label
  753. title "title" required
  754. year empty$
  755. { skip$ }
  756. { output.year }
  757. if$
  758. author empty$
  759. { skip$ }
  760. { output.title.quoted }
  761. if$
  762. format.edition ", "
  763. format.address.only join ", "
  764. format.organization join ", "
  765. % format.month join ", "
  766. format.note join
  767. output.entry
  768. }
  769. FUNCTION {mastersthesis}
  770. { output.bibitem
  771. output.list.label % write author or surrogate label
  772. output.year
  773. output.title.quoted
  774. author "author" required
  775. title "title" required
  776. school "school" required
  777. year "year" required
  778. format.masters " "
  779. format.school join ", "
  780. format.address.only join ", "
  781. % format.month join ", "
  782. format.note join
  783. output.entry
  784. }
  785. FUNCTION {misc}
  786. { output.bibitem
  787. output.list.label % write author or surrogate label
  788. output.year
  789. author empty$
  790. { skip$ }
  791. { output.title.quoted }
  792. if$
  793. format.howpublished ", "
  794. % format.month join ". "
  795. format.note join
  796. output.entry
  797. }
  798. FUNCTION {phdthesis}
  799. { output.bibitem
  800. output.list.label % write author or surrogate label
  801. output.year
  802. output.title.quoted
  803. author "author" required
  804. title "title" required
  805. school "school" required
  806. year "year" required
  807. format.phd " "
  808. format.school join ", "
  809. format.address.only join ", "
  810. % format.month join ". "
  811. format.note join
  812. output.entry
  813. }
  814. FUNCTION {proceedings}
  815. { output.bibitem
  816. output.list.label % write author or surrogate label
  817. output.year
  818. title "title" required
  819. year "year" required
  820. editor empty$ organization empty$ and
  821. { skip$ }
  822. { output.title.quoted }
  823. if$
  824. editor empty$
  825. { "" "" }
  826. { format.organization ", " }
  827. if$
  828. format.address.publisher join ", "
  829. format.note join
  830. output.entry
  831. }
  832. FUNCTION {techreport}
  833. { output.bibitem
  834. output.list.label % write author or surrogate label
  835. output.year
  836. output.title.quoted
  837. author "author" required
  838. title "title" required
  839. institution "institution" required
  840. year "year" required
  841. format.institution " "
  842. format.type join " "
  843. format.number join ", "
  844. % format.month join ", "
  845. format.address.publisher join ". "
  846. format.note join
  847. output.entry
  848. }
  849. FUNCTION {unpublished}
  850. { output.bibitem
  851. output.list.label % write author or surrogate label
  852. year empty$
  853. { skip$ }
  854. { output.year }
  855. if$
  856. output.title.quoted
  857. author "author" required
  858. title "title" required
  859. note "note" required
  860. format.note
  861. output.entry
  862. }
  863. FUNCTION {default.type} { misc }
  864. MACRO {jan} {"January"}
  865. MACRO {feb} {"February"}
  866. MACRO {mar} {"March"}
  867. MACRO {apr} {"April"}
  868. MACRO {may} {"May"}
  869. MACRO {jun} {"June"}
  870. MACRO {jul} {"July"}
  871. MACRO {aug} {"August"}
  872. MACRO {sep} {"September"}
  873. MACRO {oct} {"October"}
  874. MACRO {nov} {"November"}
  875. MACRO {dec} {"December"}
  876. READ
  877. EXECUTE {init.field.constants}
  878. FUNCTION {sortify}
  879. { purify$
  880. "l" change.case$
  881. }
  882. FUNCTION {sortify.names}
  883. { " \harvardand\ " " " replace.substring
  884. " et~al." " zzz" replace.substring
  885. sortify
  886. }
  887. FUNCTION {author.key.label}
  888. { author empty$
  889. { key empty$
  890. { title.field 'field.used := }
  891. { key.field 'field.used := }
  892. if$
  893. }
  894. { author.field 'field.used := }
  895. if$
  896. }
  897. FUNCTION {author.editor.key.label}
  898. { author empty$
  899. { editor empty$
  900. { key empty$
  901. { title.field 'field.used := }
  902. { key.field 'field.used := }
  903. if$
  904. }
  905. { editor.field 'field.used := }
  906. if$
  907. }
  908. { author.field 'field.used := }
  909. if$
  910. }
  911. FUNCTION {author.key.organization.label}
  912. { author empty$
  913. { key empty$
  914. { organization empty$
  915. { title.field 'field.used := }
  916. { organization.field 'field.used := }
  917. if$
  918. }
  919. { key.field 'field.used := }
  920. if$
  921. }
  922. { author.field 'field.used := }
  923. if$
  924. }
  925. FUNCTION {editor.key.organization.label}
  926. { editor empty$
  927. { key empty$
  928. { organization empty$
  929. { title.field 'field.used := }
  930. { organization.field 'field.used := }
  931. if$
  932. }
  933. { key.field 'field.used := }
  934. if$
  935. }
  936. { editor.field 'field.used := }
  937. if$
  938. }
  939. FUNCTION {sort.format.title}
  940. { 't :=
  941. "A " #2
  942. "An " #3
  943. "The " #4 t chop.word
  944. chop.word
  945. chop.word
  946. sortify
  947. #1 global.max$ substring$
  948. }
  949. FUNCTION {calc.label}
  950. { make.label.short
  951. title.field field.used =
  952. { sort.format.title }
  953. { sortify.names }
  954. if$
  955. year field.or.null purify$ #-1 #4 substring$ sortify
  956. *
  957. 'sort.label :=
  958. }
  959. FUNCTION {preliminaries}
  960. { type$ "book" =
  961. type$ "inbook" =
  962. or
  963. 'author.editor.key.label
  964. { type$ "proceedings" =
  965. 'editor.key.organization.label
  966. { type$ "manual" =
  967. 'author.key.organization.label
  968. 'author.key.label
  969. if$
  970. }
  971. if$
  972. }
  973. if$
  974. author.field field.used =
  975. {
  976. author num.names$ #2 >
  977. { #1 }
  978. { #0 }
  979. if$
  980. 'etal.required :=
  981. }
  982. {
  983. editor.field field.used =
  984. {
  985. editor num.names$ #2 >
  986. { #1 }
  987. { #0 }
  988. if$
  989. }
  990. { #0 }
  991. if$
  992. 'etal.required :=
  993. }
  994. if$
  995. #1 'etal.allowed :=
  996. }
  997. FUNCTION {first.presort}
  998. { calc.label
  999. sort.label
  1000. title.field field.used =
  1001. { skip$ }
  1002. { " "
  1003. *
  1004. make.list.label sortify.names
  1005. *
  1006. " "
  1007. *
  1008. title field.or.null
  1009. sort.format.title
  1010. *
  1011. }
  1012. if$
  1013. #1 entry.max$ substring$
  1014. 'sort.key$ :=
  1015. }
  1016. ITERATE {preliminaries}
  1017. ITERATE {first.presort}
  1018. SORT
  1019. STRINGS { last.sort.label next.extra last.full.label}
  1020. INTEGERS { last.extra.num last.etal.allowed}
  1021. FUNCTION {initialize.confusion}
  1022. { #0 int.to.chr$ 'last.sort.label :=
  1023. #0 int.to.chr$ 'last.full.label :=
  1024. #1 'last.etal.allowed :=
  1025. }
  1026. FUNCTION {confusion.pass}
  1027. { last.sort.label sort.label =
  1028. { last.etal.allowed
  1029. { last.full.label make.label.full sortify.names =
  1030. { skip$ }
  1031. { #0 'etal.allowed :=
  1032. #0 'last.etal.allowed :=
  1033. }
  1034. if$
  1035. }
  1036. { #0 'etal.allowed := }
  1037. if$
  1038. }
  1039. { sort.label 'last.sort.label :=
  1040. make.label.full sortify.names 'last.full.label :=
  1041. #1 'last.etal.allowed :=
  1042. }
  1043. if$
  1044. }
  1045. EXECUTE {initialize.confusion}
  1046. ITERATE {confusion.pass}
  1047. EXECUTE {initialize.confusion}
  1048. REVERSE {confusion.pass}
  1049. FUNCTION {initialize.last.extra.num}
  1050. { #0 int.to.chr$ 'last.sort.label :=
  1051. "" 'next.extra :=
  1052. #0 'last.extra.num :=
  1053. }
  1054. FUNCTION {forward.pass}
  1055. { last.sort.label sort.label =
  1056. { last.extra.num #1 + 'last.extra.num :=
  1057. last.extra.num int.to.chr$ 'extra.label :=
  1058. }
  1059. { "a" chr.to.int$ 'last.extra.num :=
  1060. "" 'extra.label :=
  1061. sort.label 'last.sort.label :=
  1062. }
  1063. if$
  1064. }
  1065. FUNCTION {reverse.pass}
  1066. { next.extra "b" =
  1067. { "a" 'extra.label := }
  1068. 'skip$
  1069. if$
  1070. year empty$
  1071. { "n.d." extra.label emphasize * 'list.year := }
  1072. { year extra.label emphasize * 'list.year := }
  1073. if$
  1074. extra.label 'next.extra :=
  1075. }
  1076. ITERATE {first.presort}
  1077. SORT
  1078. EXECUTE {initialize.last.extra.num}
  1079. ITERATE {forward.pass}
  1080. REVERSE {reverse.pass}
  1081. FUNCTION {second.presort}
  1082. { make.list.label
  1083. title.field field.used =
  1084. { sort.format.title }
  1085. { sortify.names }
  1086. if$
  1087. " "
  1088. *
  1089. list.year field.or.null sortify
  1090. *
  1091. " "
  1092. *
  1093. title.field field.used =
  1094. { skip$ }
  1095. { title field.or.null
  1096. sort.format.title
  1097. *
  1098. }
  1099. if$
  1100. #1 entry.max$ substring$
  1101. 'sort.key$ :=
  1102. }
  1103. ITERATE {second.presort}
  1104. SORT
  1105. FUNCTION {begin.bib}
  1106. { newline$ newline$ "% Bibstyle aea.bst version 2009.05.20" write$ newline$ newline$
  1107. preamble$ empty$
  1108. 'skip$
  1109. { "\harvardpreambledefs{%" write$ newline$
  1110. preamble$ write$ "}" write$ newline$
  1111. "\harvardpreambletext{%" write$ newline$
  1112. preamble$ write$ "}" write$ newline$ }
  1113. if$
  1114. "\begin{thebibliography}{xx}" write$ newline$
  1115. }
  1116. EXECUTE {begin.bib}
  1117. ITERATE {call.type$}
  1118. FUNCTION {end.bib}
  1119. { newline$
  1120. "\end{thebibliography}" write$ newline$
  1121. }
  1122. EXECUTE {end.bib}