]> code.communitydata.science - cdsc_tex.git/blob - new_knitr_document
added a version of a single slide template (based on kaylea's taboo topics)
[cdsc_tex.git] / new_knitr_document
1 #!/bin/sh
2
3 # Helper script to export LaTeX templates for new documents
4 # Copyright (c) 2009-2016 Benjamin Mako Hill <mako@atdot.cc>
5 # Released under the GPLv3 or later.
6
7 CURDIR=$(pwd)
8 TMPDIR=$(mktemp -d)
9
10 if test $1
11 then
12     cd "$HOME/tex/cdsc_tex"
13     git archive --format=tar knitr paper_template|tar x --strip=1 -C "$TMPDIR"
14     cd "$CURDIR"
15
16     # get rid of paper_template subdir
17     mv "$TMPDIR" "$1"
18     cd "$1";
19     mv "text.Rtex" "$1.Rtex"
20 else
21     echo "specifiy a directory where the template should go";
22 fi

Community Data Science Collective || Want to submit a patch?