+function latexdiff () {
+ # wdiff -n \
+ # -w $'\033[30;43m'"[$1]"$'\033[30;41m ' -x $'\033[0m' \
+ # -y $'\033[30;43m'"[$2]"$'\033[30;42m ' -z $'\033[0m' \
+ # $*
+
+ wdiff -n \
+ -w $'\033[30;41m' -x $'\033[0m' \
+ -y $'\033[30;42m' -z $'\033[0m' \
+ $*
+
+ # | \grep $'\033'"\|section{"
+}
+
+# Looks for the most recent .log and pdflatex + bibtex the
+# corresponding tex file
+
+function rl () {
+ RECENT_LOG=$(find -maxdepth 1 -name "*.log" -type f | head -1)
+ if [[ ${RECENT_LOG} ]]; then
+ FILE=${RECENT_LOG/.log/}
+ pdflatex ${FILE}
+ bibtex ${FILE}
+ pdflatex ${FILE}
+ pdflatex ${FILE}
+ if [[ "$1" == "--xpdf" ]]; then
+ xpdf ${FILE}.pdf
+ fi
+ else
+ echo "Can not find a recent log." >&2
+ return 1
+ fi
+}
+
+