added option to select between pdf and dvi