Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ async def convert(self):
match self.doc_type:
case "pdf":
paper_size_variable = "us-letter" if self.paper_size == "letter" else "a4"
cmd = f"pandoc --from markdown --to pdf --standalone --embed-resources --no-highlight \
cmd = f"pandoc --from markdown-implicit_figures --to pdf --standalone --embed-resources --no-highlight \
--pdf-engine=typst {MD_FILE_NAME} \
-V papersize={paper_size_variable} \
-o {output_file_name}"
case "tex":
cmd = f"pandoc --from markdown --to latex --standalone --embed-resources --no-highlight \
cmd = f"pandoc --from markdown-implicit_figures --to latex --standalone --embed-resources --no-highlight \
-V papersize={self.paper_size} \
{MD_FILE_NAME} -o {output_file_name}"
case "docx":
Expand All @@ -54,7 +54,7 @@ async def convert(self):
else:
reference_doc = "/code/app/reference_docs/reference_a4.docx"

cmd = f"pandoc --from markdown --to {self.doc_type} --standalone --embed-resources --no-highlight \
cmd = f"pandoc --from markdown-implicit_figures --to {self.doc_type} --standalone --embed-resources --no-highlight \
--reference-doc={reference_doc} \
{MD_FILE_NAME} -o {output_file_name}"
case _:
Expand Down