summaryrefslogtreecommitdiff
path: root/biblio/citation-style-language/citeproc-nodes.lua
blob: 3537f4256ec3dd68a6994cabb5d03347f545c262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--
-- Copyright (c) 2021-2024 Zeping Lee
-- Released under the MIT license.
-- Repository: https://github.com/zepinglee/citeproc-lua
--

local style
local citation
local bibliography
local locale
local layout
local text
local date
local number
local names
local label
local group
local choose
local sort

if kpse then
  style  = require("citeproc-node-style")
  citation  = require("citeproc-node-citation")
  bibliography  = require("citeproc-node-bibliography")
  locale = require("citeproc-node-locale")
  layout = require("citeproc-node-layout")
  text   = require("citeproc-node-text")
  date   = require("citeproc-node-date")
  number = require("citeproc-node-number")
  names  = require("citeproc-node-names")
  label  = require("citeproc-node-label")
  group  = require("citeproc-node-group")
  choose = require("citeproc-node-choose")
  sort   = require("citeproc-node-sort")
else
  style  = require("citeproc.node-style")
  citation  = require("citeproc.node-citation")
  bibliography  = require("citeproc.node-bibliography")
  locale = require("citeproc.node-locale")
  layout = require("citeproc.node-layout")
  text   = require("citeproc.node-text")
  date   = require("citeproc.node-date")
  number = require("citeproc.node-number")
  names  = require("citeproc.node-names")
  label  = require("citeproc.node-label")
  group  = require("citeproc.node-group")
  choose = require("citeproc.node-choose")
  sort   = require("citeproc.node-sort")
end

local nodes = {
  ["style"]        = style.Style,
  ["citation"]     = citation.Citation,
  ["intext"]       = citation.Intext,
  ["bibliography"] = bibliography.Bibliography,
  ["locale"]       = locale.Locale,
  ["term"]         = locale.Term,
  ["layout"]       = layout.Layout,
  ["text"]         = text.Text,
  ["date"]         = date.Date,
  ["date-part"]    = date.DatePart,
  ["number"]       = number.Number,
  ["names"]        = names.Names,
  ["name"]         = names.Name,
  ["name-part"]    = names.NamePart,
  ["et-al"]        = names.EtAl,
  ["substitute"]   = names.Substitute,
  ["label"]        = label.Label,
  ["group"]        = group.Group,
  ["choose"]       = choose.Choose,
  ["if"]           = choose.If,
  ["else"]         = choose.Else,
  ["else-if"]      = choose.ElseIf,
  ["sort"]         = sort.Sort,
  ["key"]          = sort.Key,
}

return nodes