Skip to content

Instantly share code, notes, and snippets.

@ElectricCoffee
Last active August 29, 2015 14:07
Show Gist options
  • Save ElectricCoffee/96bf04dc72f398bdbce4 to your computer and use it in GitHub Desktop.
Save ElectricCoffee/96bf04dc72f398bdbce4 to your computer and use it in GitHub Desktop.
Sets up a latex file with the bare minimum amount of text
function setup-latex() {
if [ $# -eq 0 ]
then FILENAME="default.tex"
else FILENAME="$1.tex"
fi
echo "Creating $FILENAME for you..."
touch $FILENAME
echo "\documentclass[12pt, a4paper]{article}" > $FILENAME
echo "\usepackage[utf8]{inputenc}" >> $FILENAME
echo -e "\\usepackage{listings} \n" >> $FILENAME
echo "\begin{document}" >> $FILENAME
echo " % text goes here" >> $FILENAME
echo "\end{document}" >> $FILENAME
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment