Skip to content

Commit

Permalink
Cleanup generator script
Browse files Browse the repository at this point in the history
  • Loading branch information
szarnyasg committed Sep 7, 2024
1 parent 9f7ab16 commit 4998f7e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions generate-tex.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
from collections import defaultdict


# for Markdown to TeX conversion, we invoke Pandoc as a subprocess
def convert_markdown_to_tex(markdown):
return check_output(
["pandoc", "--from=markdown", "--to=latex"],
universal_newlines=True,
input=markdown
).replace('??', '\+') # if line breaks are needed
)


def convert_map_values_to_tex(map):
Expand Down Expand Up @@ -75,8 +76,6 @@ def convert_map_list_to_tex(list_of_maps):

query_choke_point[query_id] = choke_points

# currently, there are no off-the-shelf solutions for Markdown to TeX conversion in Python 3,
# so we use Pandoc -- it's hands down the best Markdown to Tex converter you can get anyways
description_tex = convert_markdown_to_tex(description_markdown)

# optional arguments
Expand Down

0 comments on commit 4998f7e

Please sign in to comment.