Merge pull request #18 from oreillymedia/sarah

Changing data-type="latex" to data-type="tex"
adding a gsub line to remove extraneous newlines from output