fix: typst single backslash linebreaks and dual theme OMML parity
This commit is contained in:
1 parent
2ab4f60a0f
commit
649fe5f9ef
3 files changed
+107
-68
No files matched your search
+1
-4
@@ -93,7 +93,7 @@ def generate_typst_source(source: dict, theme: dict, template_import_path: str,
|
||||
idx += 1
|
||||
lines.append(" #pad(left: 10pt)[")
|
||||
for p_i, pl in enumerate(pad_lines):
|
||||
end_char = r"\\" if p_i < len(pad_lines) - 1 else ""
|
||||
end_char = "\\" if p_i < len(pad_lines) - 1 else ""
|
||||
lines.append(f" {pl}{end_char}")
|
||||
lines.append(" ]")
|
||||
continue
|
||||
@@ -158,7 +158,6 @@ def generate_typst_source(source: dict, theme: dict, template_import_path: str,
|
||||
lines.append(" width: 100%,")
|
||||
lines.append(" inset: (x: 8pt, top: 4pt, bottom: 4pt),")
|
||||
lines.append(" [")
|
||||
lines.append(" #grid(")
|
||||
cols_str = ("1fr, " * len(cols)).rstrip(", ")
|
||||
lines.append(f" #grid(")
|
||||
lines.append(f" columns: ({cols_str}),")
|
||||
@@ -199,8 +198,6 @@ def render_typst(source: dict, theme: dict, output_pdf_path: str, typst_bin: str
|
||||
|
||||
# Racine pour typst sandbox
|
||||
root_dir = "/"
|
||||
if os.path.exists("/app"):
|
||||
root_dir = "/app"
|
||||
|
||||
typ_content = generate_typst_source(source, theme, tmpl, figures_map)
|
||||
with open(typ_path, "w", encoding="utf-8") as f:
|
||||
|
||||
Reference in new issue
Block a user