flashcard-tools

Tools for working with LaTeX flashcards
git clone git://lumidify.org/flashcard-tools.git (fast, but not encrypted)
git clone https://lumidify.org/flashcard-tools.git (encrypted, but very slow)
git clone git://4kcetb7mo7hj6grozzybxtotsub5bempzo4lirzc3437amof2c2impyd.onion/flashcard-tools.git (over tor)
Log | Files | Refs | README

notes_compile.sh (593B)


      1 if [ $# -eq 0 ]
      2 then
      3 	echo "USAGE: ./notes_compile.sh <tex file>"
      4 	exit 1
      5 fi
      6 
      7 if [ ! -e "$1" ]
      8 then
      9 	echo "File doesn't exist: $1"
     10 	exit 1
     11 fi
     12 
     13 body=`cat "$1"`
     14 printf '\\documentclass[12pt]{article}\n' > notes_compile.tex
     15 printf '\\usepackage[a4paper]{geometry}\n' >> notes_compile.tex
     16 printf '\\geometry{top=1.0in, bottom=1.0in, left=0.5in, right=0.5in}\n' >> notes_compile.tex
     17 cat defs.tex >> notes_compile.tex
     18 printf '\\begin{document}\n%s\n\\end{document}\n' "$body" >> notes_compile.tex
     19 pdflatex notes_compile.tex
     20 mv notes_compile.pdf `basename $1 .tex`.pdf
     21 rm notes_compile.{aux,log,tex}