You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

english_dinatles.bst 43 KiB

пре 3 месеци
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952
  1. %% DINAT.BST Version 2.5 2000-11-14
  2. %% (c) Helge Baumann email:Helge.Baumann@gmx.de
  3. %%------------------------------------------------------------------------------
  4. %% For use with BibTeX version 0.99a or later.
  5. %%------------------------------------------------------------------------------
  6. %% Copying of this file is authorized only if either
  7. %% (1) you make absolutely no changes to your copy, including name, or
  8. %% (2) if you do make changes, you name it something other than dinat.bst,
  9. %% natdin.bst, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  10. %% This restriction helps ensure that all standard styles are identical.
  11. %%------------------------------------------------------------------------------
  12. %% This is a full author-year citation style bibliography. As such, it is
  13. %% non-standard LaTeX, and requires the natbib-package by Patrick W. Daly,
  14. %% version 7 or higher to function properly.
  15. %% It should be used with the following configuration in natbib.cfg:
  16. %% \newcommand{\bibstyle@dinat}%
  17. %% {\bibpunct{(}{)}{;}{a}{}{,~}%
  18. %% \gdef\NAT@biblabelnum##1{\textbf{##1}}}
  19. %%------------------------------------------------------------------------------
  20. %% The form of the \bibitem entries is
  21. %% \bibitem[Jones u. a.(1990)Jones, Baker und Smith]{key}...
  22. %% If there are more [Jones u. a. 1990], a single character is added to
  23. %% the year like in [Jones u.a.(1990{\natexlab{a}})Jones, Baker und Smith].
  24. %% The resulting bibliography entry is
  25. %% \textsc{Jones}, \textsc{Baker} und \textsc{Smith} ...
  26. %% The \cite command functions as follows:
  27. %% \cite{key} ==>> Jones u. a. (1990)
  28. %% \cite[chap. 2]{key} ==>> (Jones u. a. 1990, chap. 2)
  29. %% \cite[e.g.][]{key} ==>> (e.g. Jones u. a. 1990)
  30. %% \cite[e.g.][p. 32]{key} ==>> (e.g. Jones u. a. p. 32)
  31. %% \citep{key} ==>> (Jones u. a. 1990)
  32. %% \citep*{key} ==>> (Jones, Baker und Smith 1990)
  33. %% \citet{key} ==>> Jones u. a. (1990)
  34. %% \citet*{key} ==>> Jones, Baker und Smith (1990)
  35. %% \citeauthor{key} ==>> Jones u. a.
  36. %% \citeauthor*{key} ==>> Jones, Baker und Smith
  37. %% \citeyear{key} ==>> 1990
  38. %%------------------------------------------------------------------------------
  39. %% This bibliography style file is intended for texts in german.
  40. %% It draws up bibliographies in accordance with the german DIN 1505,
  41. %% part 2 and 3, as discribed in the german text
  42. %% http://www.fh-hamburg.de/pers/Lorenzen/tum/litverz.ps
  43. %%------------------------------------------------------------------------------
  44. %% This style is based on the natdin.bst style.
  45. %% The intention for designing a new style for the same result
  46. %% were the many bugs and the poor design of the original style.
  47. %% So i simplified the programming and add some comments for rework.
  48. %% The names of the functions were changed to reflect their functionality:
  49. %% out.*: write the top of the stack to the bbl-file
  50. %% format.*: format the top of the stack
  51. %% push.*: put one item on top of the stack
  52. %%------------------------------------------------------------------------------
  53. %% There are some non standard fields for most entries:
  54. %% isbn: international book number
  55. %% issn: internation journal number
  56. %% url: for electronic published documents or additional information
  57. %% if there is no publisher and address, the url is used instead,
  58. %% else it acts like a additional note
  59. %% urldate: the date of the access to the url
  60. %%------------------------------------------------------------------------------
  61. %% Author(s):
  62. %% HB: Helge Baumann, helge.baumann@gmx.de
  63. %%------------------------------------------------------------------------------
  64. %% History:
  65. %% (only main changes are listed, for others see the webpage)
  66. %% 2000-04-10 (HB): Initial release
  67. %% 2000-04-18 (HB): Version 1.1:
  68. %% corrected some typos and oversights
  69. %% minor changes in output
  70. %% 2000-04-25 (HB): Version 1.2:
  71. %% dinat only: added \natexlab
  72. %% using full key/cite for label
  73. %% 2000-05-02 (HB): Version 2.0:
  74. %% added urldate for date of visit
  75. %% added labels in bibliography, so the seperate
  76. %% style dinnat.bst is not needed anymore
  77. %% 2000-05-09 (HB): Version 2.1:
  78. %% removed blanc in bibpunct
  79. %% put text ("u.\,a." ...) in functions
  80. %% rebuild some push functions
  81. %% changed \cite to \citep
  82. %% removed push.crossref.editor (not used)
  83. %% 2000-07-12 (HB): version 2.2:
  84. %% added push.crossref
  85. %% changed many crossrefs
  86. %% corrected typos
  87. %% put \, in curly braces
  88. %% 2000-10-03 (HB): version 2.3:
  89. %% changed remaining "u.~a."
  90. %% added \labelsep behind dinatlabel
  91. %% added mastersthesis again, keeping (wrong)
  92. %% masterthesis (sorry for that)
  93. %% minor changes in proceedings
  94. %% 2000-11-05 (HB): version 2.4:
  95. %% improved inbook
  96. %% removed extra period from proceedings
  97. %% added missing colon in misc
  98. %% improved name formatting
  99. %% removed long dashes from ISBN/ISSN
  100. %% restructured format.dashes
  101. %% 2000-11-14 (HB): version 2.5:
  102. %% always use key for label if present
  103. %%------------------------------------------------------------------------------
  104. %%——————————————————————————
  105. %% push standard text items on top of the stack
  106. %%——————————————————————————
  107. FUNCTION {push.bd} { "Volume" }
  108. FUNCTION {push.diplom} { "Master thesis" }
  109. FUNCTION {push.disser} { "Ph.D. thesis" }
  110. FUNCTION {push.forschung} { "Research Report" }
  111. FUNCTION {push.hrsg} { "Editor" }
  112. FUNCTION {push.in} { "In:" }
  113. FUNCTION {push.isbn} { "ISBN" }
  114. FUNCTION {push.issn} { "ISSN" }
  115. FUNCTION {push.kap} { "Chap." }
  116. FUNCTION {push.nr} { "Nr." }
  117. FUNCTION {push.sn} { "p" }
  118. FUNCTION {push.s} { "p." }
  119. FUNCTION {push.siehe} { "see" }
  120. FUNCTION {push.ua} { "et\,al." }
  121. FUNCTION {push.und} { "and" }
  122. FUNCTION {push.url.name} { "URL" }
  123. FUNCTION {push.veranst} { "event" }
  124. FUNCTION {push.von} { "by" }
  125. FUNCTION {push.zugriff} { "date visited" }
  126. FUNCTION {push.cite} { "\citep" }
  127. %%------------------------------------------------------------------------------
  128. %% Definitions for every bibliography entry
  129. %%------------------------------------------------------------------------------
  130. ENTRY
  131. % fields (crossref is default)
  132. { address
  133. author
  134. booktitle
  135. chapter
  136. edition
  137. editor
  138. howpublished
  139. institution
  140. isbn
  141. issn
  142. journal
  143. key
  144. month
  145. note
  146. number
  147. organization
  148. pages
  149. publisher
  150. school
  151. series
  152. title
  153. type
  154. url
  155. urldate
  156. volume
  157. year
  158. }
  159. % INTEGERS
  160. {}
  161. % STRINGS (sort.key$ is default)
  162. { label extra.label sort.label short.list dinat.label }
  163. %%——————————————————————————
  164. %% required macros for abbr. names of month
  165. %%——————————————————————————
  166. MACRO {jan} {"january"}
  167. MACRO {feb} {"february"}
  168. MACRO {mar} {"march"}
  169. MACRO {apr} {"april"}
  170. MACRO {may} {"may"}
  171. MACRO {jun} {"june"}
  172. MACRO {jul} {"july"}
  173. MACRO {aug} {"august"}
  174. MACRO {sep} {"september"}
  175. MACRO {oct} {"october"}
  176. MACRO {nov} {"november"}
  177. MACRO {dec} {"december"}
  178. %%------------------------------------------------------------------------------
  179. %% macros for common journals
  180. %%------------------------------------------------------------------------------
  181. MACRO {acmcs} {"ACM Computing Surveys"}
  182. MACRO {acta} {"Acta Informatica"}
  183. MACRO {cacm} {"Communications of the ACM"}
  184. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  185. MACRO {ibmsj} {"IBM Systems Journal"}
  186. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  187. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  188. MACRO {ieeetcad}
  189. {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  190. MACRO {ipl} {"Information Processing Letters"}
  191. MACRO {jacm} {"Journal of the ACM"}
  192. MACRO {jcss} {"Journal of Computer and System Sciences"}
  193. MACRO {scp} {"Science of Computer Programming"}
  194. MACRO {sicomp} {"SIAM Journal on Computing"}
  195. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  196. MACRO {tods} {"ACM Transactions on Database Systems"}
  197. MACRO {tog} {"ACM Transactions on Graphics"}
  198. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  199. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  200. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  201. MACRO {tcs} {"Theoretical Computer Science"}
  202. %%------------------------------------------------------------------------------
  203. %% for debugging (not used)
  204. %%------------------------------------------------------------------------------
  205. FUNCTION {show}
  206. % show quoted top of stack
  207. { duplicate$ ":::: `" swap$ * "'" * top$
  208. }
  209. FUNCTION {show.stack}
  210. % show and clear whole stack
  211. { "STACK====================================================================="
  212. top$
  213. stack$
  214. "ENDSTACK=================================================================="
  215. top$
  216. }
  217. %%------------------------------------------------------------------------------
  218. %% logical functions
  219. %%------------------------------------------------------------------------------
  220. FUNCTION {not}
  221. { { #0 }
  222. { #1 }
  223. if$
  224. }
  225. FUNCTION {and}
  226. { { skip$ }
  227. { pop$ #0 }
  228. if$
  229. }
  230. FUNCTION {or}
  231. { { pop$ #1 }
  232. { skip$ }
  233. if$
  234. }
  235. %%------------------------------------------------------------------------------
  236. %% variables for the recent output state
  237. %%------------------------------------------------------------------------------
  238. INTEGERS { output.state
  239. before.all
  240. mid.sentence
  241. after.sentence
  242. after.block
  243. colon.after
  244. period.dash }
  245. FUNCTION {init.state.consts}
  246. % initialisation of the state variables
  247. { #0 'before.all :=
  248. #1 'mid.sentence :=
  249. #2 'after.sentence :=
  250. #3 'after.block :=
  251. #4 'colon.after :=
  252. #5 'period.dash :=
  253. }
  254. FUNCTION {set.period.dash}
  255. % set ". -- "
  256. { output.state before.all =
  257. { skip$ }
  258. { period.dash 'output.state := }
  259. if$
  260. }
  261. FUNCTION {set.period.dash.check}
  262. % only if not empty
  263. { empty$
  264. { skip$ }
  265. { set.period.dash }
  266. if$
  267. }
  268. FUNCTION {set.colon.after}
  269. % set ": "
  270. { output.state before.all =
  271. { skip$ }
  272. { colon.after 'output.state := }
  273. if$
  274. }
  275. FUNCTION {new.sentence}
  276. % set ". "
  277. { output.state before.all =
  278. { skip$ }
  279. { after.sentence 'output.state := }
  280. if$
  281. }
  282. FUNCTION {new.sentence.check}
  283. % only if not empty
  284. { empty$
  285. { skip$ }
  286. { new.sentence }
  287. if$
  288. }
  289. FUNCTION {part.of.sentence}
  290. % set ", "
  291. { output.state before.all =
  292. { skip$ }
  293. { mid.sentence 'output.state := }
  294. if$
  295. }
  296. %%------------------------------------------------------------------------------
  297. %% output lines to bbl. file
  298. %%------------------------------------------------------------------------------
  299. STRINGS { h s t u v }
  300. FUNCTION {out.block}
  301. % writes the second but last element with seperator
  302. { 's :=
  303. output.state after.block =
  304. { add.period$ write$
  305. newline$
  306. "\newblock " write$
  307. }
  308. { output.state before.all =
  309. { write$ }
  310. { output.state colon.after =
  311. { ": " * write$
  312. newline$
  313. "\newblock " write$
  314. }
  315. { output.state period.dash =
  316. { ". -- " * write$
  317. newline$
  318. "\newblock " write$
  319. }
  320. { output.state mid.sentence =
  321. { ", " * write$ }
  322. { write$
  323. newline$
  324. "\newblock " write$
  325. }
  326. if$
  327. }
  328. if$
  329. }
  330. if$
  331. }
  332. if$
  333. after.block 'output.state :=
  334. }
  335. if$
  336. s
  337. }
  338. FUNCTION {out}
  339. % write only if not empty
  340. { duplicate$ empty$
  341. { pop$ }
  342. { out.block }
  343. if$
  344. }
  345. FUNCTION {out.check.required}
  346. % write if not empty, else drop warning
  347. { 't :=
  348. duplicate$ empty$
  349. { pop$ "empty " t * " in " * cite$ * warning$ }
  350. { out.block }
  351. if$
  352. }
  353. FUNCTION {out.check.din}
  354. % write if not empty, else drop note
  355. { 't :=
  356. duplicate$ empty$
  357. { pop$ "DIN: empty " t * " in " * cite$ * top$ }
  358. { out.block }
  359. if$
  360. }
  361. %%------------------------------------------------------------------------------
  362. %% format entries for full author/editor citations
  363. %%------------------------------------------------------------------------------
  364. INTEGERS { nameptr namesleft pos len }
  365. FUNCTION {format.full.names}
  366. % format all names
  367. { 's :=
  368. ""
  369. #1 'nameptr :=
  370. s num.names$ 'namesleft :=
  371. { namesleft #0 > } % while
  372. { s nameptr "{vv~}{ll}" format.name$ 't :=
  373. nameptr #1 =
  374. { % first name
  375. t *
  376. }
  377. { namesleft #1 =
  378. { % last name
  379. t "others" =
  380. { " " * push.ua * }
  381. { " " * push.und * " " * t * }
  382. if$
  383. }
  384. { % other names
  385. ", " * t *
  386. }
  387. if$
  388. }
  389. if$
  390. nameptr #1 + 'nameptr :=
  391. namesleft #1 - 'namesleft :=
  392. }
  393. while$ % { namesleft #0 > }
  394. }
  395. FUNCTION {key.full}
  396. { key empty$
  397. { cite$ }
  398. { key }
  399. if$
  400. }
  401. FUNCTION {author.key.full}
  402. { author empty$
  403. { key.full }
  404. { author format.full.names }
  405. if$
  406. }
  407. FUNCTION {editor.key.full}
  408. { editor empty$
  409. { key.full }
  410. { editor format.full.names }
  411. if$
  412. }
  413. FUNCTION {author.editor.key.full}
  414. { author empty$
  415. { editor.key.full }
  416. { author format.full.names }
  417. if$
  418. }
  419. FUNCTION {make.full.names}
  420. { type$ "book" =
  421. type$ "inbook" =
  422. or
  423. { author.editor.key.full }
  424. { type$ "proceedings" =
  425. { editor.key.full }
  426. { author.key.full }
  427. if$
  428. }
  429. if$
  430. }
  431. %%------------------------------------------------------------------------------
  432. %% write bibentry to bbl. file
  433. %%------------------------------------------------------------------------------
  434. FUNCTION {out.bibitem.start}
  435. % start of entry
  436. { newline$
  437. "\bibitem[" label * ")" *
  438. make.full.names
  439. duplicate$ short.list =
  440. { pop$ }
  441. { * }
  442. if$
  443. "]{" * cite$ * "}" *
  444. write$
  445. newline$
  446. "\dinatlabel{" dinat.label * "} " *
  447. write$
  448. ""
  449. before.all 'output.state :=
  450. }
  451. FUNCTION {out.bibitem.end}
  452. % end of entry
  453. {add.period$ write$
  454. newline$
  455. }
  456. %%------------------------------------------------------------------------------
  457. %% format text
  458. %%------------------------------------------------------------------------------
  459. FUNCTION {format.emphasize}
  460. % emphasize top of stack
  461. { duplicate$ empty$
  462. { pop$ "" }
  463. { "\emph{" swap$ * "}" * }
  464. if$
  465. }
  466. FUNCTION {format.smallcaps}
  467. % top of stack in small caps
  468. { duplicate$ empty$
  469. { pop$ "" }
  470. { "\textsc{" swap$ * "}" * }
  471. if$
  472. }
  473. FUNCTION {format.dashes}
  474. % replace single dashes (-) with tex-styled dashes (--)
  475. { 't :=
  476. ""
  477. { t empty$ not } % while$
  478. { t #1 #2 substring$ "--" =
  479. { { t #1 #1 substring$ "-" = }
  480. { "-" *
  481. t #2 global.max$ substring$ 't :=
  482. }
  483. while$
  484. }
  485. { t #1 #1 substring$ "-" =
  486. { "--" * }
  487. { t #1 #1 substring$ * }
  488. if$
  489. t #2 global.max$ substring$ 't :=
  490. }
  491. if$
  492. }
  493. while$ % { t empty$ not }
  494. }
  495. %%------------------------------------------------------------------------------
  496. %% manipulte entries on the stack
  497. %%------------------------------------------------------------------------------
  498. FUNCTION {tie.or.space.connect}
  499. % connect two top items with space or ~, if second is shorter than 3
  500. { duplicate$ text.length$ #3 <
  501. { "~" }
  502. { " " }
  503. if$
  504. swap$ * *
  505. }
  506. FUNCTION {push.field.or.null}
  507. % push an empty item on the stack if it's a missing entry
  508. { duplicate$ empty$
  509. { pop$ "" }
  510. { skip$ }
  511. if$
  512. }
  513. %%------------------------------------------------------------------------------
  514. %% format text on stack
  515. %%------------------------------------------------------------------------------
  516. STRINGS { hrsg }
  517. FUNCTION {format.names}
  518. % format all names on top of stack
  519. { 's :=
  520. ""
  521. #1 'nameptr :=
  522. s num.names$ 'namesleft :=
  523. { namesleft #0 > } % while names left
  524. { % first get last name in small caps
  525. s nameptr "{ll}" format.name$ 't :=
  526. t format.smallcaps 't :=
  527. % second get all first names
  528. s nameptr "{, ff}" format.name$ 'u :=
  529. u text.length$ 'len :=
  530. #1 'pos :=
  531. "" 'v :=
  532. { pos len < } % while
  533. { u pos #1 substring$ "~" =
  534. { v "" =
  535. { u #1 pos #1 - substring$ 'v := }
  536. { skip$ }
  537. if$
  538. % cut second and more first names
  539. v u pos #2 substring$ * "." * 'v :=
  540. }
  541. { skip$ }
  542. if$
  543. pos #1 + 'pos :=
  544. }
  545. while$ % { pos len < }
  546. v "" =
  547. { u 'v := }
  548. { skip$ }
  549. if$
  550. % third get all "von"
  551. s nameptr "{ vv}" format.name$ 'u :=
  552. % put it all together
  553. t v * u * hrsg * 't :=
  554. nameptr #1 =
  555. { %first name
  556. t *
  557. }
  558. { namesleft #1 =
  559. { % last name
  560. t "others" format.smallcaps =
  561. t "others" format.smallcaps hrsg * =
  562. or
  563. { " " * push.ua * }
  564. { "~; " * t * }
  565. if$
  566. }
  567. { % other names
  568. "~; " * t *
  569. }
  570. if$
  571. }
  572. if$
  573. nameptr #1 + 'nameptr :=
  574. namesleft #1 - 'namesleft :=
  575. }
  576. while$ % { namesleft #0 > }
  577. "" 'hrsg :=
  578. }
  579. %%------------------------------------------------------------------------------
  580. %% push formatted or empty field(s) on top of the stack
  581. %%------------------------------------------------------------------------------
  582. FUNCTION {push.authors}
  583. % format author names
  584. { author empty$
  585. { "" }
  586. { author format.names }
  587. if$
  588. }
  589. FUNCTION {push.editors}
  590. % format editor names
  591. { editor empty$
  592. { "" }
  593. { " (" push.hrsg * ")" * 'hrsg :=
  594. editor format.names
  595. }
  596. if$
  597. }
  598. FUNCTION {push.authors.editors}
  599. % format author and/or editor names
  600. { author empty$
  601. { push.editors }
  602. { push.authors
  603. editor empty$
  604. { skip$ }
  605. { "~; " * push.editors * }
  606. if$
  607. }
  608. if$
  609. }
  610. FUNCTION {push.organization}
  611. % format organization
  612. { organization empty$
  613. { "" }
  614. { organization
  615. " (" * push.veranst * ")" *
  616. }
  617. if$
  618. }
  619. FUNCTION {push.title}
  620. % title as in entry
  621. { title empty$
  622. { "" }
  623. { title }
  624. if$
  625. }
  626. FUNCTION {push.url}
  627. % prefixed with "URL" and special formatting
  628. { url empty$
  629. { "" }
  630. { push.url.name " \url{" * url * "}" *
  631. urldate empty$
  632. { skip$ }
  633. { ". -- " * push.zugriff * ": " * urldate * }
  634. if$
  635. }
  636. if$
  637. }
  638. FUNCTION {push.date}
  639. % format: month year
  640. { year empty$
  641. { month empty$
  642. { "" }
  643. { "there's a month but no year in " cite$ * warning$
  644. month
  645. }
  646. if$
  647. }
  648. { month empty$
  649. { year }
  650. { month " " * year * }
  651. if$
  652. }
  653. if$
  654. }
  655. FUNCTION {push.address.publisher.year}
  656. % the whole imprint
  657. { address empty$
  658. { publisher empty$
  659. { url empty$
  660. { year empty$
  661. { "no publisher, address, url or date in " cite$ * warning$
  662. "" }
  663. { push.date }
  664. if$
  665. }
  666. { "no proper publisher, using url in " cite$ * warning$
  667. push.url
  668. year empty$
  669. { skip$ }
  670. { ", " * push.date * }
  671. if$
  672. }
  673. if$
  674. }
  675. { publisher
  676. year empty$
  677. { "there's a publisher but no year in " cite$ * warning$ }
  678. { ", " * push.date * }
  679. if$
  680. }
  681. if$
  682. }
  683. { address
  684. publisher empty$
  685. { "there's an address but no publisher in " cite$ * warning$ }
  686. { "~: " * publisher * }
  687. if$
  688. year empty$
  689. { skip$ }
  690. { ", " * push.date * }
  691. if$
  692. }
  693. if$
  694. }
  695. FUNCTION {push.btitle}
  696. % the booktitle
  697. { title empty$
  698. { "" }
  699. { title format.emphasize }
  700. if$
  701. }
  702. FUNCTION {push.btitle.vol}
  703. % booktitle in multivolume works
  704. { number empty$
  705. { series empty$
  706. { push.btitle
  707. volume empty$
  708. { skip$ }
  709. { ". " * push.bd * volume tie.or.space.connect }
  710. if$
  711. }
  712. { volume empty$
  713. { push.btitle }
  714. { series format.emphasize ". " *
  715. push.bd * volume tie.or.space.connect
  716. ": " * push.btitle *
  717. }
  718. if$
  719. }
  720. if$
  721. }
  722. { push.btitle }
  723. if$
  724. }
  725. FUNCTION {push.article.in.journal}
  726. % source of article
  727. { journal empty$
  728. { "" }
  729. { author missing$
  730. title missing$
  731. and
  732. { journal format.emphasize }
  733. { push.in " " * journal format.emphasize * }
  734. if$
  735. }
  736. if$
  737. }
  738. FUNCTION {push.series.number}
  739. % series and number like DIN
  740. { volume empty$
  741. { series empty$
  742. { number empty$
  743. { "" }
  744. { "there's a number but no series in " cite$ * warning$
  745. "(" number * ")" * }
  746. if$
  747. }
  748. { "(" series *
  749. number empty$
  750. { skip$ }
  751. { number tie.or.space.connect }
  752. if$
  753. ")" *
  754. }
  755. if$
  756. }
  757. { series empty$
  758. { "" }
  759. { type$ "proceedings" =
  760. { "(" series *
  761. number empty$
  762. { skip$ }
  763. { number tie.or.space.connect }
  764. if$
  765. ")" *
  766. }
  767. { "" }
  768. if$
  769. }
  770. if$
  771. }
  772. if$
  773. }
  774. FUNCTION {push.misc.series}
  775. % series in MISC
  776. { series empty$
  777. { "" }
  778. { "(" series * ")" * }
  779. if$
  780. }
  781. FUNCTION {push.edition}
  782. % like in entry
  783. { edition empty$
  784. { "" }
  785. { edition }
  786. if$
  787. }
  788. FUNCTION {push.isbn.issn}
  789. % preceeded with ISSN/ISBN
  790. { isbn empty$
  791. { issn empty$
  792. { "" }
  793. { push.issn " " * issn * }
  794. if$
  795. }
  796. { push.isbn " " * isbn * }
  797. if$
  798. }
  799. FUNCTION {push.pages.book}
  800. % as length of a book
  801. { pages empty$
  802. { "" }
  803. { pages format.dashes "~" * push.sn * }
  804. if$
  805. }
  806. FUNCTION {push.pages}
  807. % as part of a book
  808. { pages empty$
  809. { "" }
  810. { push.s "~" * pages format.dashes * }
  811. if$
  812. }
  813. FUNCTION {push.vol.year.num.pages}
  814. % for journals etc.
  815. { volume push.field.or.null
  816. year empty$
  817. { "there's no year in " cite$ * warning$ }
  818. { duplicate$ empty$
  819. { pop$ "(" }
  820. { " (" * }
  821. if$
  822. year * ")" *
  823. }
  824. if$
  825. month empty$
  826. { skip$ }
  827. { duplicate$ empty$
  828. { pop$ month }
  829. { ", " * month * }
  830. if$
  831. }
  832. if$
  833. number empty$
  834. { skip$ }
  835. { duplicate$ empty$
  836. { pop$ push.nr }
  837. { ", " * push.nr * }
  838. if$
  839. "~" * number *
  840. }
  841. if$
  842. pages empty$
  843. { skip$ }
  844. { duplicate$ empty$
  845. { skip$ }
  846. { ", " *
  847. title missing$
  848. { push.pages.book * }
  849. { push.pages * }
  850. if$
  851. }
  852. if$
  853. }
  854. if$
  855. }
  856. FUNCTION {push.chapter.pages}
  857. % chapter and pages
  858. { chapter empty$
  859. { push.pages }
  860. { type empty$
  861. { push.kap }
  862. { type }
  863. if$
  864. chapter tie.or.space.connect
  865. pages empty$
  866. { skip$ }
  867. { ", " * push.pages * }
  868. if$
  869. }
  870. if$
  871. }
  872. FUNCTION {push.in.ed.booktitle}
  873. % main title and volume
  874. { booktitle empty$
  875. { "" }
  876. { push.in " " *
  877. editor empty$
  878. { skip$ }
  879. { push.editors * ": " * }
  880. if$
  881. booktitle format.emphasize *
  882. volume empty$
  883. { skip$ }
  884. { " " * push.bd * "~" * volume * }
  885. if$
  886. }
  887. if$
  888. }
  889. FUNCTION {push.mastersthesis.type}
  890. % type of a mastersthesis
  891. { type empty$
  892. { push.diplom }
  893. { type }
  894. if$
  895. }
  896. FUNCTION {push.phdthesis.type}
  897. % type of a phdthesis
  898. { type empty$
  899. { push.disser }
  900. { type }
  901. if$
  902. }
  903. FUNCTION {push.tr.number}
  904. % type and number of a technical report
  905. { number empty$
  906. { " " }
  907. { "(" number * "). " * }
  908. if$
  909. "-- " *
  910. type empty$
  911. { push.forschung * }
  912. { type * }
  913. if$
  914. }
  915. FUNCTION {push.article.crossref}
  916. % article from a journal
  917. { key empty$
  918. { journal empty$
  919. { "need key or journal for " cite$ * " to crossref " * crossref *
  920. warning$
  921. ""
  922. }
  923. { push.in " " * journal format.emphasize * }
  924. if$
  925. }
  926. { push.in " " * key * }
  927. if$
  928. " " * push.cite * "{" * crossref * "}" *
  929. pages empty$
  930. { skip$ }
  931. { ", " * push.pages * }
  932. if$
  933. }
  934. FUNCTION {push.book.crossref}
  935. % crossreference in BOOKs
  936. { volume empty$
  937. { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  938. push.siehe
  939. }
  940. { ". -- " push.bd * "~" * volume *
  941. " " * push.von *
  942. }
  943. if$
  944. " " * push.cite * "{" * crossref * "}" *
  945. }
  946. FUNCTION {push.incoll.inproc.crossref}
  947. % crossreference with In:
  948. { editor empty$
  949. editor push.field.or.null author push.field.or.null =
  950. or
  951. { key empty$
  952. { booktitle empty$
  953. { push.siehe }
  954. { push.in " " * booktitle format.emphasize * "." * }
  955. if$
  956. }
  957. { push.in }
  958. if$
  959. }
  960. { push.in }
  961. if$
  962. " " * push.cite * "{" * crossref * "}" *
  963. chapter empty$
  964. { skip$ }
  965. { ", " *
  966. type empty$
  967. { push.kap * }
  968. { type * }
  969. if$
  970. chapter tie.or.space.connect
  971. }
  972. if$
  973. pages empty$
  974. { skip$ }
  975. { ", " * push.pages * }
  976. if$
  977. }
  978. FUNCTION {push.crossref}
  979. % a simple crossref
  980. { crossref empty$
  981. { "" }
  982. { push.siehe " " * push.cite * "{" * crossref * "}" * }
  983. if$
  984. }
  985. %%------------------------------------------------------------------------------
  986. %% functions for the different entries
  987. %%------------------------------------------------------------------------------
  988. FUNCTION {article}
  989. % required: author, title, journal, year
  990. % optional: volume, number, pages, month, note, url, issn
  991. { out.bibitem.start
  992. push.authors "author" out.check.required
  993. set.colon.after
  994. push.title "title" out.check.required
  995. crossref missing$
  996. { push.article.in.journal out.block
  997. new.sentence
  998. push.vol.year.num.pages out
  999. }
  1000. { push.article.crossref out.block }
  1001. if$
  1002. url set.period.dash.check
  1003. push.url out
  1004. note set.period.dash.check
  1005. note out
  1006. issn set.period.dash.check
  1007. push.isbn.issn out
  1008. out.bibitem.end
  1009. }
  1010. FUNCTION {book}
  1011. % required: author/editor, title, publisher, year
  1012. % optional: volume oder number, series, address, edition, pages, month,
  1013. % note, url, isbn
  1014. { out.bibitem.start
  1015. author empty$
  1016. { push.editors "author and editor" out.check.required }
  1017. { push.authors.editors out.block }
  1018. if$
  1019. set.colon.after
  1020. crossref missing$
  1021. { push.btitle.vol }
  1022. { push.btitle }
  1023. if$
  1024. "title" out.check.required
  1025. push.edition out
  1026. push.address.publisher.year "publisher" out.check.required
  1027. new.sentence
  1028. crossref missing$
  1029. { push.series.number out }
  1030. { push.book.crossref out.block }
  1031. if$
  1032. pages set.period.dash.check
  1033. push.pages.book out
  1034. address empty$
  1035. publisher empty$
  1036. and
  1037. { skip$ }
  1038. { url set.period.dash.check
  1039. push.url out
  1040. }
  1041. if$
  1042. note set.period.dash.check
  1043. note out
  1044. isbn set.period.dash.check
  1045. push.isbn.issn out
  1046. out.bibitem.end
  1047. }
  1048. % booklet see below
  1049. % conference see below
  1050. FUNCTION {inbook}
  1051. % required: author/editor, title, chapter/pages, publisher, year
  1052. % optional: volume oder number, series, type, address, month, note, url, isbn
  1053. { out.bibitem.start
  1054. author empty$
  1055. { push.editors "author and editor" out.check.required }
  1056. { push.authors out.block }
  1057. if$
  1058. set.colon.after
  1059. push.btitle.vol "title" out.check.required
  1060. push.chapter.pages out
  1061. crossref missing$
  1062. { push.in.ed.booktitle "booktitle" out.check.required
  1063. address empty$
  1064. { part.of.sentence
  1065. push.address.publisher.year out
  1066. }
  1067. { push.address.publisher.year "publisher" out.check.required }
  1068. if$
  1069. new.sentence
  1070. series empty$
  1071. { skip$ }
  1072. { push.series.number out }
  1073. if$
  1074. part.of.sentence
  1075. address empty$
  1076. publisher empty$
  1077. and
  1078. { skip$ }
  1079. { url set.period.dash.check
  1080. push.url out
  1081. }
  1082. if$
  1083. }
  1084. { push.crossref out.block
  1085. url set.period.dash.check
  1086. push.url out
  1087. }
  1088. if$
  1089. note set.period.dash.check
  1090. note out
  1091. isbn set.period.dash.check
  1092. push.isbn.issn out
  1093. out.bibitem.end
  1094. }
  1095. FUNCTION {incollection}
  1096. % required: author, title, booktitle, publisher, year
  1097. % optional: editor, volume oder number, series, type, chapter,
  1098. % pages, address, edition, month, note, url
  1099. { out.bibitem.start
  1100. push.authors "author" out.check.required
  1101. set.colon.after
  1102. push.title "title" out.check.required
  1103. crossref missing$
  1104. { push.in.ed.booktitle "booktitle" out.check.required
  1105. push.edition out
  1106. push.address.publisher.year "publisher" out.check.required
  1107. new.sentence
  1108. push.series.number out
  1109. part.of.sentence
  1110. push.chapter.pages "pages" out.check.required
  1111. address empty$
  1112. publisher empty$
  1113. and
  1114. { skip$ }
  1115. { url set.period.dash.check
  1116. push.url out
  1117. }
  1118. if$
  1119. }
  1120. { push.incoll.inproc.crossref out.block
  1121. url set.period.dash.check
  1122. push.url out
  1123. }
  1124. if$
  1125. note set.period.dash.check
  1126. note out
  1127. isbn set.period.dash.check
  1128. issn set.period.dash.check
  1129. push.isbn.issn out
  1130. out.bibitem.end
  1131. }
  1132. FUNCTION {inproceedings}
  1133. % required: author, title, booktitle, year
  1134. % optional: editor, volume oder number, series, pages, address, month,
  1135. % organization, publisher, note, url
  1136. { out.bibitem.start
  1137. push.authors "author" out.check.required
  1138. set.colon.after
  1139. push.title "title" out.check.required
  1140. crossref missing$
  1141. { push.in.ed.booktitle "booktitle" out.check.required
  1142. address empty$
  1143. { organization new.sentence.check
  1144. push.organization out
  1145. part.of.sentence
  1146. push.address.publisher.year out
  1147. }
  1148. { push.address.publisher.year "publisher" out.check.required }
  1149. if$
  1150. new.sentence
  1151. series empty$
  1152. { skip$ }
  1153. { push.series.number out }
  1154. if$
  1155. part.of.sentence
  1156. push.pages "pages" out.check.required
  1157. address empty$
  1158. publisher empty$
  1159. and
  1160. { skip$ }
  1161. { url set.period.dash.check
  1162. push.url out
  1163. }
  1164. if$
  1165. }
  1166. { push.incoll.inproc.crossref out.block
  1167. url set.period.dash.check
  1168. push.url out
  1169. }
  1170. if$
  1171. note set.period.dash.check
  1172. note out
  1173. isbn set.period.dash.check
  1174. issn set.period.dash.check
  1175. push.isbn.issn out
  1176. out.bibitem.end
  1177. }
  1178. FUNCTION {manual}
  1179. % required: title
  1180. % optional: author, organization, address, edition, month, year, note, url
  1181. { out.bibitem.start
  1182. author empty$
  1183. { organization empty$
  1184. { title empty$
  1185. { skip$ }
  1186. { push.btitle "title" out.check.required }
  1187. if$
  1188. }
  1189. { push.organization out.block
  1190. set.colon.after
  1191. push.btitle "title" out.check.required
  1192. }
  1193. if$
  1194. }
  1195. { push.authors out.block
  1196. set.colon.after
  1197. push.btitle "title" out.check.required
  1198. }
  1199. if$
  1200. push.edition "edition" out.check.required
  1201. author empty$
  1202. { organization empty$
  1203. { address out
  1204. part.of.sentence
  1205. }
  1206. { skip$ }
  1207. if$
  1208. }
  1209. { address ": " * push.organization * out
  1210. part.of.sentence
  1211. }
  1212. if$
  1213. push.date out
  1214. pages set.period.dash.check
  1215. push.pages.book out
  1216. url set.period.dash.check
  1217. push.url out
  1218. note set.period.dash.check
  1219. note out
  1220. out.bibitem.end
  1221. }
  1222. FUNCTION {mastersthesis}
  1223. % required: author, title, school, year
  1224. % optional: type, address, month, note, url
  1225. { out.bibitem.start
  1226. push.authors "author" out.check.required
  1227. set.colon.after
  1228. push.btitle "title" out.check.required
  1229. address out
  1230. part.of.sentence
  1231. school "school" out.check.required
  1232. part.of.sentence
  1233. push.mastersthesis.type out.block
  1234. part.of.sentence
  1235. push.date "year" out.check.required
  1236. pages set.period.dash.check
  1237. push.pages.book out
  1238. url set.period.dash.check
  1239. push.url out
  1240. note set.period.dash.check
  1241. note out
  1242. out.bibitem.end
  1243. }
  1244. FUNCTION {misc}
  1245. % required:
  1246. % optional: author, title, howpublished, month, year, note, url
  1247. { out.bibitem.start
  1248. note empty$
  1249. { title empty$
  1250. { skip$ }
  1251. { push.authors.editors out.block
  1252. set.colon.after
  1253. push.btitle out
  1254. howpublished out
  1255. push.date out
  1256. push.crossref out
  1257. url set.period.dash.check
  1258. push.url out
  1259. }
  1260. if$
  1261. }
  1262. { note #1 #4 substring$ "u" change.case$ "NORM" =
  1263. { note out
  1264. part.of.sentence
  1265. push.date out
  1266. push.title format.emphasize out
  1267. push.crossref out
  1268. }
  1269. { author empty$
  1270. { editor empty$
  1271. { organization empty$
  1272. { skip$ }
  1273. { push.organization out.block
  1274. set.colon.after
  1275. }
  1276. if$
  1277. }
  1278. { push.editors push.organization * out.block
  1279. set.colon.after
  1280. }
  1281. if$
  1282. }
  1283. { push.authors.editors out.block
  1284. set.colon.after
  1285. }
  1286. if$
  1287. push.btitle out
  1288. push.crossref out
  1289. howpublished out
  1290. push.date out
  1291. new.sentence
  1292. push.misc.series out
  1293. url set.period.dash.check
  1294. push.url out
  1295. note set.period.dash.check
  1296. note out
  1297. }
  1298. if$
  1299. }
  1300. if$
  1301. out.bibitem.end
  1302. }
  1303. FUNCTION {phdthesis}
  1304. % required: author, title, school, year
  1305. % optional: type, address, month, note, url
  1306. { out.bibitem.start
  1307. push.authors "author" out.check.required
  1308. set.colon.after
  1309. push.btitle "title" out.check.required
  1310. address out
  1311. part.of.sentence
  1312. school "school" out.check.required
  1313. part.of.sentence
  1314. push.phdthesis.type out.block
  1315. part.of.sentence
  1316. push.date "year" out.check.required
  1317. pages set.period.dash.check
  1318. push.pages.book out
  1319. url set.period.dash.check
  1320. push.url out
  1321. note set.period.dash.check
  1322. note out
  1323. out.bibitem.end
  1324. }
  1325. FUNCTION {proceedings}
  1326. % required: title, year
  1327. % optional: editor, volume oder number, series, address, month,
  1328. % organization, publisher, note, url
  1329. { out.bibitem.start
  1330. editor empty$
  1331. { push.organization }
  1332. { push.editors
  1333. organization empty$
  1334. { skip$ }
  1335. { "~; " * push.organization * }
  1336. if$
  1337. }
  1338. if$
  1339. out.block
  1340. set.colon.after
  1341. push.btitle "title" out.check.required
  1342. volume empty$
  1343. { skip$ }
  1344. { push.bd "~" * volume format.emphasize * out.block }
  1345. if$
  1346. push.address.publisher.year "publisher" out.check.required
  1347. push.series.number out
  1348. pages set.period.dash.check
  1349. push.pages.book out
  1350. address empty$
  1351. publisher empty$
  1352. and
  1353. { skip$ }
  1354. { url set.period.dash.check
  1355. push.url out
  1356. }
  1357. if$
  1358. note set.period.dash.check
  1359. note out
  1360. isbn set.period.dash.check
  1361. issn set.period.dash.check
  1362. push.isbn.issn out
  1363. out.bibitem.end
  1364. }
  1365. FUNCTION {techreport}
  1366. % required: author, title, institution, year
  1367. % optional: type, number, address, month, note, url
  1368. { out.bibitem.start
  1369. author empty$
  1370. { push.editors "author and editor" out.check.required }
  1371. { push.authors.editors out.block }
  1372. if$
  1373. set.colon.after
  1374. push.title "title" out.check.required
  1375. institution empty$
  1376. { skip$ }
  1377. { institution new.sentence.check
  1378. "/ " institution * out.block
  1379. }
  1380. if$
  1381. push.address.publisher.year out
  1382. number new.sentence.check
  1383. push.tr.number "number" out.check.required
  1384. pages set.period.dash.check
  1385. push.pages.book out
  1386. address empty$
  1387. publisher empty$
  1388. and
  1389. { skip$ }
  1390. { url set.period.dash.check
  1391. push.url out
  1392. }
  1393. if$
  1394. note "note" out.check.required
  1395. isbn set.period.dash.check
  1396. issn set.period.dash.check
  1397. push.isbn.issn out
  1398. out.bibitem.end
  1399. }
  1400. FUNCTION {booklet}
  1401. % required: title
  1402. % optional: author, howpublished, address, month, year, note, url
  1403. { misc % so far
  1404. }
  1405. FUNCTION {conference}
  1406. % required: author, title, note
  1407. % optional: month, year, url
  1408. { inproceedings % like stated in BibTeXing by O. Patashnik
  1409. }
  1410. FUNCTION {masterthesis}
  1411. % required: author, title, school, year
  1412. % optional: type, address, month, note, url
  1413. { mastersthesis % just because of a typo in former version
  1414. }
  1415. FUNCTION {unpublished}
  1416. % required: author, title, note
  1417. % optional: month, year, url
  1418. { misc % so far
  1419. }
  1420. FUNCTION {default.type}
  1421. % all other types
  1422. { misc
  1423. }
  1424. %%------------------------------------------------------------------------------
  1425. %% for producing the labels
  1426. %%------------------------------------------------------------------------------
  1427. FUNCTION {sortify}
  1428. % simplify for sorting
  1429. { purify$
  1430. "l" change.case$
  1431. }
  1432. FUNCTION {chop.word}
  1433. % cut a word
  1434. { 's :=
  1435. 'len :=
  1436. s #1 len substring$ =
  1437. { s len #1 + global.max$ substring$ }
  1438. { s }
  1439. if$
  1440. }
  1441. FUNCTION {chop.article}
  1442. % cut article from a word
  1443. { 't :=
  1444. "A " #2
  1445. "An " #3
  1446. "Der " #4
  1447. "Die " #4
  1448. "Das " #4
  1449. "Ein " #4
  1450. "Eine " #5
  1451. "The " #4 t chop.word
  1452. chop.word
  1453. chop.word
  1454. chop.word
  1455. chop.word
  1456. chop.word
  1457. chop.word
  1458. chop.word
  1459. }
  1460. FUNCTION {format.lab.names}
  1461. % format names for the label
  1462. { 's :=
  1463. s #1 "{vv~}{ll}" format.name$
  1464. s num.names$ duplicate$
  1465. #2 >
  1466. { pop$ " " * push.ua * }
  1467. { #2 <
  1468. { skip$ }
  1469. { s #2 "{ll}" format.name$ "others" =
  1470. { " " * push.ua * }
  1471. { " " * push.und * " " * s #2 "{vv~}{ll}" format.name$ * }
  1472. if$
  1473. }
  1474. if$
  1475. }
  1476. if$
  1477. }
  1478. FUNCTION {author.label}
  1479. % label from key or author
  1480. { key empty$
  1481. { author empty$
  1482. { cite$ }
  1483. { author format.lab.names }
  1484. if$
  1485. }
  1486. { key }
  1487. if$
  1488. }
  1489. FUNCTION {author.editor.label}
  1490. % label from key, author or editor
  1491. { key empty$
  1492. { author empty$
  1493. { editor empty$
  1494. { cite$ }
  1495. { editor format.lab.names }
  1496. if$
  1497. }
  1498. { author format.lab.names }
  1499. if$
  1500. }
  1501. { key }
  1502. if$
  1503. }
  1504. FUNCTION {author.organization.label}
  1505. % label from key, author or organization
  1506. { key empty$
  1507. { author empty$
  1508. { organization empty$
  1509. { cite$ }
  1510. { organization chop.article }
  1511. if$
  1512. }
  1513. { author format.lab.names }
  1514. if$
  1515. }
  1516. { key }
  1517. if$
  1518. }
  1519. FUNCTION {editor.organization.label}
  1520. % label from key, editor or organization
  1521. { key empty$
  1522. { editor empty$
  1523. { organization empty$
  1524. { cite$ }
  1525. { organization chop.article }
  1526. if$
  1527. }
  1528. { editor format.lab.names }
  1529. if$
  1530. }
  1531. { key }
  1532. if$
  1533. }
  1534. FUNCTION {calc.short.authors}
  1535. % make short label (only first author)
  1536. { type$ "book" =
  1537. type$ "inbook" =
  1538. or
  1539. { author.editor.label }
  1540. { type$ "proceedings" =
  1541. { editor.organization.label }
  1542. { type$ "manual" =
  1543. { author.organization.label }
  1544. { author.label }
  1545. if$
  1546. }
  1547. if$
  1548. }
  1549. if$
  1550. 'short.list :=
  1551. }
  1552. FUNCTION {calc.label}
  1553. % make a full label
  1554. { calc.short.authors
  1555. short.list "(" *
  1556. year push.field.or.null format.dashes * 'label :=
  1557. short.list " " *
  1558. year push.field.or.null format.dashes * 'dinat.label :=
  1559. label sortify 'sort.label :=
  1560. }
  1561. %%------------------------------------------------------------------------------
  1562. %% sorting
  1563. %%------------------------------------------------------------------------------
  1564. FUNCTION {sort.format.names}
  1565. % format names for sorting
  1566. { 's :=
  1567. #1 'nameptr :=
  1568. ""
  1569. s num.names$ 'namesleft :=
  1570. { namesleft #0 > } % while
  1571. { nameptr #1 =
  1572. { skip$ }
  1573. { " " * }
  1574. if$
  1575. s nameptr "{ll{ }}{ ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
  1576. namesleft #1 =
  1577. t "others" =
  1578. and
  1579. { "[" * push.ua * "]" * }
  1580. { t sortify * }
  1581. if$
  1582. nameptr #1 + 'nameptr :=
  1583. namesleft #1 - 'namesleft :=
  1584. }
  1585. while$ % { namesleft #0 > }
  1586. }
  1587. FUNCTION {sort.format.title}
  1588. % format title for sorting (without article)
  1589. { chop.article
  1590. sortify
  1591. #1 global.max$ substring$
  1592. }
  1593. FUNCTION {author.sort}
  1594. % author or key for sorting
  1595. { key empty$
  1596. { author empty$
  1597. { "to sort, need author or key in " cite$ * warning$
  1598. ""
  1599. }
  1600. { author sort.format.names }
  1601. if$
  1602. }
  1603. { key sortify }
  1604. if$
  1605. }
  1606. FUNCTION {author.editor.sort}
  1607. % author, editor or key for sorting
  1608. { key empty$
  1609. { author empty$
  1610. { editor empty$
  1611. { "to sort, need author, editor, or key in " cite$ * warning$
  1612. ""
  1613. }
  1614. { editor sort.format.names }
  1615. if$
  1616. }
  1617. { author sort.format.names }
  1618. if$
  1619. }
  1620. { key sortify }
  1621. if$
  1622. }
  1623. FUNCTION {author.organization.sort}
  1624. % author, organization or key for sorting
  1625. { key empty$
  1626. { author empty$
  1627. { organization empty$
  1628. { "to sort, need author, organization, or key in " cite$ * warning$
  1629. ""
  1630. }
  1631. { organization chop.article sortify }
  1632. if$
  1633. }
  1634. { author sort.format.names }
  1635. if$
  1636. }
  1637. { key sortify }
  1638. if$
  1639. }
  1640. FUNCTION {editor.organization.sort}
  1641. % editor, organization or key for sorting
  1642. { key empty$
  1643. { editor empty$
  1644. { organization empty$
  1645. { "to sort, need editor, organization, or key in " cite$ * warning$
  1646. ""
  1647. }
  1648. { organization chop.article sortify }
  1649. if$
  1650. }
  1651. { editor sort.format.names }
  1652. if$
  1653. }
  1654. { key sortify }
  1655. if$
  1656. }
  1657. FUNCTION {presort}
  1658. % first sort
  1659. { calc.label
  1660. sort.label
  1661. " " *
  1662. type$ "book" =
  1663. type$ "inbook" =
  1664. or
  1665. { author.editor.sort }
  1666. { type$ "proceedings" =
  1667. { editor.organization.sort }
  1668. { type$ "manual" =
  1669. { author.organization.sort }
  1670. { author.sort }
  1671. if$
  1672. }
  1673. if$
  1674. }
  1675. if$
  1676. " " *
  1677. year push.field.or.null sortify *
  1678. " " *
  1679. title push.field.or.null sort.format.title *
  1680. #1 entry.max$ substring$
  1681. 'sort.label :=
  1682. sort.label *
  1683. #1 entry.max$ substring$
  1684. 'sort.key$ :=
  1685. }
  1686. STRINGS { last.label next.extra }
  1687. INTEGERS { last.extra.num label.count }
  1688. FUNCTION {initialize.label}
  1689. { "" 'last.label :=
  1690. #0 'label.count :=
  1691. }
  1692. FUNCTION {forward.pass}
  1693. % find maximum additional character for identical labels
  1694. { last.label label =
  1695. { last.extra.num #1 + 'last.extra.num :=
  1696. last.extra.num int.to.chr$ 'extra.label :=
  1697. }
  1698. { "a" chr.to.int$ 'last.extra.num :=
  1699. "" 'extra.label :=
  1700. label 'last.label :=
  1701. }
  1702. if$
  1703. label.count #1 + 'label.count :=
  1704. }
  1705. FUNCTION {reverse.pass}
  1706. % add additional characters to identical labels
  1707. { next.extra "b" =
  1708. { "a" 'extra.label := }
  1709. { skip$ }
  1710. if$
  1711. extra.label 'next.extra :=
  1712. extra.label empty$
  1713. { "" }
  1714. { "{\natexlab{" extra.label * "}}" * }
  1715. if$
  1716. 'extra.label :=
  1717. label extra.label * 'label :=
  1718. dinat.label extra.label * 'dinat.label :=
  1719. }
  1720. FUNCTION {bib.sort.order}
  1721. { sort.label 'sort.key$ :=
  1722. }
  1723. %%------------------------------------------------------------------------------
  1724. %% making the bbl. file
  1725. %%------------------------------------------------------------------------------
  1726. FUNCTION {begin.bib}
  1727. % beginning of the file
  1728. { preamble$ empty$
  1729. { skip$ }
  1730. { preamble$
  1731. write$
  1732. newline$
  1733. }
  1734. if$
  1735. "\begin{thebibliography}{" label.count int.to.str$ * "}" *
  1736. write$
  1737. newline$
  1738. "% this bibliography was produced with the style dinat.bst v2.5"
  1739. write$
  1740. newline$
  1741. "\makeatletter"
  1742. write$
  1743. newline$
  1744. "\newcommand{\dinatlabel}[1]%"
  1745. write$
  1746. newline$
  1747. "{\ifNAT@numbers\else\NAT@biblabelnum{#1}\hspace{2\labelsep}\fi}"
  1748. write$
  1749. newline$
  1750. "\makeatother"
  1751. write$
  1752. newline$
  1753. "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
  1754. write$
  1755. newline$
  1756. "\expandafter\ifx\csname url\endcsname\relax\def\url#1{\texttt{#1}}\fi"
  1757. write$
  1758. newline$
  1759. }
  1760. FUNCTION {end.bib}
  1761. % end of the bbl. file
  1762. { newline$
  1763. "\end{thebibliography}" write$ newline$
  1764. }
  1765. %%------------------------------------------------------------------------------
  1766. %% processing the .bib file
  1767. %%------------------------------------------------------------------------------
  1768. READ
  1769. ITERATE {presort}
  1770. SORT
  1771. EXECUTE {initialize.label}
  1772. ITERATE {forward.pass}
  1773. REVERSE {reverse.pass}
  1774. ITERATE {bib.sort.order}
  1775. SORT
  1776. EXECUTE {begin.bib}
  1777. EXECUTE {init.state.consts}
  1778. ITERATE {call.type$}
  1779. EXECUTE {end.bib}