I was kind of wandering that myself. Never heard of a latex file format before, and the PHP manual doesn't seem to know it either.
Closest thing I found was
this pear class.
In the end it doesn't even matter what a latex file is.
You will just have to know the *syntax* of that format well enough to be able to echo your data correctly. Just as you would a HTML page for a web-page.