Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.8k
Convert article locally
Jakob Kogler edited this pageJun 1, 2018 ·3 revisions
The following commands allow converting a.md
article into a PDF or an HTML page locally.
This has two major advantages overtest.php
:
- Easier workflow if you prefer working in an editor instead of writing online in the webform.
- New images will be included and displayed, which is not possible with
test.php
.
Disadvantages:
- Some Tex formulas that work with this method will not work on the e-maxx-eng website and vica versa. So be careful and test on
test.php
before making a commit.
Requirements:
pandoc
(sudo apt install pandoc
)
You need to be in thesrc
directory of the repo.
To PDF:
sed -e 's@&imgroot&@../img@g;s@\\\\@\\@g;s@\(```cpp\)\s\S\+@\1@g;s@\\_@_@g' graph/mst_kruskal.md | pandoc -s -o converted.pdf
To HTML:
sed -e 's@&imgroot&@../img@g;s@\\\\@\\@g;s@\(```cpp\)\s\S\+@\1@g;s@\\_@_@g' graph/mst_kruskal.md | pandoc -s --mathjax -o converted.html