Klimi's new dotfiles with stow.
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.

86 lines
2.5 KiB

4 years ago
  1. ;;; unsrt-footnote.el --- Citation Style Lisp - the other CSL
  2. ;;; Commentary:
  3. ;; Convert citations to org-mode footnotes
  4. ;;; Code:
  5. (setq citation-style
  6. '((label . orcp-footnote-label)
  7. (prefix . "")
  8. (suffix . "")
  9. ;; sort on increasing citation numbers.
  10. (sort . (lambda (key1 key2)
  11. (let ((i1 (-find-index
  12. (lambda (entry)
  13. (string= key1 (car entry)))
  14. *orcp-unique-entries*))
  15. (i2 (-find-index
  16. (lambda (entry)
  17. (string= key2 (car entry)))
  18. *orcp-unique-entries*)))
  19. (> i2 i1))))
  20. (delimiter . ", ")
  21. (vertical-align . baseline)))
  22. (setq bibliography-style
  23. '((sort . nil)
  24. (hanging-indent . 3)
  25. (justification . full)
  26. (spacing . 1)
  27. (label . orcp-footnote-label)
  28. (label-prefix . "")
  29. (label-suffix . " ")
  30. (header . ((text . "Bibliography")
  31. (font-style . bold)))
  32. ;; Formatting of fields
  33. ;; Single author name
  34. (author . ((initialize . t) ; use initials, not full names
  35. (name-order . (lastname firstname))
  36. (name-separator . ", ")
  37. (et-al . 4) ; after 4 authors use et-al
  38. (delimiter . "; ")
  39. (last-author-delimiter . " and ")
  40. (suffix . "")
  41. (field-separator . ", ")
  42. ;; ; function to convert (first von last jr) to a string.)
  43. (name-format . ''format-author-name)
  44. (field-separator ", ")))
  45. (title . ((font-style . italics)
  46. (suffix . "")
  47. (field-separator . ", ")))
  48. (journal . ((suffix . "")
  49. (field-separator . ", ")))
  50. ;; here we use some logic to group volume(issue) or volume
  51. (volume . ((suffix . (when (orcp-get-entry-field "number" entry)
  52. (orcp-issue entry)))
  53. (field-separator . ", ")))
  54. (issue . ((font-style . bold)
  55. (prefix . "(")
  56. (suffix . ")")
  57. (field-separator . ", ")))
  58. (pages . ((prefix . "pp. ")
  59. (suffix . "")
  60. (field-separator . " ")
  61. (collapse-range . nil)))
  62. (year . ((prefix . "(")
  63. (suffix . ")")
  64. (field-separator . ".")))
  65. (doi . ((prefix . " ")
  66. (suffix . ".")
  67. (field-separator . "")
  68. (formatter . orcp-doi-formatter)))
  69. ;; Formatting of entries
  70. (entries . ((article . (author title journal volume pages year doi))
  71. (book . (author title year))
  72. (misc . (author title url doi))
  73. (techreport . (author title institution year))
  74. (mastersthesis . (author title school year))
  75. (phdthesis . (author title school year))
  76. (t . (author title year))))))
  77. (provide 'unsrt)
  78. ;;; unsrt.el ends here