Further modifications to rails-latex code to allow multiple formats output