Hi!
First of all I want to thank you by this awesome tool!
Now, I want to suggest a script using pandoc to convert a mdp presentation to PDF.
I could reach a nice PDF from this:
#!/usr/bin/env bash
file=''
as_slides=false
usage='
Usage:
mdp2pdf [ --as-slides | -s ] FILE
'
err_argc='erro: número insuficiente de argumentos:'
err_file='erro: arquivo não encontrado:'
if [[ $# -lt 1 ]]; then
echo "$err_argc $#"
echo "$usage"
exit 1
fi
if [[ $# -gt 0 ]]; then
[[ "$1" =~ --as-slides|-s ]] && as_slides=true && shift 1
[[ ! -f "$1" ]] && echo -e "$err_file $file \n$usage" && exit 1
file="$1"
fi
cleared=$(mktemp --suffix=.md)
trap 'rm -f "$cleared"' EXIT
sed_pattern='s/(\s*->\s*(.*))/\2/;/^%/d;s/\s*\^\s*//'
pandoc_args=(
"--pdf-engine=tectonic"
"-f" "markdown"
"-V" "linkcolor:blue"
"-V" "geometry:a4paper"
"-V" "geometry:margin=2cm"
"-V" "mainfont=DejaVu Serif"
"-V" "monofont=DejaVu Sans Mono"
"-o" "${file%.md}.pdf"
)
if [[ "$as_slides" == true ]]; then
sed_pattern+=';s/^---/\\newpage/'
pandoc_args+=(
"-V" "documentclass=extarticle"
"-V" "classoption=landscape"
"-V" "fontsize=12pt"
)
fi
sed -E "$sed_pattern" "$file" > "$cleared"
pandoc "$cleared" "${pandoc_args[@]}"
Here pandoc is using tectonic as PDF engine but it can be changed.
Also, this script assumes user are using --- (three dashes) for slides delimitation.
For this piece of slide (backslashes were add in ``` to not break this issue formatting):
---
-> # Operadores e expressões
## Operadores aritiméticos
Em **C** existem os operadores aritiméticos
comuns a qualquer linguagem de programação:
^
\```c
i = i + 3; // Adição
i = i - 8; // Subtração
i = i * 9; // Multiplicação
i = i / 2; // Divisão
i = i % 5; // Módulo
\```
^
Bem seus atalho de atribuição:
\```c
i += 3; // igual a "i = i + 3"
i -= 8; // igual a "i = i - 8"
i *= 9; // igual a "i = i * 9"
i /= 2; // igual a "i = i / 2"
i %= 5; // igual a "i = i % 5"
\```
^
Em **C**, não existe o **operador de exponenciação**.
Nesse caso, usa-se as funções `pow()` e similares
providas pela biblioteca `main.h`.
---
This is what I get using that script with --as-slides flag:

Hi!
First of all I want to thank you by this awesome tool!
Now, I want to suggest a script using
pandocto convert amdppresentation to PDF.I could reach a nice PDF from this:
Here
pandocis usingtectonicas PDF engine but it can be changed.Also, this script assumes user are using
---(three dashes) for slides delimitation.For this piece of slide (backslashes were add in ``` to not break this issue formatting):
This is what I get using that script with
--as-slidesflag: