From 8f46af0ee8a139695092231fd42dd121ac010b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 19 Feb 2022 16:42:46 +0100 Subject: [PATCH] fix filename in case it contains - already in expl3 case --- PyTeX/format/pytex_formatter.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PyTeX/format/pytex_formatter.py b/PyTeX/format/pytex_formatter.py index 878de82..c19d36a 100644 --- a/PyTeX/format/pytex_formatter.py +++ b/PyTeX/format/pytex_formatter.py @@ -186,11 +186,14 @@ class PyTeXFormatter(FormatterIF, ABC): if self.config.tex_flavour == TeXFlavour.LaTeX2e: return self.shortauthor + '@' + self.raw_name elif self.config.tex_flavour == TeXFlavour.LaTeX3: - return self.shortauthor + '_' + self.raw_name + return self.shortauthor + '_' + self.raw_name.replace('-', '_') else: raise NotImplementedError else: - return self.raw_name + if self.config.tex_flavour == TeXFlavour.LaTeX3: + return self.raw_name.replace('-', '_') + else: + return self.raw_name @property def name(self):