def build_report(report_name):
    ' Apply appropriate transformations to markdown files\n    so that they can be compiled properly into a PDF report via\n    LaTeX. '
    with open('index.md', 'r') as f:
        lines = [transform_line(line) for line in f]
    with open('index_transformed.md', 'w') as f:
        f.writelines(lines)
    sp.call(['pandoc', '--template', '../pandoc_report_template.tex', '--pdf-engine', 'lualatex', '-V', f'reportname={report_name}', '-N', '-f', 'markdown+tex_math_dollars', 'index_transformed.md', '-o', f'{report_name}.tex'])
    sp.call(['latexmk', '-lualatex', f'{report_name}.tex'])
    os.remove('index_transformed.md')
Apply appropriate transformations to markdown files
so that they can be compiled properly into a PDF report via
LaTeX.
def build_report(report_name):
    ' Apply appropriate transformations to markdown files\n    so that they can be compiled properly into a PDF report via\n    LaTeX. '
    with open('index.md', 'r') as f:
        lines = [transform_line(line) for line in f]
    with open('index_transformed.md', 'w') as f:
        f.writelines(lines)
    sp.call(['pandoc', '--template', '../pandoc_report_template.tex', '--pdf-engine', 'lualatex', '-V', f'reportname={report_name}', '-N', '-f', 'markdown+tex_math_dollars', 'index_transformed.md', '-o', f'{report_name}.tex'])
    sp.call(['latexmk', '-lualatex', f'{report_name}.tex'])
    os.remove('index_transformed.md')