Compare commits
5 Commits
249832abaa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b3142aa8f | ||
|
|
349d0e0bbc | ||
|
|
2bb0339afc | ||
|
|
50db684e36 | ||
|
|
b67990cca1 |
8
Makefile
8
Makefile
@@ -1,5 +1,5 @@
|
||||
watch:
|
||||
./watch_compile.sh
|
||||
./watch_compile.sh $(word 2,$(MAKECMDGOALS))
|
||||
|
||||
html:
|
||||
./scripts/slides_to_html.sh slides.md
|
||||
@@ -7,10 +7,14 @@ html:
|
||||
pdf:
|
||||
./scripts/slides_to_pdf.sh slides.md
|
||||
|
||||
serve_html: html
|
||||
serve_html:
|
||||
@echo creating html
|
||||
./scripts/slides_to_html.sh slides.md
|
||||
@echo creating links
|
||||
ln -b -s `pwd`/templates/custom.css `pwd`/html/custom.css
|
||||
ln -b -s `pwd`/medias `pwd`/html/medias
|
||||
ln -b -s `pwd`/html/slides.html `pwd`/html/index.html
|
||||
@echo launching server...
|
||||
python -m http.server --directory html 7777
|
||||
|
||||
clean:
|
||||
|
||||
20
README.md
20
README.md
@@ -3,3 +3,23 @@
|
||||
This repos aims to show a structured way to generate an html/pdf slideshow from markdown files
|
||||
|
||||
it depends on `pandoc` for compiling to pdf/html and `inotify-tools` for watching changes.
|
||||
|
||||
## Usage
|
||||
|
||||
### Slides in HTML/RevealJS:
|
||||
|
||||
- `make html`: for creating the html file
|
||||
- `make serve_html`: for launching the server, then open [https://localhost:7777](https://localhost:7777) on your browser
|
||||
|
||||
|
||||
|
||||
### Slides in PDF/LateX:
|
||||
|
||||
- `make pdf`: for creating the pdf file
|
||||
|
||||
Then open the pdf file in your favorite pdf reader
|
||||
|
||||
|
||||
### Compiling the slideset when modifications occur
|
||||
|
||||
- `make watch` should launch an inotiy loop recompiling a pdf by default (for html, launch: `make watch html`)
|
||||
|
||||
@@ -9,7 +9,7 @@ for filename in $*
|
||||
do
|
||||
echo compiling $filename
|
||||
file_out=`echo $filename | sed -e 's/\.md/\.html/g'`
|
||||
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" $filename | pandoc -s --mathjax -t revealjs -o html/$file_out --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -V revealjs-url=https://unpkg.com/reveal.js@5.2.0 --template=./templates/template.revealjs --css custom.css
|
||||
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" $filename | pandoc -s --mathjax="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS_HTML" -t revealjs -o html/$file_out --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -V revealjs-url=https://unpkg.com/reveal.js@5.2.0 --template=./templates/template.revealjs --css=./custom.css --toc --toc-depth=1
|
||||
if [ -f ./templates/custom.css ]; then
|
||||
cp -n ./templates/custom.css ./html/custom.css
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user