revised the latex plugin so that it will work in both http and https protocols