export to latex|html

- new parameter "outputDir" is used to store outputs
- if pdflatex exists, pdf is automatically generated