계속 pandoc 을 사용해 markdown 로 간단하게 리포트적인 것을 만들기

1600 단어 PandocTeXmarkdownPDF
어제 쓴 기사의 보고서를 만들기위한 모든 것을 생성하는 쉘 스크립트를 썼다.
makerepo.sh #!/bin/sh dirName=$1 if test $# -ne 1; then echo "pleas dir name" return 0 fi makefile=$dirName/makefile contents=$dirName/contents.md main=$dirName/main.tex echo -n "report name? : " read reprotname echo -n "author name? : " read author makefiletxt="TEX=platex DVI2PDF=dvipdfmx MKDFILE=contents.md ROWTEX=rowtex.tex TEXFILE=contents.tex SOURCES=main.tex all: makexbb md2tex converttex dvi2pdf clean makexbb: @extractbb*.png md2tex: @pandoc \$(MKDFILE) -o \$(ROWTEX) converttex: \$(ROWTEX) @cat\$^\\\\ | sed 's/includegraphics/includegraphics[width=1.0\\\\\\\\columnwidth]/g' \\\\ > \$(TEXFILE) .tex.dvi: main.tex @\${TEX}\$< @\${TEX}\$< dvi2pdf: \$(SOURCES:.tex=.dvi) @\${DVI2PDF}\$^ clean: @rm -f *.dvi *.aux *.log \$(ROWTEX)" maintext="\\\\documentclass[11pt,a4paper]{jsarticle} \\\\usepackage{amsmath,amssymb} \\\\usepackage{bm} \\\\usepackage{ascmac} \\\\usepackage[dvipdfmx]{graphicx,color} \\\\usepackage{longtable} \\\\usepackage{booktabs} \\\\title{$reprotname} \\\\author {$author} \\\\begin{document} \\\\maketitle \\\\input{contents} \\\\end{document}" mkdir $dirName touch $makefile touch $contents touch $main echo $makefiletxt > $makefile echo $maintext > $main 이런 느낌이 된다. %mkrepo.sh dirname report name? : 보고서 제목 author name? : 쓴 사람 %cd dirname %ls contents.md main.tex makefile % make

좋은 웹페이지 즐겨찾기