From c0f4fc52d8408431be86bd25f0f0089ed01c349b Mon Sep 17 00:00:00 2001 From: urosm Date: Tue, 1 Oct 2024 14:55:43 +0200 Subject: [PATCH] Popravljeni recepti in konfiguracija za pdf-je --- .gitignore | 1 + makefile | 10 ++++++++++ pandoc/defaults/pdf.yaml | 7 +++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 57f080e..7f29d40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.html *.docx +*.pdf !reference-sl.docx diff --git a/makefile b/makefile index a7250c8..22b26cb 100644 --- a/makefile +++ b/makefile @@ -6,6 +6,7 @@ PANDOC ::= pandoc --data-dir pandoc MDFILES != find *.md 2>/dev/null DOCXFILES ::= $(MDFILES:.md=.docx) HTMLFILES ::= $(MDFILES:.md=.html) +PDFFILES ::= $(MDFILES:.md=.pdf) all: $(HTMLFILES) @@ -21,6 +22,15 @@ $(DOCXFILES): .md.docx: $(PANDOC) -d docx -o $@ $< + +$(PDFFILES): pandoc/defaults/pdf.yaml + +.SUFFIXES: .md .pdf +.md.pdf: + $(PANDOC) -d pdf -o $@ $< + + clean: rm -f $(HTMLFILES) rm -f $(DOCXFILES) + rm -f $(PDFFILES) diff --git a/pandoc/defaults/pdf.yaml b/pandoc/defaults/pdf.yaml index 94b2c3a..ccbad2d 100644 --- a/pandoc/defaults/pdf.yaml +++ b/pandoc/defaults/pdf.yaml @@ -1,10 +1,13 @@ --- -from: markdown+wikilinks_title_before_pipe +from: markdown citeproc: true csl: chicago-fullnote-bibliography-sl metadata: linestretch: 1.5 fontfamily: tgtermes fontsize: 12pt - csquotes: true +to: pdf +filters: +- localize_quotes.lua +- delink.lua ...