TEX = $(addsuffix _.tex, $(basename $(shell ls *.mdwn)))
ALL = $(TEX)

all: $(ALL)

%_.tex: %.mdwn
	cat < $< | sed -e 's/SCB/\\scb\\/g' -e 's/^$$/\\mypar\n/' | pandoc -f markdown -t latex > $@

clean:
	rm -f $(ALL)