This simple module allows you to add a excerpt of latex to a content type. You will then get a "download PDF" link at the bottom of pages of that type, and latex will be run, using your code, and the output sent to your browser.
Remarkably, it seems to be pretty fast !
The full process (and here is the trick) is that your latex code is "evaled" by drupal - so, you can put
One day I was walking down the street, and I saw a <?php echo $node->title ?>.
Then, the result is run through latex, dvips and finally ps2pdf. I find this route gives me the best results.
So, how to use it:
- install/enable the module as per normal
- add a content type, or edit an existing content type
- at the bottom, you'll find a new section marked Latex tex
- Add tex code in there. This should be the FULL code you want to appear in your file.tex. (right now, the latex TEXINPUT path is set to include the module's directory, and the site's files directory. In general, I'd guess most people should keep the latex input to a minimum and simply include a larger file from one of those places....)
- Thats it - not.
In reality, if you know about latex, you will want to make lots of changes to this module to make sure it builds things just the way you want. I've not made things configurable from the UI - sorry.