README.md (2492B)
1 # remark-slides 2 3 This is my personal distribution of [remarkjs](https://remarkjs.com/). 4 5 ## documentation 6 For docs on my patches see the example presentation or look at the source code 7 at `remark/scripts.js`. 8 9 ## patches 10 The styles are all shamelessly taken from the official remark presentation. But 11 I extended it with a few scripts/patches: 12 13 ### leftmenu.js 14 creates an overview about the slides at the left side, just like in the official 15 presentation on [remarkjs.com](https://remarkjs.com/), but it can be made with 16 much less redundant markdown code. 17 18 ### imagelist.js 19 scales images automatically, so that they always fit nicely without the need of 20 specifying a height or width or alignment. 21 22 ### arrow.js 23 For every bullet point starting with an arrow the bullet itself gets replaced 24 with an arrow 25 26 For these scripts to work, there is a slight modification in the official 27 remark code necessary, which allows to insert a function, which preprocesses 28 the slides between parsing and rendering. This modification can be found in the 29 `remark-preprocessor.diff`-file. For the version in `remark/remark.min.js` this 30 patch is already applied. 31 32 I also downloaded the fonts from Google Fonts to make all presentations offline 33 available and avoid the Google trackers (See `remark/fonts` directory). 34 35 ## compiler script 36 It is a real pain to edit Markdown inside a HTML text field: There is weird 37 stuff at the top and at the bottom and syntax highlighting and auto-completion 38 are going crazy. I think one can embed an external markdown document and 39 request that via HTTP on page load alternatively. But this method requires you 40 to run a real web server instead of just viewing the file in your browser. So I 41 hacked together this little shell script, that combines a markdown document 42 with the HTML boilerplate. You can run it like so (or put a shortcut in your 43 vimrc or configure it in whatever editor you are using): 44 ``` 45 ./remark/compile.sh index.remark 46 ``` 47 48 ## pdf export 49 The slides can be exported to a PDF file with 50 [decktape](https://github.com/astefanutti/decktape). 51 To export, run the following command: 52 ``` 53 decktape remark index.html index.pdf --chrome-arg=--disable-web-security 54 ``` 55 56 To install decktape: (LOOKING AT THIS AGAIN THIS SEEMS LIKE A VERY BAD IDEA...) 57 ``` 58 sudo npm install -g decktape --unsafe-perm 59 ``` 60 61 ## see also 62 - https://github.com/gnab/remark 63 - https://github.com/gnab/remark/issues/72 64 - https://github.com/astefanutti/decktape 65 - https://story.xaprb.com/slides/adirondack/