diff --git a/classes/cabook.lua b/classes/cabook.lua index fd706643..1f064ea4 100644 --- a/classes/cabook.lua +++ b/classes/cabook.lua @@ -68,7 +68,7 @@ end function class:declareOptions () book.declareOptions(self) - local binding, crop, edition, background, verseindex, layout + local binding, crop, edition, edit, background, verseindex, layout self:declareOption("binding", function (_, value) if value then binding = value end return binding @@ -81,6 +81,10 @@ function class:declareOptions () if value then edition = value end return edition end) + self:declareOption("edit", function (_, value) + if value then edit = value end + return edit + end) self:declareOption("background", function (_, value) if value then background = SU.cast("boolean", value) end return background @@ -100,7 +104,6 @@ end function class:setOptions (options) options.binding = options.binding or "print" -- print, paperback, hardcover, coil, stapled - options.edition = options.edition options.crop = options.crop or (options.binding ~= "print") options.background = options.background or true options.verseindex = options.verseindex or false diff --git a/rules/rules.mk b/rules/rules.mk index bb325225..2cbe16db 100644 --- a/rules/rules.mk +++ b/rules/rules.mk @@ -192,6 +192,7 @@ DOCUMENTCLASS ?= cabook DOCUMENTOPTIONS += binding=$(call unlocalize,$(or $(call parse_binding,$@),$(firstword $(BINDINGS)))) DOCUMENTOPTIONS += layout=$(call unlocalize,$(or $(call parse_papersize,$@),$(firstword $(PAPERSIZES)))) DOCUMENTOPTIONS += $(and $(call parse_editions,$@),edition=$(call unlocalize,$(call parse_editions,$@))) +DOCUMENTOPTIONS += $(and $(call parse_edits,$@),edit=$(call unlocalize,$(call parse_edits,$@))) # Default template for setting up Gitlab CI runners CITEMPLATE ?= $(CASILEDIR)/travis.yml