#!/bin/sh

SOURCE_FILE_NAME="Projet_brevet_03.md"
DEST_FILE_NAME="Projet_brevet_03.pdf"
DEST_FILE_NAME_PROTECTED="Projet_brevet_03_protected.pdf"
#INDEX_FILE="INDEX"
TEMPLATE="eisvogel_mod.latex"
DATE=$(date "+%d %B %Y")
DATA_DIR="."

SOURCE_FORMAT="markdown+pipe_tables+backtick_code_blocks+auto_identifiers+yaml_metadata_block+implicit_figures+table_captions+footnotes+smart+escaped_line_breaks+header_attributes"

SOURCE_FORMAT2="markdown\
  +pipe_tables\
  +backtick_code_blocks\
  +auto_identifiers\
  +yaml_metadata_block\
  +implicit_figures\
  +table_captions\
  +footnotes\
  +smart\
  +escaped_line_breaks\
  +header_attributes"

#pandoc "$SOURCE_FILE_NAME" -o "$DEST_FILE_NAME" --from markdown --template "$TEMPLATE" --listings -M date="$DATE"
pandoc "$SOURCE_FILE_NAME" -s -o "$DEST_FILE_NAME" -f "$SOURCE_FORMAT" --data-dir="$DATA_DIR" --template "$TEMPLATE" --toc --listings --columns=50 --number-sections --dpi=300 --pdf-engine xelatex -M date="$DATE"
