1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-18 18:07:45 +01:00

30 lines
834 B
Plaintext
Raw Normal View History

2020-05-04 10:53:44 +02:00
#!/bin/bash
2019-10-16 16:55:09 +02:00
# copying tex templates
latexdir=~/code/main/latextemplates/
2019-10-16 16:55:09 +02:00
[ -z "$2" ] && echo "missing argument: filename (no ending)" && return 1
articletemp=${latexdir}latex_article/article.tex
beamertemp=${latexdir}latex_beamer/beamer.tex
exercisetemp=${latexdir}latex_exercise_header/header.tex
handouttemp=${latexdir}latex_handout/handout.tex
2019-10-16 16:55:09 +02:00
case "$1" in
a*) cp "$articletemp" $2.tex ;;
b*) cp "$beamertemp" $2.tex ;;
e*) cp "$exercisetemp" $2.tex ;;
h*) cp "$handouttemp" $2.tex ;;
*) cat << EOF
Allowed options
2020-04-02 13:53:34 +02:00
article NAME get article-template with given NAME
beamer NAME get beamer-template with given NAME
exercise NAME get exercise-template with given NAME
2019-10-16 16:55:09 +02:00
handout NAME get handout-template with given NAME
All of these commands can be truncated,
i.e. \`textemp a\` for \`textemp article`\.
EOF
esac