@@ -764,6 +764,8 @@ M.Attr.__newindex = function(t, k, v)
764764end
765765setmetatable(M.Attr, M.Attr)
766766
767+-- Citation
768+M.Citation = {}
767769
768770--- Creates a single citation.
769771-- @function Citation
@@ -773,20 +775,20 @@ setmetatable(M.Attr, M.Attr)
773775-- @tparam[opt] {Inline,...} suffix citation suffix
774776-- @tparam[opt] int note_num note number
775777-- @tparam[opt] int hash hash number
776−M.Citation = function(id, mode, prefix, suffix, note_num, hash)
777− prefix = prefix or {}
778− suffix = suffix or {}
779− note_num = note_num or 0
780− hash = hash or 0
781− return {
782− citationId = id,
783− citationPrefix = prefix,
784− citationSuffix = suffix,
785− citationMode = mode,
786− citationNoteNum = note_num,
787− citationHash = hash,
788− }
778+M.Citation.__call = function(t, id, mode, prefix, suffix, note_num, hash)
779+ return setmetatable(
780+ {
781+ id = id,
782+ mode = mode,
783+ prefix = prefix or {},
784+ suffix = suffix or {},
785+ note_num = note_num or 0,
786+ hash = hash or 0,
787+ },
788+ t
789+ )
789790end
791+setmetatable(M.Citation, M.Citation)
790792
791793
792794------------------------------------------------------------------------