rsc.bst 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  1. %%
  2. %% This is file `rsc.bst',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% rsc.dtx (with options: `bst,rsc')
  8. %% ----------------------------------------------------------------
  9. %% rsc --- BibTeX styles for Royal Society of Chemistry and Wiley
  10. %% journals
  11. %% E-mail: joseph.wright@morningstar2.co.uk
  12. %% Released under the LaTeX Project Public License v1.3c or later
  13. %% See http://www.latex-project.org/lppl.txt
  14. %% ----------------------------------------------------------------
  15. %%
  16. ENTRY
  17. { address
  18. author
  19. booktitle
  20. chapter
  21. ctrl-use-title
  22. ctrl-etal-number
  23. ctrl-use-doi-all
  24. doi
  25. edition
  26. editor
  27. howpublished
  28. institution
  29. journal
  30. key
  31. note
  32. number
  33. organization
  34. pages
  35. publisher
  36. school
  37. series
  38. title
  39. type
  40. url
  41. volume
  42. year
  43. }
  44. {}
  45. { label
  46. extra.label
  47. short.list
  48. }
  49. INTEGERS { output.state before.all mid.sentence }
  50. INTEGERS { after.sentence after.block after.item }
  51. INTEGERS { author.or.editor }
  52. FUNCTION {init.state.consts}
  53. { #0 'before.all :=
  54. #1 'mid.sentence :=
  55. #2 'after.sentence :=
  56. #3 'after.block :=
  57. #4 'after.item :=
  58. }
  59. INTEGERS { is.use.title etal.number use.doi.all }
  60. %% #0 turns off the display of the title for articles
  61. %% #1 enables
  62. FUNCTION {default.is.use.title} { #0 }
  63. %% The number of names that force "et al." to be used
  64. FUNCTION {default.etal.number} { #0 }
  65. %% #0 turns off the display of the DOI for articles
  66. %% #1 enables
  67. FUNCTION {default.use.doi.all} { #0 }
  68. FUNCTION {add.comma}
  69. { ", " * }
  70. STRINGS { s t }
  71. FUNCTION {output.nonnull}
  72. { 's :=
  73. output.state mid.sentence =
  74. { add.comma write$ }
  75. { output.state after.block =
  76. { add.comma write$
  77. newline$
  78. "\newblock " write$
  79. }
  80. { output.state before.all =
  81. 'write$
  82. { output.state after.item =
  83. { " " * write$ }
  84. { add.period$ " " * write$ }
  85. if$
  86. }
  87. if$
  88. }
  89. if$
  90. mid.sentence 'output.state :=
  91. }
  92. if$
  93. s
  94. }
  95. FUNCTION {output}
  96. { duplicate$ empty$
  97. 'pop$
  98. 'output.nonnull
  99. if$
  100. }
  101. FUNCTION {output.check}
  102. { 't :=
  103. duplicate$ empty$
  104. { pop$ "Empty " t * " in " * cite$ * warning$ }
  105. 'output.nonnull
  106. if$
  107. }
  108. INTEGERS { would.add.period.textlen }
  109. FUNCTION {would.add.period}
  110. { duplicate$
  111. add.period$
  112. text.length$
  113. 'would.add.period.textlen :=
  114. duplicate$
  115. text.length$
  116. would.add.period.textlen =
  117. { #0 }
  118. { #1 }
  119. if$
  120. }
  121. FUNCTION {fin.entry}
  122. { would.add.period
  123. { "\relax" * write$ newline$
  124. "\mciteBstWouldAddEndPuncttrue" write$ newline$
  125. "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}"
  126. write$ newline$
  127. "{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax"
  128. }
  129. { "\relax" * write$ newline$
  130. "\mciteBstWouldAddEndPunctfalse" write$ newline$
  131. "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}"
  132. write$ newline$
  133. "{}{\mcitedefaultseppunct}\relax"
  134. }
  135. if$
  136. write$
  137. newline$
  138. "\EndOfBibitem" write$
  139. }
  140. FUNCTION {not}
  141. { { #0 }
  142. { #1 }
  143. if$
  144. }
  145. FUNCTION {and}
  146. { 'skip$
  147. { pop$ #0 }
  148. if$
  149. }
  150. FUNCTION {or}
  151. { { pop$ #1 }
  152. 'skip$
  153. if$
  154. }
  155. FUNCTION {field.or.null}
  156. { duplicate$ empty$
  157. { pop$ "" }
  158. 'skip$
  159. if$
  160. }
  161. FUNCTION {emphasize}
  162. { duplicate$ empty$
  163. { pop$ "" }
  164. { "\emph{" swap$ * "}" * }
  165. if$
  166. }
  167. FUNCTION {boldface}
  168. { duplicate$ empty$
  169. { pop$ "" }
  170. { "\textbf{" swap$ * "}" * }
  171. if$
  172. }
  173. FUNCTION {paren}
  174. { duplicate$ empty$
  175. { pop$ "" }
  176. { "(" swap$ * ")" * }
  177. if$
  178. }
  179. FUNCTION {bbl.and}
  180. { "and" }
  181. FUNCTION {bbl.chapter}
  182. { "ch." }
  183. FUNCTION {bbl.doi}
  184. { "DOI:" }
  185. FUNCTION {bbl.editor}
  186. { "ed." }
  187. FUNCTION {bbl.edition}
  188. { "edn" }
  189. FUNCTION {bbl.etal}
  190. { "et~al." emphasize }
  191. FUNCTION {bbl.in}
  192. { "in" }
  193. FUNCTION {bbl.inpress}
  194. { "in press" }
  195. FUNCTION {bbl.msc}
  196. { "MSc thesis" }
  197. FUNCTION {bbl.page}
  198. { "p." }
  199. FUNCTION {bbl.pages}
  200. { "pp." }
  201. FUNCTION {bbl.phd}
  202. { "PhD thesis" }
  203. FUNCTION {bbl.submitted}
  204. { "submitted for publication" }
  205. FUNCTION {bbl.techreport}
  206. { "Technical Report" }
  207. FUNCTION {bbl.volume}
  208. { "vol." }
  209. FUNCTION {bbl.first}
  210. { "1st" }
  211. FUNCTION {bbl.second}
  212. { "2nd" }
  213. FUNCTION {bbl.third}
  214. { "3rd" }
  215. FUNCTION {bbl.fourth}
  216. { "4th" }
  217. FUNCTION {bbl.fifth}
  218. { "5th" }
  219. FUNCTION {bbl.st}
  220. { "st" }
  221. FUNCTION {bbl.nd}
  222. { "nd" }
  223. FUNCTION {bbl.rd}
  224. { "rd" }
  225. FUNCTION {bbl.th}
  226. { "th" }
  227. FUNCTION {eng.ord}
  228. { duplicate$ "1" swap$ *
  229. #-2 #1 substring$ "1" =
  230. { bbl.th * }
  231. { duplicate$ #-1 #1 substring$
  232. duplicate$ "1" =
  233. { pop$ bbl.st * }
  234. { duplicate$ "2" =
  235. { pop$ bbl.nd * }
  236. { "3" =
  237. { bbl.rd * }
  238. { bbl.th * }
  239. if$
  240. }
  241. if$
  242. }
  243. if$
  244. }
  245. if$
  246. }
  247. INTEGERS{ l }
  248. FUNCTION{string.length}
  249. { #1 'l :=
  250. { duplicate$ duplicate$ #1 l substring$ = not }
  251. { l #1 + 'l := }
  252. while$
  253. pop$ l
  254. }
  255. STRINGS{replace find text}
  256. INTEGERS{find_length}
  257. FUNCTION{find.replace}
  258. { 'replace :=
  259. 'find :=
  260. 'text :=
  261. find string.length 'find_length :=
  262. ""
  263. { text empty$ not }
  264. { text #1 find_length substring$ find =
  265. { replace *
  266. text #1 find_length + global.max$ substring$ 'text :=
  267. }
  268. { text #1 #1 substring$ *
  269. text #2 global.max$ substring$ 'text :=
  270. }
  271. if$
  272. }
  273. while$
  274. }
  275. FUNCTION {chr.to.value}
  276. { chr.to.int$ #48 -
  277. duplicate$ duplicate$
  278. #0 < swap$ #9 > or
  279. { #48 + int.to.chr$
  280. " is not a number..." *
  281. warning$
  282. pop$ #0
  283. }
  284. {}
  285. if$
  286. }
  287. FUNCTION{is.a.digit}
  288. { duplicate$ "" =
  289. {pop$ #0}
  290. {chr.to.int$ #48 - duplicate$
  291. #0 < swap$ #9 > or not}
  292. if$
  293. }
  294. FUNCTION{is.a.number}
  295. {
  296. { duplicate$ #1 #1 substring$ is.a.digit }
  297. {#2 global.max$ substring$}
  298. while$
  299. "" =
  300. }
  301. FUNCTION {extract.num}
  302. { duplicate$ 't :=
  303. "" 's :=
  304. { t empty$ not }
  305. { t #1 #1 substring$
  306. t #2 global.max$ substring$ 't :=
  307. duplicate$ is.a.number
  308. { s swap$ * 's := }
  309. { pop$ "" 't := }
  310. if$
  311. }
  312. while$
  313. s empty$
  314. 'skip$
  315. { pop$ s }
  316. if$
  317. }
  318. FUNCTION {bibinfo.check}
  319. { swap$
  320. duplicate$ missing$
  321. { pop$ pop$
  322. ""
  323. }
  324. { duplicate$ empty$
  325. {
  326. swap$ pop$
  327. }
  328. { swap$
  329. pop$
  330. }
  331. if$
  332. }
  333. if$
  334. }
  335. FUNCTION {convert.edition}
  336. { extract.num "l" change.case$ 's :=
  337. s "first" = s "1" = or
  338. { bbl.first 't := }
  339. { s "second" = s "2" = or
  340. { bbl.second 't := }
  341. { s "third" = s "3" = or
  342. { bbl.third 't := }
  343. { s "fourth" = s "4" = or
  344. { bbl.fourth 't := }
  345. { s "fifth" = s "5" = or
  346. { bbl.fifth 't := }
  347. { s #1 #1 substring$ is.a.number
  348. { s eng.ord 't := }
  349. { edition 't := }
  350. if$
  351. }
  352. if$
  353. }
  354. if$
  355. }
  356. if$
  357. }
  358. if$
  359. }
  360. if$
  361. t
  362. }
  363. FUNCTION {tie.or.space.connect}
  364. { duplicate$ text.length$ #3 <
  365. { "~" }
  366. { " " }
  367. if$
  368. swap$ * *
  369. }
  370. FUNCTION {space.connect}
  371. { " " swap$ * * }
  372. INTEGERS { nameptr namesleft numnames }
  373. FUNCTION {format.names}
  374. { 's :=
  375. #1 'nameptr :=
  376. s num.names$ 'numnames :=
  377. numnames 'namesleft :=
  378. numnames etal.number > etal.number #0 > and
  379. { s #1 "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  380. t bbl.etal space.connect
  381. }
  382. {
  383. { namesleft #0 > }
  384. { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  385. nameptr #1 >
  386. { namesleft #1 >
  387. { add.comma t * }
  388. { numnames #2 >
  389. { "" * }
  390. 'skip$
  391. if$
  392. t "others" =
  393. { bbl.etal space.connect }
  394. { bbl.and space.connect t space.connect }
  395. if$
  396. }
  397. if$
  398. }
  399. 't
  400. if$
  401. nameptr #1 + 'nameptr :=
  402. namesleft #1 - 'namesleft :=
  403. }
  404. while$
  405. }
  406. if$
  407. }
  408. FUNCTION {format.authors}
  409. { author empty$
  410. { "" }
  411. { #1 'author.or.editor :=
  412. author format.names }
  413. if$
  414. }
  415. FUNCTION {strip.comma}
  416. { duplicate$
  417. string.length 'find_length :=
  418. duplicate$
  419. find_length #1 - #1 substring$
  420. "," =
  421. { #1 find_length #2 - substring$
  422. " " *
  423. }
  424. 'skip$
  425. if$
  426. }
  427. FUNCTION {format.editors}
  428. { editor empty$
  429. { "" }
  430. { #2 'author.or.editor :=
  431. bbl.editor " " * *
  432. editor format.names
  433. }
  434. if$
  435. }
  436. FUNCTION {format.doi}
  437. { use.doi.all
  438. { doi empty$
  439. { bbl.doi doi tie.or.space.connect output }
  440. 'skip$
  441. if$
  442. }
  443. 'skip$
  444. if$
  445. }
  446. FUNCTION {n.separate.multi}
  447. { 't :=
  448. ""
  449. #0 'numnames :=
  450. t text.length$ #4 > t is.a.number and
  451. {
  452. { t empty$ not }
  453. { t #-1 #1 substring$ is.a.number
  454. { numnames #1 + 'numnames := }
  455. { #0 'numnames := }
  456. if$
  457. t #-1 #1 substring$ swap$ *
  458. t #-2 global.max$ substring$ 't :=
  459. numnames #4 =
  460. { duplicate$ #1 #1 substring$ swap$
  461. #2 global.max$ substring$
  462. "\," swap$ * *
  463. #1 'numnames :=
  464. }
  465. 'skip$
  466. if$
  467. }
  468. while$
  469. }
  470. { t swap$ * }
  471. if$
  472. }
  473. FUNCTION {format.bvolume}
  474. { volume empty$
  475. { "" }
  476. { bbl.volume volume tie.or.space.connect }
  477. if$
  478. }
  479. FUNCTION {format.title.noemph}
  480. { 't :=
  481. t empty$
  482. { "" }
  483. { t }
  484. if$
  485. }
  486. FUNCTION {format.title}
  487. { 't :=
  488. t empty$
  489. { "" }
  490. { t emphasize }
  491. if$
  492. }
  493. FUNCTION {format.url}
  494. { url empty$
  495. { "" }
  496. { "\url{" url * "}" * }
  497. if$
  498. }
  499. FUNCTION {format.title.vol}
  500. { 't :=
  501. t empty$
  502. { "" }
  503. { t emphasize }
  504. if$
  505. volume empty$
  506. 'skip$
  507. { format.bvolume emphasize
  508. swap$ add.comma swap$ *
  509. }
  510. if$
  511. }
  512. FUNCTION {format.full.names}
  513. {'s :=
  514. #1 'nameptr :=
  515. s num.names$ 'numnames :=
  516. numnames 'namesleft :=
  517. { namesleft #0 > }
  518. { s nameptr
  519. "{vv~}{ll}" format.name$ 't :=
  520. nameptr #1 >
  521. {
  522. namesleft #1 >
  523. { ", " * t * }
  524. {
  525. numnames #2 >
  526. { "," * }
  527. 'skip$
  528. if$
  529. t "others" =
  530. { bbl.etal * }
  531. { bbl.and space.connect t space.connect }
  532. if$
  533. }
  534. if$
  535. }
  536. 't
  537. if$
  538. nameptr #1 + 'nameptr :=
  539. namesleft #1 - 'namesleft :=
  540. }
  541. while$
  542. }
  543. FUNCTION {author.editor.full}
  544. { author empty$
  545. { editor empty$
  546. { "" }
  547. { editor format.full.names }
  548. if$
  549. }
  550. { author format.full.names }
  551. if$
  552. }
  553. FUNCTION {author.full}
  554. { author empty$
  555. { "" }
  556. { author format.full.names }
  557. if$
  558. }
  559. FUNCTION {editor.full}
  560. { editor empty$
  561. { "" }
  562. { editor format.full.names }
  563. if$
  564. }
  565. FUNCTION {make.full.names}
  566. { type$ "book" =
  567. type$ "inbook" =
  568. or
  569. 'author.editor.full
  570. { type$ "proceedings" =
  571. 'editor.full
  572. 'author.full
  573. if$
  574. }
  575. if$
  576. }
  577. FUNCTION {output.bibitem} { newline$
  578. "\bibitem[" write$
  579. label write$
  580. ")" make.full.names duplicate$ short.list =
  581. { pop$ }
  582. { * }
  583. if$
  584. "]{" * write$
  585. cite$ write$
  586. "}" write$
  587. newline$
  588. ""
  589. before.all 'output.state :=
  590. }
  591. FUNCTION {n.dashify} { 't :=
  592. ""
  593. { t empty$ not }
  594. { t #1 #1 substring$ "-" =
  595. { t #1 #2 substring$ "--" = not
  596. { "--" *
  597. t #2 global.max$ substring$ 't :=
  598. }
  599. { { t #1 #1 substring$ "-" = }
  600. { "-" *
  601. t #2 global.max$ substring$ 't :=
  602. }
  603. while$
  604. }
  605. if$
  606. }
  607. { t #1 #1 substring$ *
  608. t #2 global.max$ substring$ 't :=
  609. }
  610. if$
  611. }
  612. while$
  613. }
  614. FUNCTION {format.date}
  615. { year empty$
  616. { "" }
  617. 'year
  618. if$
  619. }
  620. FUNCTION {format.bdate}
  621. { year empty$
  622. { "There's no year in " cite$ * warning$ }
  623. 'year
  624. if$
  625. }
  626. FUNCTION {either.or.check}
  627. { empty$
  628. 'pop$
  629. { "Can't use both " swap$ * " fields in "
  630. * cite$ * warning$ }
  631. if$
  632. }
  633. FUNCTION {format.edition}
  634. { edition duplicate$ empty$
  635. 'skip$
  636. { convert.edition
  637. bbl.edition bibinfo.check
  638. " " * bbl.edition *
  639. }
  640. if$
  641. }
  642. INTEGERS { multiresult }
  643. FUNCTION {multi.page.check}
  644. { 't :=
  645. #0 'multiresult :=
  646. { multiresult not
  647. t empty$ not
  648. and
  649. }
  650. { t #1 #1 substring$
  651. duplicate$ "-" =
  652. swap$ duplicate$ "," =
  653. swap$ "+" =
  654. or or
  655. { #1 'multiresult := }
  656. { t #2 global.max$ substring$ 't := }
  657. if$
  658. }
  659. while$
  660. multiresult
  661. }
  662. FUNCTION {format.pages}
  663. { pages empty$
  664. { "" }
  665. { pages multi.page.check
  666. { bbl.pages pages n.dashify tie.or.space.connect }
  667. { bbl.page pages tie.or.space.connect }
  668. if$
  669. }
  670. if$
  671. }
  672. FUNCTION {format.pages.required}
  673. { pages empty$
  674. { ""
  675. "There are no page numbers for " cite$ * warning$
  676. output
  677. }
  678. { pages multi.page.check
  679. { bbl.pages pages n.dashify tie.or.space.connect }
  680. { bbl.page pages tie.or.space.connect }
  681. if$
  682. }
  683. if$
  684. }
  685. FUNCTION {format.pages.nopp}
  686. { pages empty$
  687. { ""
  688. "There are no page numbers for " cite$ * warning$
  689. output
  690. }
  691. { pages multi.page.check
  692. { pages n.dashify space.connect }
  693. { pages space.connect }
  694. if$
  695. }
  696. if$
  697. }
  698. FUNCTION {format.pages.patent}
  699. { pages empty$
  700. { "There is no patent number for " cite$ * warning$ }
  701. { pages multi.page.check
  702. { pages n.dashify }
  703. { pages n.separate.multi }
  704. if$
  705. }
  706. if$
  707. }
  708. FUNCTION {format.vol.pages}
  709. { volume boldface field.or.null
  710. duplicate$ empty$
  711. { pop$ format.pages.required }
  712. { add.comma pages n.dashify * }
  713. if$
  714. }
  715. FUNCTION {format.chapter.pages}
  716. { chapter empty$
  717. 'format.pages
  718. { type empty$
  719. { bbl.chapter }
  720. { type "l" change.case$ }
  721. if$
  722. chapter tie.or.space.connect
  723. pages empty$
  724. 'skip$
  725. { add.comma format.pages * }
  726. if$
  727. }
  728. if$
  729. }
  730. FUNCTION {format.title.in}
  731. { 's :=
  732. s empty$
  733. { "" }
  734. { editor empty$
  735. { bbl.in s format.title space.connect }
  736. { bbl.in s format.title space.connect
  737. add.comma format.editors *
  738. }
  739. if$
  740. }
  741. if$
  742. }
  743. FUNCTION {format.title.vol.in}
  744. { 's :=
  745. after.item 'output.state :=
  746. s empty$
  747. { "" }
  748. { editor empty$
  749. { bbl.in s format.title.vol space.connect }
  750. { bbl.in s format.title.vol space.connect
  751. add.comma format.editors *
  752. }
  753. if$
  754. }
  755. if$
  756. }
  757. FUNCTION {format.pub.address}
  758. { publisher empty$
  759. { "" }
  760. { address empty$
  761. { publisher }
  762. { publisher add.comma address *}
  763. if$
  764. }
  765. if$
  766. }
  767. FUNCTION {empty.misc.check}
  768. { author empty$ title empty$ howpublished empty$
  769. year empty$ note empty$ url empty$
  770. and and and and and
  771. { "all relevant fields are empty in " cite$ * warning$ }
  772. 'skip$
  773. if$
  774. }
  775. FUNCTION {empty.doi.note}
  776. { doi empty$ note empty$ and
  777. { "Need either a note or DOI for " cite$ * warning$ }
  778. 'skip$
  779. if$
  780. }
  781. FUNCTION {format.thesis.type}
  782. { type empty$
  783. 'skip$
  784. { pop$
  785. type emphasize
  786. }
  787. if$
  788. }
  789. FUNCTION {article}
  790. { output.bibitem
  791. format.authors "author" output.check
  792. is.use.title
  793. { title format.title.noemph "title" output.check }
  794. 'skip$
  795. if$
  796. journal emphasize "journal" output.check
  797. format.date "year" output.check
  798. volume empty$
  799. { "" format.pages.nopp output }
  800. { format.vol.pages output }
  801. if$
  802. format.doi
  803. fin.entry
  804. }
  805. FUNCTION {book}
  806. { output.bibitem
  807. author empty$
  808. { title format.title "title" output.check
  809. editor empty$
  810. { "Need either an author or editor for "
  811. cite$ * warning$ }
  812. { "" format.editors * "editor" output.check }
  813. if$
  814. }
  815. { format.authors output
  816. "author and editor" editor either.or.check
  817. title format.title "title" output.check
  818. }
  819. if$
  820. format.pub.address "publisher" output.check
  821. format.edition output
  822. format.bdate "year" output.check
  823. format.bvolume output
  824. pages empty$
  825. 'skip$
  826. { format.pages output }
  827. if$
  828. format.doi
  829. fin.entry
  830. }
  831. FUNCTION {booklet}
  832. { output.bibitem
  833. format.authors output
  834. title format.title "title" output.check
  835. howpublished output
  836. address output
  837. format.date output
  838. format.doi
  839. fin.entry
  840. }
  841. FUNCTION {inbook}
  842. { output.bibitem
  843. author empty$
  844. { title format.title "title" output.check
  845. editor empty$
  846. { "Need at least an author or an editor for "
  847. cite$ * warning$ }
  848. { "" format.editors * "editor" output.check }
  849. if$
  850. }
  851. { format.authors output
  852. title format.title.in "title" output.check
  853. }
  854. if$
  855. format.pub.address "publisher" output.check
  856. format.edition output
  857. format.bdate "year" output.check
  858. format.bvolume output
  859. format.chapter.pages "chapter and pages" output.check
  860. format.doi
  861. fin.entry
  862. }
  863. FUNCTION {incollection}
  864. { output.bibitem
  865. author empty$
  866. { booktitle
  867. format.title
  868. "booktitle" output.check
  869. editor empty$
  870. { "Need at least an author or an editor for "
  871. cite$ * warning$ }
  872. { "" format.editors * "editor" output.check }
  873. if$
  874. }
  875. { format.authors output
  876. booktitle
  877. format.title
  878. "booktitle" output.check
  879. }
  880. if$
  881. format.pub.address "publisher" output.check
  882. format.edition output
  883. format.bdate "year" output.check
  884. format.bvolume output
  885. format.chapter.pages "chapter and pages" output.check
  886. format.doi
  887. fin.entry
  888. }
  889. FUNCTION {inpress}
  890. { output.bibitem
  891. format.authors "author" output.check
  892. journal emphasize "journal" output.check
  893. bbl.inpress output
  894. format.doi
  895. fin.entry
  896. }
  897. FUNCTION {inproceedings}
  898. { output.bibitem
  899. format.authors "author" output.check
  900. booktitle format.title.noemph "booktitle" output.check
  901. address output
  902. format.date "year" output.check
  903. pages empty$
  904. 'skip$
  905. { format.pages output }
  906. if$
  907. format.doi
  908. fin.entry
  909. }
  910. FUNCTION {manual}
  911. { output.bibitem
  912. author empty$
  913. { organization empty$
  914. 'skip$
  915. { organization output
  916. address output
  917. }
  918. if$
  919. }
  920. { format.authors output }
  921. if$
  922. title format.title "title" output.check
  923. author empty$
  924. { organization empty$
  925. { address output }
  926. 'skip$
  927. if$
  928. }
  929. { organization output
  930. address output
  931. }
  932. if$
  933. format.edition output
  934. format.date output
  935. format.doi
  936. fin.entry
  937. }
  938. FUNCTION {mastersthesis}
  939. { output.bibitem
  940. format.authors "author" output.check
  941. bbl.msc emphasize format.thesis.type output
  942. school "school" output.check
  943. address output
  944. format.date "year" output.check
  945. format.doi
  946. fin.entry
  947. }
  948. FUNCTION {misc}
  949. { output.bibitem
  950. format.authors output
  951. title empty$
  952. 'skip$
  953. { title format.title output }
  954. if$
  955. howpublished output
  956. year output
  957. format.url output
  958. note output
  959. format.doi
  960. fin.entry
  961. empty.misc.check
  962. }
  963. FUNCTION {patent}
  964. { output.bibitem
  965. organization empty$
  966. { format.authors "author and organization" output.check }
  967. { author empty$
  968. { organization }
  969. { format.authors organization paren space.connect }
  970. if$
  971. "author and organization" output.check
  972. }
  973. if$
  974. journal emphasize "journal" output.check
  975. format.pages.patent "pages" output.check
  976. format.date "year" output.check
  977. format.doi
  978. fin.entry
  979. }
  980. FUNCTION {phdthesis}
  981. { output.bibitem
  982. format.authors "author" output.check
  983. bbl.phd emphasize format.thesis.type output
  984. school "school" output.check
  985. address output
  986. format.date "year" output.check
  987. format.doi
  988. fin.entry
  989. }
  990. FUNCTION {proceedings}
  991. { output.bibitem
  992. title format.title.noemph "title" output.check
  993. address output
  994. format.date "year" output.check
  995. pages empty$
  996. 'skip$
  997. { format.pages output }
  998. if$
  999. format.doi
  1000. fin.entry
  1001. }
  1002. FUNCTION {techreport}
  1003. { output.bibitem
  1004. format.authors "author" output.check
  1005. title format.title "title" output.check
  1006. institution
  1007. type empty$
  1008. 'bbl.techreport
  1009. 'type
  1010. if$
  1011. space.connect
  1012. number empty$
  1013. { "t" change.case$ }
  1014. { number tie.or.space.connect }
  1015. if$
  1016. output
  1017. format.pub.address output
  1018. format.date "year" output.check
  1019. format.doi
  1020. fin.entry
  1021. }
  1022. FUNCTION {unpublished}
  1023. { output.bibitem
  1024. format.authors "author" output.check
  1025. journal empty$
  1026. 'skip$
  1027. { journal emphasize "journal" output.check }
  1028. if$
  1029. doi empty$
  1030. { note output }
  1031. {
  1032. format.date output
  1033. bbl.doi doi tie.or.space.connect output
  1034. }
  1035. if$
  1036. fin.entry
  1037. empty.doi.note
  1038. }
  1039. INTEGERS { a b }
  1040. FUNCTION {mult}
  1041. { 'a :=
  1042. 'b :=
  1043. b #0 <
  1044. {#-1 #0 b - 'b :=}
  1045. {#1}
  1046. if$
  1047. #0
  1048. {b #0 >}
  1049. { a +
  1050. b #1 - 'b :=
  1051. }
  1052. while$
  1053. swap$
  1054. 'skip$
  1055. {#0 swap$ -}
  1056. if$
  1057. }
  1058. FUNCTION {str.to.int.aux}
  1059. { {duplicate$ empty$ not}
  1060. { swap$ #10 mult 'a :=
  1061. duplicate$ #1 #1 substring$
  1062. chr.to.value a +
  1063. swap$
  1064. #2 global.max$ substring$
  1065. }
  1066. while$
  1067. pop$
  1068. }
  1069. FUNCTION {str.to.int}
  1070. { duplicate$ #1 #1 substring$ "-" =
  1071. {#1 swap$ #2 global.max$ substring$}
  1072. {#0 swap$}
  1073. if$
  1074. #0 swap$ str.to.int.aux
  1075. swap$
  1076. {#0 swap$ -}
  1077. {}
  1078. if$
  1079. }
  1080. FUNCTION {yes.no.to.int}
  1081. { "l" change.case$ duplicate$
  1082. "yes" =
  1083. { pop$ #1 }
  1084. { duplicate$ "no" =
  1085. { pop$ #0 }
  1086. { "unknown Boolean " quote$ * swap$ * quote$ *
  1087. " in " * cite$ * warning$
  1088. #0
  1089. }
  1090. if$
  1091. }
  1092. if$
  1093. }
  1094. FUNCTION {Control}
  1095. { ctrl-use-title
  1096. empty$
  1097. { skip$ }
  1098. { ctrl-use-title
  1099. yes.no.to.int
  1100. 'is.use.title := }
  1101. if$
  1102. ctrl-etal-number
  1103. empty$
  1104. { skip$ }
  1105. { ctrl-etal-number
  1106. str.to.int
  1107. 'etal.number := }
  1108. if$
  1109. ctrl-use-doi-all
  1110. empty$
  1111. { skip$ }
  1112. { ctrl-use-doi-all
  1113. yes.no.to.int
  1114. 'use.doi.all := }
  1115. if$
  1116. }
  1117. FUNCTION {conference} {inproceedings}
  1118. FUNCTION {other} {patent}
  1119. FUNCTION {default.type} {misc}
  1120. MACRO {jan} {"January"}
  1121. MACRO {feb} {"February"}
  1122. MACRO {mar} {"March"}
  1123. MACRO {apr} {"April"}
  1124. MACRO {may} {"May"}
  1125. MACRO {jun} {"June"}
  1126. MACRO {jul} {"July"}
  1127. MACRO {aug} {"August"}
  1128. MACRO {sep} {"September"}
  1129. MACRO {oct} {"October"}
  1130. MACRO {nov} {"November"}
  1131. MACRO {dec} {"December"}
  1132. READ
  1133. FUNCTION {initialize.controls}
  1134. { default.is.use.title 'is.use.title :=
  1135. default.etal.number 'etal.number :=
  1136. default.use.doi.all 'use.doi.all :=
  1137. }
  1138. INTEGERS { len }
  1139. FUNCTION {chop.word}
  1140. { 's :=
  1141. 'len :=
  1142. s #1 len substring$ =
  1143. { s len #1 + global.max$ substring$ }
  1144. 's
  1145. if$
  1146. }
  1147. FUNCTION {format.lab.names}
  1148. { 's :=
  1149. s #1 "{vv~}{ll}" format.name$
  1150. s num.names$ duplicate$
  1151. #2 >
  1152. { pop$ bbl.etal space.connect }
  1153. { #2 <
  1154. 'skip$
  1155. { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1156. { bbl.etal space.connect }
  1157. { bbl.and space.connect s #2 "{vv~}{ll}"
  1158. format.name$ space.connect }
  1159. if$
  1160. }
  1161. if$
  1162. }
  1163. if$
  1164. }
  1165. FUNCTION {author.key.label}
  1166. { author empty$
  1167. { key empty$
  1168. { cite$ #1 #3 substring$ }
  1169. 'key
  1170. if$
  1171. }
  1172. { author format.lab.names }
  1173. if$
  1174. }
  1175. FUNCTION {author.editor.key.label}
  1176. { author empty$
  1177. { editor empty$
  1178. { key empty$
  1179. { cite$ #1 #3 substring$ }
  1180. 'key
  1181. if$
  1182. }
  1183. { editor format.lab.names }
  1184. if$
  1185. }
  1186. { author format.lab.names }
  1187. if$
  1188. }
  1189. FUNCTION {author.key.organization.label}
  1190. { author empty$
  1191. { key empty$
  1192. { organization empty$
  1193. { cite$ #1 #3 substring$ }
  1194. { "The " #4 organization chop.word #3
  1195. text.prefix$ }
  1196. if$
  1197. }
  1198. 'key
  1199. if$
  1200. }
  1201. { author format.lab.names }
  1202. if$
  1203. }
  1204. FUNCTION {editor.key.organization.label}
  1205. { editor empty$
  1206. { key empty$
  1207. { organization empty$
  1208. { cite$ #1 #3 substring$ }
  1209. { "The " #4 organization chop.word #3
  1210. text.prefix$ }
  1211. if$
  1212. }
  1213. 'key
  1214. if$
  1215. }
  1216. { editor format.lab.names }
  1217. if$
  1218. }
  1219. FUNCTION {calc.short.authors}
  1220. { type$ "book" =
  1221. type$ "inbook" =
  1222. or
  1223. 'author.editor.key.label
  1224. { type$ "proceedings" =
  1225. 'editor.key.organization.label
  1226. { type$ "manual" =
  1227. 'author.key.organization.label
  1228. 'author.key.label
  1229. if$
  1230. }
  1231. if$
  1232. }
  1233. if$
  1234. 'short.list :=
  1235. }
  1236. FUNCTION {calc.label}
  1237. { calc.short.authors
  1238. short.list
  1239. "("
  1240. *
  1241. year duplicate$ empty$
  1242. short.list key field.or.null = or
  1243. { pop$ "" }
  1244. 'skip$
  1245. if$
  1246. *
  1247. 'label :=
  1248. }
  1249. ITERATE {calc.label}
  1250. STRINGS { longest.label last.label next.extra }
  1251. INTEGERS { longest.label.width last.extra.num number.label }
  1252. FUNCTION {initialize.longest.label}
  1253. { "" 'longest.label :=
  1254. #0 int.to.chr$ 'last.label :=
  1255. "" 'next.extra :=
  1256. #0 'longest.label.width :=
  1257. #0 'last.extra.num :=
  1258. #0 'number.label :=
  1259. }
  1260. FUNCTION {forward.pass}
  1261. { last.label label =
  1262. { last.extra.num #1 + 'last.extra.num :=
  1263. last.extra.num int.to.chr$ 'extra.label :=
  1264. }
  1265. { "a" chr.to.int$ 'last.extra.num :=
  1266. "" 'extra.label :=
  1267. label 'last.label :=
  1268. }
  1269. if$
  1270. number.label #1 + 'number.label :=
  1271. }
  1272. EXECUTE {initialize.longest.label}
  1273. ITERATE {forward.pass}
  1274. FUNCTION {begin.bib}
  1275. { preamble$ empty$
  1276. 'skip$
  1277. { preamble$ write$ newline$ }
  1278. if$
  1279. "\providecommand*{\mcitethebibliography}{\thebibliography}"
  1280. write$ newline$
  1281. "\csname @ifundefined\endcsname{endmcitethebibliography}"
  1282. write$ newline$
  1283. "{\let\endmcitethebibliography\endthebibliography}{}"
  1284. write$ newline$
  1285. "\begin{mcitethebibliography}{" number.label int.to.str$ * "}" *
  1286. write$ newline$
  1287. "\providecommand*{\natexlab}[1]{#1}"
  1288. write$ newline$
  1289. "\providecommand*{\mciteSetBstSublistMode}[1]{}"
  1290. write$ newline$
  1291. "\providecommand*{\mciteSetBstMaxWidthForm}[2]{}"
  1292. write$ newline$
  1293. "\providecommand*{\mciteBstWouldAddEndPuncttrue}"
  1294. write$ newline$
  1295. " {\def\EndOfBibitem{\unskip.}}"
  1296. write$ newline$
  1297. "\providecommand*{\mciteBstWouldAddEndPunctfalse}"
  1298. write$ newline$
  1299. " {\let\EndOfBibitem\relax}"
  1300. write$ newline$
  1301. "\providecommand*{\mciteSetBstMidEndSepPunct}[3]{}"
  1302. write$ newline$
  1303. "\providecommand*{\mciteSetBstSublistLabelBeginEnd}[3]{}"
  1304. write$ newline$
  1305. "\providecommand*{\EndOfBibitem}{}"
  1306. write$ newline$
  1307. "\mciteSetBstSublistMode{f}"
  1308. write$ newline$
  1309. "\mciteSetBstMaxWidthForm{subitem}"
  1310. write$ newline$
  1311. "{(\emph{\alph{mcitesubitemcount}})}"
  1312. write$ newline$
  1313. "\mciteSetBstSublistLabelBeginEnd{\mcitemaxwidthsubitemform\space}"
  1314. write$ newline$
  1315. "{\relax}{\relax}"
  1316. write$ newline$
  1317. }
  1318. EXECUTE {begin.bib}
  1319. EXECUTE {init.state.consts}
  1320. ITERATE {call.type$}
  1321. FUNCTION {end.bib}
  1322. { newline$
  1323. "\end{mcitethebibliography}" write$ newline$
  1324. }
  1325. EXECUTE {end.bib}
  1326. %%
  1327. %% Copyright (C) 2006-2009 by
  1328. %% Joseph Wright <joseph.wright@morningstar2.co.uk>
  1329. %%
  1330. %% It may be distributed and/or modified under the conditions of
  1331. %% the LaTeX Project Public License (LPPL), either version 1.3c of
  1332. %% this license or (at your option) any later version. The latest
  1333. %% version of this license is in the file:
  1334. %%
  1335. %% http://www.latex-project.org/lppl.txt
  1336. %%
  1337. %% This work is "maintained" (as per LPPL maintenance status) by
  1338. %% Joseph Wright.
  1339. %%
  1340. %% This work consists of the file rsc.dtx
  1341. %% and the derived files rsc.pdf,
  1342. %% rsc.ins,
  1343. %% rsc.sty,
  1344. %% rsc.bib and
  1345. %% rsc-demo.tex.
  1346. %%
  1347. %%
  1348. %%
  1349. %% End of file `rsc.bst'.