Skip to content

Commit

Permalink
create build path for pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
jensdebruijn committed Sep 25, 2024
1 parent 3a7e48f commit 42081a5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#
import os
import sys
from pathlib import Path
import pypandoc

sys.path.insert(0, os.path.abspath(".."))
Expand All @@ -25,16 +26,14 @@
with open("authors.rst", "r") as f:
author = f.read()


prevdir = os.getcwd()
os.chdir("ODD")
output_folder = Path("../_build/html")
output_folder.mkdir(exist_ok=True)
output = pypandoc.convert_file(
"ODD_protocol.md",
"ODD/ODD_protocol.md",
"pdf",
outputfile="../_build/html/ODD_protocol.pdf",
outputfile=output_folder / "ODD_protocol.pdf",
extra_args=["--pdf-engine=xelatex"],
)
os.chdir(prevdir)

# -- General configuration ---------------------------------------------------

Expand Down

0 comments on commit 42081a5

Please sign in to comment.