Markdown To HTML

Fake Latex For Assignments

Courses demand I use LaTeX, but I want to use markdown, so I will make fake LaTeX.

Workflow:

write markdown in normal editor -> convert to HTML via pandoc -> Style HTML using a lookalike stylesheet -> covert html to pdf (by printing in browser) -> submit

Note: Pandoc can also do direct MD -> LaTeX coversions

I will use Latex.vercel.app style sheet. <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" />

Final pandoc command: pandoc --mathml -o=output.html --template=template.html input.md See template.html below

Relevant Docs:

template.html

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>Fake Latex Assignment</title>
        <meta name="viewport" content="width=device-width,initial-scale=1" />
        <meta name="description" content="Description Goes Here" />
        <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" />
        <style>
            hr {
                break-after: page;
                visibility: hidden;
            }
        </style>
    </head>
    <body>
        $body$
    </body>
</html>