This is my script template using pandoc to translate a markdown file called script.md
to a PDF. The script is created
using the markdown-script
package.
- pandoc has to be installed and be available in the
PATH
- The
make
command has to be available in thePATH
- The
dot
command has to be available in thePATH
as well if diagrams should be generated
Building the script into a single self-contained PDF file is done by executing the following command:
make
This is just a project template, so it only contains boilerplate code, that can be changed as required. The following sections explain each file in detail.
This file is written using pandoc's flavour of markdown. The first lines are information for the title slide of the script:
% Title of the presentation
% Author of the presentation
% Date of the presentation
Diagrams are automatically created using dot
from the files ending with .dot
in the diagrams
folder. They are
placed as SVGs in the same diagram
folder, but will have a .svg
ending. By this name it can be included in the
presentation. So diagrams/test.dot
will become diagrams/test.dot.svg
and can be included in the script.md
file:
![test](diagram/test.dot.svg){#fig:test}
Something is shown in [@fig:test].
Code blocks can be written as fenced code blocks as usual in markdown. Additional pandoc-crossref is used to allow referencing code blocks in markdown:
```javascript
console.log('Test');
```
: Console caption {#lst:console}
Something is shown in [@lst:console].