From 08df4dbd782135f29e20ca64fe41fd010db81f5e Mon Sep 17 00:00:00 2001 From: Jiri Kalvoda Date: Sat, 4 May 2024 18:19:40 +0200 Subject: [PATCH] =?UTF-8?q?UCWTeX:=20Obr=C3=A1zky=20v=C5=BEdyu=20zarovn?= =?UTF-8?q?=C3=A1v=C3=A1me=20na=20st=C5=99ed,=20popisky=20nejsou=20slanted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/formatitko/tex_generator.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/formatitko/tex_generator.py b/src/formatitko/tex_generator.py index 495a76d..33eecad 100644 --- a/src/formatitko/tex_generator.py +++ b/src/formatitko/tex_generator.py @@ -151,10 +151,7 @@ class UCWTexGenerator(OutputGenerator): width = str(int(e.attributes["width"][:-1])/100) + "\\hsize" width = "width " + width - if isinstance(e.parent.parent, Figure): - self.writeln(f'\\putimage{{{width}}}{{{url}}}') - else: - self.writepar(f'\\putimage{{{width}}}{{{url}}}') + self.writeln(f'\\centerline{{\\putimage{{{width}}}{{{url}}}}}') def generate_Code(self, e: Code): self.write(r"\verb`") @@ -230,7 +227,7 @@ class UCWTexGenerator(OutputGenerator): self.write(r"}") def generate_Caption(self, e: Caption): - self.generate_Slanted(e) + self.generate(e.content) def generate_Math(self, e: Math): if e.format == "DisplayMath":