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.

111 lines
3.2 KiB

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