|
|
@ -1,29 +1,34 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/sh
|
|
|
|
# copying tex templates
|
|
|
|
# copying latex templates from my template repository
|
|
|
|
|
|
|
|
# (not included in the dotfiles)
|
|
|
|
|
|
|
|
|
|
|
|
latexdir=~/code/main/latextemplates/
|
|
|
|
latexdir=~/code/main/latextemplates
|
|
|
|
|
|
|
|
|
|
|
|
[ -z "$2" ] && echo "missing argument: filename (no ending)" && return 1
|
|
|
|
articletemp=${latexdir}/article/*
|
|
|
|
|
|
|
|
beamertemp=${latexdir}/beamer/*
|
|
|
|
articletemp=${latexdir}latex_article/article.tex
|
|
|
|
exercisetemp=${latexdir}/exercise/*
|
|
|
|
beamertemp=${latexdir}latex_beamer/beamer.tex
|
|
|
|
handouttemp=${latexdir}/handout/*
|
|
|
|
exercisetemp=${latexdir}latex_exercise_header/header.tex
|
|
|
|
cvtemp=${latexdir}/cv/*
|
|
|
|
handouttemp=${latexdir}latex_handout/handout.tex
|
|
|
|
lettertemp=${latexdir}/letter/*
|
|
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
case "$1" in
|
|
|
|
a*) cp "$articletemp" $2.tex ;;
|
|
|
|
a*) cp $articletemp . -r && exit;;
|
|
|
|
b*) cp "$beamertemp" $2.tex ;;
|
|
|
|
b*) cp $beamertemp . -r && exit ;;
|
|
|
|
e*) cp "$exercisetemp" $2.tex ;;
|
|
|
|
c*) cp $cvtemp . -r && exit ;;
|
|
|
|
h*) cp "$handouttemp" $2.tex ;;
|
|
|
|
e*) cp $exercisetemp . -r && exit ;;
|
|
|
|
*) cat << EOF
|
|
|
|
h*) cp $handouttemp . -r && exit ;;
|
|
|
|
|
|
|
|
l*) cp $lettertemp . -r && exit ;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cat << EOF
|
|
|
|
Allowed options
|
|
|
|
Allowed options
|
|
|
|
article NAME get article-template with given NAME
|
|
|
|
article get article-template to current dir
|
|
|
|
beamer NAME get beamer-template with given NAME
|
|
|
|
beamer get beamer-template to current dir
|
|
|
|
exercise NAME get exercise-template with given NAME
|
|
|
|
cv get curriculum vitae-template to current dir
|
|
|
|
handout NAME get handout-template with given NAME
|
|
|
|
exercise get exercise-template to current dir
|
|
|
|
|
|
|
|
handout get handout-template to current dir
|
|
|
|
|
|
|
|
letter get letter-template to current dir
|
|
|
|
|
|
|
|
|
|
|
|
All of these commands can be truncated,
|
|
|
|
All of these commands can be truncated,
|
|
|
|
i.e. \`textemp a\` for \`textemp article`\.
|
|
|
|
i.e. \`textemp a\` for \`textemp article`\.
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
esac
|
|
|
|
|
|
|
|