Skip to content

Instantly share code, notes, and snippets.

@ajalab
Created April 17, 2017 10:48
Show Gist options
  • Save ajalab/7b282e262c222f63c571e75317b5daee to your computer and use it in GitHub Desktop.
Save ajalab/7b282e262c222f63c571e75317b5daee to your computer and use it in GitHub Desktop.
Markdownで数式が書けるPDFを作る
MD = $(wildcard *.md)
TEX = $(MD:%.md=%.tex)
PDF = $(MD:%.md=%.pdf)
.SECONDARY: $(TEX)
all: $(PDF)
%.tex: %.md
pandoc -o $@ -f markdown_github+raw_tex+pandoc_title_block -V documentclass=ujarticle -V geometry:margin=1in -s --listings $<
%.dvi: %.tex
uplatex -kanji=utf8 -file-line-error -halt-on-error -interaction=nonstopmode $<
%.pdf: %.dvi
dvipdfmx $<
.PHONY: clean
clean:
rm -f *.aux *.log *.out *.dvi $(TEX) $(PDF)

% タイトル % 名前 % 2017/1/1

課題1

\begin{align*} \sin(x) \ \cos(x) \end{align*}

int main(int argc);

課題2

課題3

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