Skip to content

Instantly share code, notes, and snippets.

@jduckles
Created December 2, 2024 00:41
Show Gist options
  • Save jduckles/b220b4616910b710bd215275da1cfd78 to your computer and use it in GitHub Desktop.
Save jduckles/b220b4616910b710bd215275da1cfd78 to your computer and use it in GitHub Desktop.
# Define the source directory and get all .md files
SRC_DIR := .
MD_FILES := $(wildcard $(SRC_DIR)/*.md)
# Define the output files for option1 and option2
PANDOC_FILES := $(patsubst %.md,%-pandoc.docx,$(MD_FILES))
STENCILA_FILES := $(patsubst %.md,%-stencila.docx,$(MD_FILES))
all: pandoc stencila
pandoc: $(PANDOC_FILES)
stencila: $(STENCILA_FILES)
%-stencila.docx: %.md
cargo run -p cli convert $< $@
%-pandoc.docx: %.md
pandoc -i $< -o $@
clean:
rm -f *-pandoc.docx *-stencila.docx
.PHONY: all stencila pandoc clean
title subtitle authors date
Document Title
Subtitle
Author Number1
Author Number2
December 2, 2024

This document has a title:, subtitle:, authors:, and date: in its yaml header.

This is a footnote 1

Including an image

Comments should not be passing through

HTML Comments shouldn't appear in the output doc.

Footnotes

  1. Text of the footnote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment