#!/bin/bash #OV_PATH=`ov_GET_PATH` OV_PATH=`pwd` # Need the argument # if [ "foo$1" == "foo" ];then echo "Argument missing" >&2 exit 1; fi # Set the article's file name # article_file="../articles/$1/index.tex" # Enter the text_stuff directory # (that's where all the work is actually done) # cd tex_stuff if [ $? != 0 ];then echo Cannot enter text_stuff, exiting... >/dev/stderr exit fi if [ ! -f issue_head.tex ];then echo "issue_head.tex missing. Are you in the right spot?" >&2 exit 1; fi if [ ! -f $article_file ];then echo "$article_file not found. The article you want to process doesn't seem to be in this issue." >&2 exit 1; fi echo " \\begin{document} \\inputpaper{../articles/$1/index} \\end{document} " > article_tail.tex cat issue_head.tex article_tail.tex > article.tex # Delete the old article, just in case # rm article.pdf # Important bits # export TEXINPUTS="../common:../graphics:" pdflatex article.tex mv article.pdf $1.pdf # Return whatever pdflatex returned... # exit $?