diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/naming/config.ml | 5 | ||||
| -rw-r--r-- | lib/naming/config.mli | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/naming/config.ml b/lib/naming/config.ml index 068b40a..4077da0 100644 --- a/lib/naming/config.ml +++ b/lib/naming/config.ml @@ -5,6 +5,7 @@ type t = { overlays : string list; template : string option; format : string option; + flavour : string option; sigla_style : string option; sigla_book : string option; sigla_tradition : string option; @@ -13,13 +14,14 @@ type t = { } let empty = - { lang = None; overlays = []; template = None; format = None; sigla_style = None; + { lang = None; overlays = []; template = None; format = None; flavour = None; sigla_style = None; sigla_book = None; sigla_tradition = None; unknown_keys = []; unknown_sections = [] } let lang t = t.lang let overlays t = t.overlays let template t = t.template let format t = t.format +let flavour t = t.flavour let sigla_style t = t.sigla_style let sigla_book t = t.sigla_book let sigla_tradition t = t.sigla_tradition @@ -71,6 +73,7 @@ let of_string text = | "lang" -> { acc with lang = Some v } | "template" -> { acc with template = Some v } | "format" -> { acc with format = Some v } + | "flavour" -> { acc with flavour = Some v } | "sigla_style" -> { acc with sigla_style = Some v } | "sigla_book" -> { acc with sigla_book = Some v } | "sigla_tradition" -> { acc with sigla_tradition = Some v } diff --git a/lib/naming/config.mli b/lib/naming/config.mli index a5205c4..0dda906 100644 --- a/lib/naming/config.mli +++ b/lib/naming/config.mli @@ -29,6 +29,16 @@ val overlays : t -> string list val template : t -> string option val format : t -> string option +(** The template ESCAPING flavour ([latex] | [typst] | [groff] | [html] | + [xml] | [ics] | [none]). + + Only consulted when the flavour cannot be inferred from the template's + own extension, which is the usual case -- a template named [.tex] needs + no setting. It exists for the template whose extension says nothing, + and getting it wrong produces output that is malformed rather than + merely ugly, so there is deliberately no silent fallback. *) +val flavour : t -> string option + (** Which citation style to render a reference in: a language CODE, looked up the same way {!lang} is, or a path -- but a DIFFERENT axis from {!lang}: a language file's own [\[sigla\]] section IS a style |
