|
|
@ -67,21 +67,17 @@ class UCWTexGenerator(OutputGenerator): |
|
|
|
self.writepar(r"\vskip5pt\hrule\hfil\vskip5pt{}") |
|
|
|
|
|
|
|
def generate_Doc(self, e: Doc): |
|
|
|
self.writeln(r"\input ucwmac2.tex") |
|
|
|
self.writeln(r"\ucwmodule{ofs}") |
|
|
|
self.writeln(r"\ucwmodule{verb}") |
|
|
|
self.writeln(r"\ucwmodule{link}") |
|
|
|
self.writeln(r"\input formatitko.tex") |
|
|
|
self.generate(e.content) |
|
|
|
self.writeln(r"\bye") |
|
|
|
|
|
|
|
def get_language_macro(self, lang: str): |
|
|
|
if lang == "cs": |
|
|
|
return r"\chyph\lefthyphenmin=2\righthyphenmin=2{}" |
|
|
|
return r"\uselanguage{czech}\frenchspacing\lefthyphenmin=2\righthyphenmin=2{}" |
|
|
|
elif lang == "sk": |
|
|
|
return r"\shyph\lefthyphenmin=2\righthyphenmin=2{}" |
|
|
|
return r"\uselanguage{slovak}\frenchspacing\lefthyphenmin=2\righthyphenmin=2{}" |
|
|
|
elif lang == "en": |
|
|
|
return r"\ehyph\lefthyphenmin=2\righthyphenmin=2{}" |
|
|
|
return r"\uselanguage{english}\nofrenchspacing\lefthyphenmin=2\righthyphenmin=2{}" |
|
|
|
else: |
|
|
|
return "" |
|
|
|
|
|
|
@ -192,11 +188,11 @@ class UCWTexGenerator(OutputGenerator): |
|
|
|
|
|
|
|
def generate_Math(self, e: Math): |
|
|
|
if e.format == "DisplayMath": |
|
|
|
self.ensure_empty(2) |
|
|
|
self.ensure_empty(1) |
|
|
|
self.writeraw("$$") |
|
|
|
self.writeraw(e.text.strip()) |
|
|
|
self.writeraw("$$") |
|
|
|
self.ensure_empty(2) |
|
|
|
self.ensure_empty(1) |
|
|
|
else: |
|
|
|
self.write("$") |
|
|
|
self.write(e.text) |
|
|
|