From d98e807585449b20ec92cd754241b33341b17708 Mon Sep 17 00:00:00 2001 From: htfab Date: Thu, 5 Dec 2024 02:22:46 +0100 Subject: [PATCH] feat(docs): parse info.md as github-flavored markdown --- docs/project_header.md | 7 +++++-- project.py | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/project_header.md b/docs/project_header.md index 8ddb47d..df26d58 100644 --- a/docs/project_header.md +++ b/docs/project_header.md @@ -4,9 +4,12 @@ geometry: "left=2cm,right=2cm,top=2cm,bottom=3cm" fontsize: 14pt mainfont: Latin Modern Sans header-includes: -- \usepackage{hyperref} -- \hypersetup{colorlinks=false, +- | + ```{=latex} + \usepackage{hyperref} + \hypersetup{colorlinks=false, allbordercolors={0 0 0}, pdfborderstyle={/S/U/W 1}} + ``` --- diff --git a/project.py b/project.py index 7273877..f7ccfaf 100644 --- a/project.py +++ b/project.py @@ -886,11 +886,11 @@ def create_pdf(self): try: doc = chevron.render(doc_template, template_args) fh.write(doc) - fh.write("\n\\pagebreak\n") + fh.write("\n```{=latex}\n\\pagebreak\n```\n") except IndexError: logging.warning("missing pins in info.yaml, skipping") - pdf_cmd = "pandoc --pdf-engine=xelatex --resource-path=docs -i datasheet.md -o datasheet.pdf" + pdf_cmd = "pandoc --pdf-engine=xelatex --resource-path=docs -i datasheet.md -o datasheet.pdf --from gfm+raw_attribute" logging.info(pdf_cmd) p = subprocess.run(pdf_cmd, shell=True) if p.returncode != 0: