Browse Source

UCWTeX: Obrázky vždyu zarovnáváme na střed, popisky nejsou slanted

jk-bakalarka
Jiří Kalvoda 8 months ago
parent
commit
08df4dbd78
  1. 7
      src/formatitko/tex_generator.py

7
src/formatitko/tex_generator.py

@ -151,10 +151,7 @@ class UCWTexGenerator(OutputGenerator):
width = str(int(e.attributes["width"][:-1])/100) + "\\hsize" width = str(int(e.attributes["width"][:-1])/100) + "\\hsize"
width = "width " + width width = "width " + width
if isinstance(e.parent.parent, Figure): self.writeln(f'\\centerline{{\\putimage{{{width}}}{{{url}}}}}')
self.writeln(f'\\putimage{{{width}}}{{{url}}}')
else:
self.writepar(f'\\putimage{{{width}}}{{{url}}}')
def generate_Code(self, e: Code): def generate_Code(self, e: Code):
self.write(r"\verb`") self.write(r"\verb`")
@ -230,7 +227,7 @@ class UCWTexGenerator(OutputGenerator):
self.write(r"}") self.write(r"}")
def generate_Caption(self, e: Caption): def generate_Caption(self, e: Caption):
self.generate_Slanted(e) self.generate(e.content)
def generate_Math(self, e: Math): def generate_Math(self, e: Math):
if e.format == "DisplayMath": if e.format == "DisplayMath":

Loading…
Cancel
Save