LaTeX forum ⇒ BibTeX, biblatex and biberYou can't pop an empty literal stack for entry ... while executing---line ... of file ...

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
teub
Posts: 3
Joined: Fri Dec 07, 2018 2:55 pm

You can't pop an empty literal stack for entry ... while executing---line ... of file ...

Postby teub » Fri Dec 07, 2018 3:10 pm

Dear experts,
I have been provided a file to handle references in a project and after some modifications of this file, I am able to have all my references displayed nicely. But I have numerous warnings as :

You can't pop an empty literal stack for entry ESPP2013 while executing---line 1235 of file fcc.bst


This entry is a Misc (I have intentionnaly removed informations in title, Url and HowPublished)
Note that this warning happens for all type of entries defined in the fcc.bst file.

  1. @Misc{ESPP2013,
  2. Title = {{The title}},
  3. Url = {https://.../...},
  4. Year = {2013},
  5. HowPublished = {{Document}}
  6. }


I have seen several topics for this kind of issue but after 1 day of investigations, my lack of knowledge asked me to talk in this forum. So I would like you to help me to understand what is making this warning (I have hundreds of them).
The fcc.bst file content is :

  1. % ...
  2. %
  3. % ...
  4. %
  5. % History:
  6. % 2008-11-06 (MC) fixed bugs in format.collaboration and format.journal
  7. % 2008-10-24 (MC) changed journal, title and \etal italicization
  8. % 2008-10-22 (MC) adapted collaboration entry from
  9. % ...
  10. %
  11.  
  12. ENTRY
  13. { address
  14. author
  15. booktitle
  16. chapter
  17. edition
  18. editor
  19. howpublished
  20. institution
  21. journal
  22. key
  23. month
  24. note
  25. number
  26. organization
  27. pages
  28. publisher
  29. school
  30. series
  31. title
  32. type
  33. volume
  34. year
  35. archive
  36. eprint
  37. report
  38. collaboration
  39. SLACcitation
  40. archivePrefix
  41. primaryClass
  42. url
  43. doi
  44. }
  45. {}
  46. { label }
  47.  
  48. INTEGERS { output.state before.all mid.sentence after.quote after.sentence
  49. after.quoted.block after.block }
  50.  
  51. FUNCTION {init.state.consts}
  52. { #0 'before.all :=
  53. #1 'mid.sentence :=
  54. #2 'after.quote :=
  55. #3 'after.sentence :=
  56. #4 'after.quoted.block :=
  57. #5 'after.block :=
  58. }
  59.  
  60. STRINGS { s t }
  61.  
  62. FUNCTION {output.nonnull}
  63. { 's :=
  64. output.state mid.sentence =
  65. { ", " * write$ }
  66. { output.state after.quote =
  67. { " " * write$ }
  68. { output.state after.block =
  69. { add.period$ write$
  70. newline$
  71. "\newblock " write$
  72. }
  73. { output.state before.all =
  74. 'write$
  75. { output.state after.quoted.block =
  76. { write$
  77. newline$
  78. "\newblock " write$
  79. }
  80. { add.period$ " " * write$ }
  81. if$
  82. }
  83. if$
  84. }
  85. if$
  86. }
  87. if$
  88. mid.sentence 'output.state :=
  89. }
  90. if$
  91. s
  92. }
  93. FUNCTION {output}
  94. { duplicate$ empty$
  95. 'pop$
  96. 'output.nonnull
  97. if$
  98. }
  99. FUNCTION {output.check}
  100. { 't :=
  101. duplicate$ empty$
  102. { pop$ "empty " t * " in " * cite$ * warning$ }
  103. 'output.nonnull
  104. if$
  105. }
  106. FUNCTION {output.bibitem}
  107. { newline$
  108. "\bibitem{" write$
  109. cite$ write$
  110. "}" write$
  111. newline$
  112. ""
  113. before.all 'output.state :=
  114. }
  115. FUNCTION {blank.sep}
  116. { after.quote 'output.state :=
  117. }
  118. FUNCTION {fin.entry}
  119. { output.state after.quoted.block =
  120. 'skip$
  121. 'add.period$
  122. if$
  123. write$
  124. newline$
  125. }
  126.  
  127. FUNCTION {new.block}
  128. { output.state before.all =
  129. 'skip$
  130. { output.state after.quote =
  131. { after.quoted.block 'output.state := }
  132. { after.block 'output.state := }
  133. if$
  134. }
  135. if$
  136. }
  137. FUNCTION {new.sentence}
  138. { output.state after.block =
  139. 'skip$
  140. { output.state before.all =
  141. 'skip$
  142. { after.sentence 'output.state := }
  143. if$
  144. }
  145. if$
  146. }
  147. FUNCTION {not}
  148. { { #0 }
  149. { #1 }
  150. if$
  151. }
  152.  
  153. FUNCTION {and}
  154. { 'skip$
  155. { pop$ #0 }
  156. if$
  157. }
  158. FUNCTION {or}
  159. { { pop$ #1 }
  160. 'skip$
  161. if$
  162. }
  163.  
  164. FUNCTION {new.block.checka}
  165. { empty$
  166. 'skip$
  167. % 'new.block
  168. if$
  169. }
  170.  
  171. FUNCTION {new.block.checkb}
  172. { empty$
  173. swap$ empty$
  174. and
  175. 'skip$
  176. % 'new.block
  177. if$
  178. }
  179.  
  180. FUNCTION {new.sentence.checka}
  181. { empty$
  182. 'skip$
  183. 'new.sentence
  184. if$
  185. }
  186.  
  187. FUNCTION {field.or.null}
  188. { duplicate$ empty$
  189. { pop$ "" }
  190. 'skip$
  191. if$
  192. }
  193. FUNCTION {emphasize}
  194. { duplicate$ empty$
  195. { pop$ "" }
  196. { "{\em " swap$ * "}" * }
  197. if$
  198. }
  199.  
  200. FUNCTION {capitalize}
  201. { "u" change.case$ "t" change.case$ }
  202.  
  203. INTEGERS { nameptr namesleft numnames }
  204.  
  205. FUNCTION {format.names}
  206. { 's :=
  207. #1 'nameptr :=
  208. s num.names$ 'numnames :=
  209. numnames 'namesleft :=
  210. { namesleft #0 > }
  211. { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  212. nameptr #1 >
  213. { namesleft #1 >
  214. { ", " * t * }
  215. { numnames #2 >
  216. { "," * }
  217. 'skip$
  218. if$
  219. t "others" =
  220. { " et al." * }
  221. { " and " * t * }
  222. if$
  223. }
  224. if$
  225. }
  226. 't
  227. if$
  228. nameptr #1 + 'nameptr :=
  229. namesleft #1 - 'namesleft :=
  230. }
  231. while$
  232. }
  233.  
  234. FUNCTION {format.authors}
  235. { author empty$
  236. { "" }
  237. { author format.names }
  238. if$
  239. }
  240.  
  241. FUNCTION {format.archive}
  242. {
  243. archivePrefix empty$
  244. { "" }
  245. { archivePrefix ":" *}
  246. if$
  247. }
  248.  
  249. FUNCTION {format.primaryClass}
  250. {
  251. primaryClass empty$
  252. { "" }
  253. { "\,[" primaryClass * "]" *}
  254. if$
  255. }
  256.  
  257. FUNCTION {format.eprint}
  258. { eprint empty$
  259. { ""}
  260. { archive empty$
  261. {"\href{http://arxiv.org/abs/" eprint * "}" *
  262. "{{\tt " * format.archive * eprint *
  263. format.primaryClass * "}}" *}
  264. {"\href{" archive * "/" * eprint * "}" *
  265. "{{\tt " * format.archive * eprint *
  266. format.primaryClass * "}}" *}
  267. if$
  268. }
  269. if$
  270. }
  271.  
  272. FUNCTION {format.url}
  273. { url empty$
  274. { "" }
  275. {"\url{" url * "}" *}
  276. if$
  277. }
  278.  
  279. FUNCTION {add.doi}
  280. { duplicate$ empty$
  281. { skip$ }
  282. { doi empty$
  283. {}
  284. % {"\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" *}
  285. {"\href{http://dx.doi.org/" doi * "}{" * doi * "}" *}
  286. if$
  287. }
  288. if$
  289. }
  290.  
  291. FUNCTION {format.report}
  292. { report empty$
  293. { ""}
  294. { report}
  295. if$
  296. }
  297.  
  298. FUNCTION {format.editors}
  299. { editor empty$
  300. { "" }
  301. { editor format.names
  302. editor num.names$ #1 >
  303. { ", eds." * }
  304. { ", ed." * }
  305. if$
  306. }
  307. if$
  308. }
  309.  
  310. FUNCTION {format.title}
  311. { title empty$
  312. { "" }
  313. { "{\em " title * "\/}, " * }
  314. if$
  315. }
  316.  
  317. FUNCTION {format.title.p}
  318. { title empty$
  319. { "" }
  320. { "{\em " title * "\/}, " * }
  321. if$
  322. }
  323.  
  324. FUNCTION {n.dashify}
  325. { 't :=
  326. ""
  327. { t empty$ not }
  328. { t #1 #1 substring$ "-" =
  329. { t #1 #2 substring$ "--" = not
  330. { "--" *
  331. t #2 global.max$ substring$ 't :=
  332. }
  333. { { t #1 #1 substring$ "-" = }
  334. { "-" *
  335. t #2 global.max$ substring$ 't :=
  336. }
  337. while$
  338. }
  339. if$
  340. }
  341. { t #1 #1 substring$ *
  342. t #2 global.max$ substring$ 't :=
  343. }
  344. if$
  345. }
  346. while$
  347. }
  348. FUNCTION {format.date}
  349. { year empty$
  350. { month empty$
  351. { "" }
  352. { "there's a month but no year in " cite$ * warning$
  353. month
  354. }
  355. if$
  356. }
  357. { month empty$
  358. 'year
  359. { month ", " * year * }
  360. if$
  361. }
  362. if$
  363. }
  364. FUNCTION {format.date.paren}
  365. { year empty$
  366. { month empty$
  367. { "" }
  368. { "there's a month but no year in " cite$ * warning$
  369. month
  370. }
  371. if$
  372. }
  373. { month empty$
  374. {"(" year * ") " *}
  375. {"(" month * ", " * year * ") " *}
  376. if$
  377. }
  378. if$
  379. }
  380.  
  381. % ----------------------------------------------------------------------------------
  382. % Try to avoid multiple "collaboration"'s in the references, e.g. "The CMS Collaboration collaboration".
  383. INTEGERS{ l }
  384. FUNCTION{ string.length }
  385. {
  386. #1 'l :=
  387. {duplicate$ duplicate$ #1 l substring$ = not}
  388. { l #1 + 'l :=}
  389. while$
  390. pop$ l
  391. }
  392. INTEGERS {find.length search.start search.end done}
  393. STRINGS {find.string find.pattern}
  394. FUNCTION {contains}
  395. {
  396. 'find.pattern :=
  397. 'find.string :=
  398. find.pattern string.length 'find.length :=
  399. #1 'search.start :=
  400. find.string string.length find.length - #2 + 'search.end :=
  401. #0 'done :=
  402. { search.start search.end < }
  403. {
  404. find.string search.start find.length substring$ find.pattern =
  405. {
  406. #1 'done :=
  407. search.end 'search.start :=%% stop searching
  408. }
  409. { #1 search.start + 'search.start := }
  410. if$
  411. }
  412. while$
  413. done
  414. }
  415.  
  416. % Now the actual function
  417. FUNCTION {format.collaboration}
  418. { collaboration empty$
  419. { "" }
  420. { collaboration num.names$ #1 >
  421. { "{" collaboration *
  422. collaboration "collaboration" contains
  423. collaboration "Collaboration" contains or
  424. { "}" * }
  425. { " Collaborations}" * }
  426. if$
  427. }
  428. { "{" collaboration *
  429. collaboration "collaboration" contains
  430. collaboration "Collaboration" contains or
  431. { "}" * }
  432. { " Collaboration}" * }
  433. if$
  434. }
  435. if$
  436. }
  437. if$
  438. }
  439. % ----------------------------------------------------------------------------------
  440.  
  441.  
  442.  
  443. FUNCTION {format.SLACcitation}
  444. { SLACcitation empty$
  445. {""}
  446. { newline$ SLACcitation output "" newline$ }
  447. if$
  448. }
  449.  
  450. FUNCTION {format.btitle}
  451. { title emphasize
  452. }
  453.  
  454. FUNCTION {tie.or.space.connect}
  455. { duplicate$ text.length$ #3 <
  456. { "~" }
  457. { " " }
  458. if$
  459. swap$ * *
  460. }
  461.  
  462. FUNCTION {either.or.check}
  463. { empty$
  464. 'pop$
  465. { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  466. if$
  467. }
  468.  
  469. FUNCTION {format.bvolume}
  470. { volume empty$
  471. { "" }
  472. { "vol.~" volume *
  473. series empty$
  474. 'skip$
  475. { " of " * series emphasize * }
  476. if$
  477. "volume and number" number either.or.check
  478. }
  479. if$
  480. }
  481. FUNCTION {format.number.series}
  482. { volume empty$
  483. { number empty$
  484. { series field.or.null }
  485. { output.state mid.sentence =
  486. { "no.~" }
  487. { "No.~" }
  488. if$
  489. number *
  490. series empty$
  491. { "there's a number but no series in " cite$ * warning$ }
  492. { " in " * series * }
  493. if$
  494. }
  495. if$
  496. }
  497. { "" }
  498. if$
  499. }
  500.  
  501. FUNCTION {format.edition}
  502. { edition empty$
  503. { "" }
  504. { edition "l" change.case$ "~ed." * }
  505. if$
  506. }
  507. INTEGERS { multiresult }
  508. FUNCTION {multi.page.check}
  509. { 't :=
  510. #0 'multiresult :=
  511. { multiresult not
  512. t empty$ not
  513. and
  514. }
  515. { t #1 #1 substring$
  516. duplicate$ "-" =
  517. swap$ duplicate$ "," =
  518. swap$ "+" =
  519. or or
  520. { #1 'multiresult := }
  521. { t #2 global.max$ substring$ 't := }
  522. if$
  523. }
  524. while$
  525. multiresult
  526. }
  527. FUNCTION {format.pages}
  528. { pages empty$
  529. { "" }
  530. { pages multi.page.check
  531. { "pp.~" pages n.dashify * }
  532. { "p.~" pages * }
  533. if$
  534. }
  535. if$
  536. }
  537.  
  538. FUNCTION {format.pages.nopp}
  539. { pages empty$
  540. { "" }
  541. { pages multi.page.check
  542. { pages n.dashify }
  543. { pages }
  544. if$
  545. }
  546. if$
  547. }
  548. FUNCTION {format.volume}
  549. { volume empty$
  550. { "" }
  551. { "{\bf " volume * "} " * }
  552. if$
  553. }
  554. FUNCTION {format.number}
  555. { number empty$
  556. { "" }
  557. % { "no.~" number * "," *}
  558. { "no.~" number * "" *}
  559. if$
  560. }
  561. FUNCTION {format.chapter.pages}
  562. { chapter empty$
  563. 'format.pages
  564. { type empty$
  565. { "ch.~" chapter * }
  566. { type "l" change.case$ chapter tie.or.space.connect }
  567. if$
  568. pages empty$
  569. 'skip$
  570. { ", " * format.pages * }
  571. if$
  572. }
  573. if$
  574. }
  575. FUNCTION {format.in.ed.booktitle}
  576. { booktitle empty$
  577. { "" }
  578. % { "in " booktitle emphasize *
  579. { "in " booktitle *
  580. editor empty$
  581. 'skip$
  582. { ", " * format.editors * }
  583. if$
  584. }
  585. if$
  586. }
  587.  
  588. FUNCTION {format.thesis.type}
  589. { type empty$
  590. 'skip$
  591. { pop$
  592. output.state after.block =
  593. { type "t" change.case$ }
  594. { type "l" change.case$ }
  595. if$
  596. }
  597. if$
  598. }
  599. FUNCTION {empty.misc.check}
  600. { author empty$ title empty$ howpublished empty$
  601. month empty$ year empty$ note empty$
  602. and and and and and
  603. { "all relevant fields are empty in " cite$ * warning$ }
  604. 'skip$
  605. if$
  606. }
  607. FUNCTION {format.tr.number}
  608. { type empty$
  609. { "" }
  610. 'type
  611. if$
  612. number empty$
  613. { "l" change.case$ }
  614. { number tie.or.space.connect }
  615. if$
  616. }
  617.  
  618. FUNCTION {format.paddress}
  619. { address empty$
  620. { "" }
  621. { "(" address * ")" * }
  622. if$
  623. }
  624.  
  625. FUNCTION {format.article.crossref}
  626. { key empty$
  627. { journal empty$
  628. { "need key or journal for " cite$ * " to crossref " * crossref *
  629. warning$
  630. ""
  631. }
  632. { "in " journal * }
  633. if$
  634. }
  635. { "in " key * }
  636. if$
  637. " \cite{" * crossref * "}" *
  638. }
  639.  
  640. FUNCTION {format.crossref.editor}
  641. { editor #1 "{vv~}{ll}" format.name$
  642. editor num.names$ duplicate$
  643. #2 >
  644. { pop$ " {\em et.~al.}" * }
  645. { #2 <
  646. 'skip$
  647. { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  648. { " {\em et.~al.}" * }
  649. { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  650. if$
  651. }
  652. if$
  653. }
  654. if$
  655. }
  656.  
  657. FUNCTION {format.book.crossref}
  658. { volume empty$
  659. { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  660. "In "
  661. }
  662. { "Vol.~" volume *
  663. " of " *
  664. }
  665. if$
  666. editor empty$
  667. editor field.or.null author field.or.null =
  668. or
  669. { key empty$
  670. { series empty$
  671. { "need editor, key, or series for " cite$ * " to crossref " *
  672. crossref * warning$
  673. "" *
  674. }
  675. { "{\em " * series * "\/}" * }
  676. if$
  677. }
  678. { key * }
  679. if$
  680. }
  681. { format.crossref.editor * }
  682. if$
  683. " \cite{" * crossref * "}" *
  684. }
  685.  
  686. FUNCTION {format.incoll.inproc.crossref}
  687. { editor empty$
  688. editor field.or.null author field.or.null =
  689. or
  690. { key empty$
  691. { booktitle empty$
  692. { "need editor, key, or booktitle for " cite$ * " to crossref " *
  693. crossref * warning$
  694. ""
  695. }
  696. % { "in {\em " booktitle * "\/}" * }
  697. { "in " booktitle * }
  698. if$
  699. }
  700. { "in " key * }
  701. if$
  702. }
  703. { "in " format.crossref.editor * }
  704. if$
  705. " \cite{" * crossref * "}" *
  706. }
  707. FUNCTION {format.journal}
  708. { journal missing$
  709. { "" }
  710. {journal " " *
  711. format.volume *
  712. format.date.paren *
  713. month empty$
  714. { format.number }
  715. 'skip$
  716. if$ * " " *
  717. format.pages.nopp *
  718. }
  719. if$
  720. }
  721.  
  722. FUNCTION {article}
  723. { output.bibitem
  724. format.collaboration output
  725. format.authors "author" output.check
  726. format.title "title" output.check
  727. blank.sep
  728. crossref missing$
  729. { journal missing$
  730. {}
  731. % { format.journal add.doi "journal" output.check}
  732. { format.journal "journal" output.check}
  733. if$
  734. report missing$
  735. {format.eprint output}
  736. {blank.sep format.report output format.eprint output}
  737. if$
  738. }
  739. { format.article.crossref output.nonnull
  740. format.pages output
  741. format.eprint output
  742. }
  743. if$
  744. add.doi output
  745. % new.sentence
  746. format.url output
  747. % new.sentence
  748. note output
  749. new.sentence
  750. format.SLACcitation output
  751. fin.entry
  752. }
  753.  
  754. FUNCTION {book}
  755. { output.bibitem
  756.  
  757. format.collaboration output
  758. author empty$
  759. { format.editors "author and editor" output.check }
  760. { format.authors output.nonnull
  761. crossref missing$
  762. { "author and editor" editor either.or.check }
  763. 'skip$
  764. if$
  765. }
  766. if$
  767. % format.btitle add.doi "title" output.check
  768. format.btitle "title" output.check
  769. crossref missing$
  770. { format.bvolume output
  771. % new.block
  772. format.number.series output
  773. % new.sentence
  774. publisher "publisher" output.check
  775. address output
  776. }
  777. { %new.block
  778. format.book.crossref output.nonnull
  779. }
  780. if$
  781. format.edition output
  782. format.date "year" output.check
  783. % new.block
  784. format.eprint output
  785. add.doi output
  786. % new.block
  787. format.url output
  788. % new.block
  789. note output
  790. new.sentence
  791. format.SLACcitation output
  792. fin.entry
  793. }
  794.  
  795. FUNCTION {booklet}
  796. { output.bibitem
  797. format.collaboration output
  798. format.authors output
  799. title empty$
  800. { "empty title in " cite$ * warning$
  801. howpublished new.sentence.checka
  802. }
  803. { howpublished empty$ not
  804. address empty$ month empty$ year empty$ and and
  805. or
  806. { format.title.p output.nonnull }
  807. { format.title output.nonnull }
  808. if$
  809. blank.sep
  810. }
  811. if$
  812. % howpublished capitalize output
  813. address output
  814. format.date output
  815. % new.block
  816. format.eprint output
  817. % new.block
  818. format.url output
  819. % new.block
  820. note output
  821. new.sentence
  822. format.SLACcitation output
  823. fin.entry
  824. }
  825.  
  826. FUNCTION {inbook}
  827. { output.bibitem
  828. format.collaboration output
  829. author empty$
  830. { format.editors "author and editor" output.check }
  831. { format.authors output.nonnull
  832. crossref missing$
  833. { "author and editor" editor either.or.check }
  834. 'skip$
  835. if$
  836. }
  837. if$
  838. format.btitle "title" output.check
  839. crossref missing$
  840. { format.bvolume output
  841. % format.chapter.pages add.doi "chapter and pages" output.check
  842. format.chapter.pages "chapter and pages" output.check
  843. % new.block
  844. format.number.series output
  845. % new.block
  846. publisher "publisher" output.check
  847. address output
  848. }
  849. % { format.chapter.pages add.doi "chapter and pages" output.check
  850. { format.chapter.pages "chapter and pages" output.check
  851. % new.block
  852. format.book.crossref output.nonnull
  853. }
  854. if$
  855. format.edition output
  856. format.date "year" output.check
  857. % new.block
  858. format.eprint output
  859. add.doi output
  860. % new.block
  861. format.url output
  862. % new.block
  863. note output
  864. new.sentence
  865. format.SLACcitation output
  866. fin.entry
  867. }
  868.  
  869. FUNCTION {incollection}
  870. { output.bibitem
  871. format.collaboration output
  872. format.authors "author" output.check
  873. % format.title add.doi "title" output.check
  874. format.title "title" output.check
  875. blank.sep
  876. crossref missing$
  877. { format.in.ed.booktitle "booktitle" output.check
  878. format.bvolume output
  879. format.number.series output
  880. format.chapter.pages output
  881. % new.block
  882. publisher "publisher" output.check
  883. address output
  884. format.edition output
  885. format.date "year" output.check
  886. }
  887. { format.incoll.inproc.crossref output.nonnull
  888. format.chapter.pages output
  889. }
  890. if$
  891. % new.block
  892. format.eprint output
  893. add.doi output
  894. % new.block
  895. format.url output
  896. % new.block
  897. note output
  898. new.sentence
  899. format.SLACcitation output
  900. fin.entry
  901. }
  902.  
  903. FUNCTION {inproceedings}
  904. { output.bibitem
  905. format.collaboration output
  906. format.authors "author" output.check
  907. % format.title add.doi "title" output.check
  908. format.title "title" output.check
  909. blank.sep
  910. crossref missing$
  911. { format.in.ed.booktitle "booktitle" output.check
  912. format.bvolume output
  913. format.number.series output
  914. format.pages output
  915. organization output
  916. % new.block
  917. publisher output
  918. address output
  919. format.date "year" output.check
  920. }
  921. { format.incoll.inproc.crossref output.nonnull
  922. format.pages output
  923. }
  924. if$
  925. % new.block
  926. format.eprint output
  927. add.doi output
  928. % new.block
  929. format.url output
  930. % new.block
  931. note output
  932. new.sentence
  933. format.SLACcitation output
  934. fin.entry
  935. }
  936.  
  937. FUNCTION {conference} { inproceedings }
  938.  
  939. FUNCTION {manual}
  940. { output.bibitem
  941. format.collaboration output
  942. author empty$
  943. { organization empty$
  944. 'skip$
  945. { organization output.nonnull
  946. address output
  947. }
  948. if$
  949. }
  950. { format.authors output.nonnull }
  951. if$
  952. format.btitle "title" output.check
  953. author empty$
  954. { organization empty$
  955. { address new.block.checka
  956. address output
  957. }
  958. 'skip$
  959. if$
  960. }
  961. { organization address new.block.checkb
  962. organization output
  963. address output
  964. }
  965. if$
  966. format.edition output
  967. format.date output
  968. % new.block
  969. format.eprint output
  970. % new.block
  971. format.url output
  972. % new.block
  973. note output
  974. fin.entry
  975. }
  976.  
  977. FUNCTION {mastersthesis}
  978. { output.bibitem
  979. format.authors "author" output.check
  980. % format.title add.doi "title" output.check
  981. format.title "title" output.check
  982. blank.sep
  983. "Master's thesis" format.thesis.type output.nonnull
  984. school "school" output.check
  985. address output
  986. format.date "year" output.check
  987. add.doi output
  988. % new.block
  989. format.url output
  990. % new.block
  991. note output
  992. fin.entry
  993. }
  994.  
  995. FUNCTION {misc}
  996. { output.bibitem
  997. format.collaboration output
  998. format.authors output
  999. title empty$
  1000. { howpublished new.sentence.checka }
  1001. { howpublished empty$ not
  1002. month empty$ year empty$ and
  1003. or
  1004. { format.title.p output.nonnull }
  1005. { format.title output.nonnull }
  1006. if$
  1007. blank.sep
  1008. }
  1009. if$
  1010. howpublished capitalize output
  1011. format.date output
  1012. % new.block
  1013. crossref missing$
  1014. { journal missing$
  1015. {}
  1016. % { format.journal add.doi "journal" output.check}
  1017. { format.journal "journal" output.check}
  1018. if$
  1019. report missing$
  1020. {format.eprint output}
  1021. {blank.sep format.report output format.eprint output}
  1022. if$
  1023. }
  1024. { format.article.crossref output.nonnull
  1025. format.pages output
  1026. format.eprint output
  1027. }
  1028. if$
  1029. add.doi output
  1030. format.url output
  1031. % new.sentence
  1032. note output
  1033. new.sentence
  1034. fin.entry
  1035. empty.misc.check
  1036. }
  1037.  
  1038. FUNCTION {phdthesis}
  1039. { output.bibitem
  1040. format.authors "author" output.check
  1041. % format.btitle add.doi "title" output.check
  1042. format.btitle "title" output.check
  1043. % new.block
  1044. "PhD thesis" format.thesis.type output.nonnull
  1045. school "school" output.check
  1046. address output
  1047. format.date "year" output.check
  1048. % new.block
  1049. format.eprint output
  1050. add.doi output
  1051. % new.block
  1052. format.url output
  1053. % new.block
  1054. note output
  1055. % new.sentence
  1056. format.SLACcitation output
  1057. fin.entry
  1058. }
  1059.  
  1060. FUNCTION {proceedings}
  1061. { output.bibitem
  1062. editor empty$
  1063. { organization output }
  1064. { format.editors output.nonnull }
  1065. if$
  1066. % format.btitle add.doi "title" output.check
  1067. format.btitle "title" output.check
  1068. format.bvolume output
  1069. format.number.series output
  1070. editor empty$
  1071. 'skip$
  1072. { organization output }
  1073. if$
  1074. % new.block
  1075. publisher output
  1076. address output
  1077. format.date "year" output.check
  1078. % new.block
  1079. format.eprint output
  1080. add.doi output
  1081. % new.block
  1082. format.url output
  1083. % new.block
  1084. note output
  1085. new.sentence
  1086. format.SLACcitation output
  1087. fin.entry
  1088. }
  1089.  
  1090. FUNCTION {techreport}
  1091. { output.bibitem
  1092. format.collaboration output
  1093. format.authors "author" output.check
  1094. % format.title add.doi "title" output.check
  1095. format.title "title" output.check
  1096. blank.sep
  1097. % format.tr.number output.nonnull
  1098. institution "institution" output.check
  1099. address output
  1100. format.date "year" output.check
  1101. % new.block
  1102. format.eprint output
  1103. add.doi output
  1104. % new.block
  1105. format.url output
  1106. % new.block
  1107. note output
  1108. fin.entry
  1109. }
  1110.  
  1111. FUNCTION {unpublished}
  1112. { output.bibitem
  1113. format.collaboration output
  1114. format.authors "author" output.check
  1115. format.title.p "title" output.check
  1116. blank.sep
  1117. note "note" output.check
  1118. format.date output
  1119. % new.sentence
  1120. format.url output
  1121. format.SLACcitation output
  1122. fin.entry
  1123. }
  1124.  
  1125. FUNCTION {default.type} { misc }
  1126.  
  1127. MACRO {jan} {"Jan."}
  1128.  
  1129. MACRO {feb} {"Feb."}
  1130.  
  1131. MACRO {mar} {"Mar."}
  1132.  
  1133. MACRO {apr} {"Apr."}
  1134.  
  1135. MACRO {may} {"May"}
  1136.  
  1137. MACRO {jun} {"June"}
  1138.  
  1139. MACRO {jul} {"July"}
  1140.  
  1141. MACRO {aug} {"Aug."}
  1142.  
  1143. MACRO {sep} {"Sept."}
  1144.  
  1145. MACRO {oct} {"Oct."}
  1146.  
  1147. MACRO {nov} {"Nov."}
  1148.  
  1149. MACRO {dec} {"Dec."}
  1150.  
  1151. MACRO {nup} {"Nucl. Phys."}
  1152.  
  1153. MACRO {cmp} {"Comm. Math. Phys."}
  1154.  
  1155. MACRO {prl} {"Phys. Rev. Lett."}
  1156.  
  1157. MACRO {pl} {"Phys. Lett."}
  1158.  
  1159. MACRO {rmp} {"Rev. Mod. Phys."}
  1160.  
  1161. MACRO {ijmp} {"Int. Jour. Mod. Phys."}
  1162.  
  1163. MACRO {mpl} {"Mod. Phys. Lett."}
  1164.  
  1165. MACRO {pr} {"Phys. Rev."}
  1166.  
  1167. MACRO {arXiv} {"http://arxiv.org/abs"}
  1168. MACRO {cogprints} {"http://cogprints.org"}
  1169. MACRO {pubmed} {"http://www.ncbi.nlm.nih.gov/pubmed"}
  1170.  
  1171. READ
  1172.  
  1173. STRINGS { longest.label }
  1174.  
  1175. INTEGERS { number.label longest.label.width }
  1176.  
  1177. FUNCTION {initialize.longest.label}
  1178. { "" 'longest.label :=
  1179. #1 'number.label :=
  1180. #0 'longest.label.width :=
  1181. }
  1182.  
  1183. FUNCTION {longest.label.pass}
  1184. { number.label int.to.str$ 'label :=
  1185. number.label #1 + 'number.label :=
  1186. label width$ longest.label.width >
  1187. { label 'longest.label :=
  1188. label width$ 'longest.label.width :=
  1189. }
  1190. 'skip$
  1191. if$
  1192. }
  1193. EXECUTE {initialize.longest.label}
  1194. ITERATE {longest.label.pass}
  1195. FUNCTION {begin.bib}
  1196. { preamble$ empty$
  1197. 'skip$
  1198. { preamble$ write$ newline$ }
  1199. if$
  1200. "\providecommand{\href}[2]{#2}"
  1201. "\begingroup\raggedright\begin{thebibliography}{" * longest.label *
  1202. "}" * write$ newline$ }
  1203.  
  1204. EXECUTE {begin.bib}
  1205.  
  1206. EXECUTE {init.state.consts}
  1207.  
  1208. ITERATE {call.type$}
  1209. FUNCTION {end.bib}
  1210. { newline$
  1211. "\end{thebibliography}\endgroup" write$ newline$
  1212. }
  1213.  
  1214. EXECUTE {end.bib}


Thanks a lot.

kaiserkarl13
Posts: 605
Joined: Tue Mar 25, 2008 5:02 pm

Postby kaiserkarl13 » Sun Dec 09, 2018 1:53 am

That's not a warning, it's an error. BibTeX is trying to tell you that you tried to remove an item from the stack, but there are no items on it. Think of it like being told to draw a card, but there are no more cards to draw.

It's coming from the fact that you modified the add.doi function and did a couple of other things. I didn't have time to track down exactly what broke it, but I would suggest you go through the changes you made from the (working) original, one-by-one, and see which one broke your bst file. Don't ignore the error messages!

teub
Posts: 3
Joined: Fri Dec 07, 2018 2:55 pm

Postby teub » Mon Dec 10, 2018 4:47 pm

Ok I am now back to the original file and I have issues I am not understanding.

0/ The original fcc.bst :

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


question 1/ how to modify this code to get the DoI value defined to appear in the preview without breaking the whole structure ?

question 2/ I am seeing that in the case of an article I still have such warnings :
You can't pop an empty literal stack for entry ... while executing---line ... of file fcc.bst


by looking at article references without any complain, I have found that if there is the month defined it makes this warning happening and if in this same entry I remove month it is not complaining ???

By following month, I fall in the "function" format.journal and format.date.paren, but I have no knowledge in this language to get any clever debugging alone.

Example of reference making the warning (and warning disappearing when no month entry):

  1. @Article{bib:parameter,
  2. Title = {{tile}},
  3. Author = {M.~Name},
  4. Journal = {journal},
  5. Year = {2015},
  6. Month = {October},
  7. Doi = {doi_path},
  8. Number = {10},
  9. Pages = {101002},
  10. Volume = {18}
  11. }


I hope to have any help to these very precise questions.

teub
Posts: 3
Joined: Fri Dec 07, 2018 2:55 pm

Postby teub » Tue Dec 11, 2018 1:14 pm

question 1 fix found :
by trying completely randomly I have found the following fix
  1. % {"\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" *}
  2. {", DOI:" * doi * " \href{http://dx.doi.org/" doi * "}{" * swap$ * "}" *}


question 2 "fix" found :
I will put into year the month + year info :cry:
I cannot do better, hope to have a clever person who could help me soon.


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 4 guests