You can use pandoc to convert any .md
file to LaTex or beamer based .pdf
and .html
These are (the simplest, Haskell platform / GHC independent) instructions that work on Linux Ubuntu and should easily be transferable to Mac. For Windows most of it will probably be done outside the command line. If you run into trouble, the main things to make sure are
- matching versions of the different packages with pandoc
- paths contain the packages
Relevant files are all in latex
folder
For Linux
- Install the newest
pandoc
andpandoc-citeproc
version here. Note: For Linux absolutely use the debian package, do notsudo apt-get install
, it's outdated! - Copy pre-built executable
pandoc-crossref
release corresponding to your pandoc version available here to one of the folders in yourpath
(determine those folders using:echo $PATH
) - Install
python-pandocfilters
usingpip install
orapt-get install
- For labeling and crossreferencing, use the Python pandoc filters by Michael Faerber with syntax here
- The only thing you need is to download and copy all python files into a folder which you then refer to in the make file
- For our example the files are already in the
pandoc
subfolder in this repo so you can skip this step - If you want to define new environments, you can do so in
macros.sty
- it includes the header too
- To convert the
.md
file into.pdf
, go to the console and run
make example.pdf
in the console. Alternatively if you have multiple files you can also run
make all
And voila you can use macros and amsmath environments like you're used to.
For Mac, the following has been reported to work:
Optional: conda create -n YOUR_ENV python=3.11
and conda activate YOUR_ENV
Then in the command line, type
brew install pandoc
brew install pandoc-crossref
pip install pandocfilters
You should now be done.
I'm still working on lua filters to make beamer presentations fast. Current samples are rudimentary.
Relevant files are in beamer
folder.
- For slides with animations run
make sample-slides.pdf
- For handout without animations run
make sample-handout.pdf
Caveat: Currently handouts cannot include links...
Relevant files are all in html
folder. Run make all
.
This readme can be converted to html using the makefile in that subfolder.
When writing formulas in markdown like $
, else it might give a compile error.