add tex outtype to config

This commit is contained in:
Maximilian Keßler 2022-02-17 20:02:25 +01:00
parent 6181704a8d
commit edacb9615c
2 changed files with 12 additions and 0 deletions

View file

@ -28,6 +28,7 @@ YAML_DOC_DEPENDENCIES = 'doc'
YAML_TEX_DEPENDENCIES = 'tex'
YAML_TEX_FLAVOUR = 'flavour'
YAML_TEX_TYPE = 'type'
YAML_TEX_OUT_TYPE = 'outtype'
YAML_TEXT = 'text'
YAML_REPO = 'repo'
YAML_PYTEX = 'pytex'

View file

@ -35,6 +35,7 @@ class FormattingConfig(Config):
self._tex_dependencies: Optional[List[str]] = None
self._tex_type: Optional[TeXType] = None
self._tex_out_type: Optional[TeXType] = None
self._tex_flavour: Optional[TeXFlavour] = None
self._escape_character: Optional[str] = None
@ -47,6 +48,7 @@ class FormattingConfig(Config):
self._naming_scheme = NamingScheme.parse(info[YAML_NAMING_SCHEME])
self._tex_flavour = TeXFlavour.parse(info[YAML_TEX_FLAVOUR])
self._tex_type = TeXType.parse(info[YAML_TEX_TYPE])
self._tex_type = TeXType.parse(info[YAML_TEX_OUT_TYPE])
self._description = info[YAML_DESCRIPTION]
self._version = info[YAML_VERSION]
@ -95,6 +97,7 @@ class FormattingConfig(Config):
YAML_NAMING_SCHEME: self._naming_scheme,
YAML_TEX_FLAVOUR: self._tex_flavour,
YAML_TEX_TYPE: self._tex_type,
YAML_TEX_OUT_TYPE: self._tex_out_type,
YAML_VERSION: self._version,
YAML_DESCRIPTION: self._description
},
@ -376,6 +379,14 @@ class FormattingConfig(Config):
def tex_flavour(self, tex_flavour: TeXFlavour) -> None:
self._tex_flavour = tex_flavour
@property
def tex_out_type(self) -> TeXType:
if self._tex_out_type is None:
return TeXType.TeXPackage
else:
return self._tex_out_type
class DocFormattingConfig:
def __init__(self):
self._documents: Optional[List[str]] = None