I am still a novice in this field, writing only basic papers with Tex. Altough my question may still lay beyond my practice I would like to ask if any Tex is able to load data (texts and pictures specificly) from SQL database, like Helios Inuvio for example? My desire is to create reports via Tex from the database. Do not need specific answer, at least what to do to go further.
there are basically two approaches you can take:
Use shell-escape: If you pass
-shell-escapeto TeX, then you can run arbitrary shell commands and read their output. Since many databases come with command line cliens which are more or less scriptable, this allows you to access the database.
Or use LuaTeX. LuaTeX allows you to use arbitrary Lua code, so you can integrate it with any Lua SQL library. See e.g. Using LuaLaTeX and SQLite3 for SQLite or the LuaSQL library for a more general system. These require you to install these libraries separately, they do not come as part of your typical TeX distribution.
I don't know if you can do it directly with TeX (probably can with some arcane code), however if you are interested in dynamic reports it is worth looking at either
- R language for statistical computing and the packages sweave (and knitr if you can live with markdown)
- Python and the package Pweave
Both R and Python can work really well with SQL databases, and process data, making them much more flexible than vanilla TeX.
I have personal experience with sweave and knitr, and they both work remarkably well and consistently, once you take some time to understand their underlying philosophy and differences from TeX. I haven't really managed to start with Pweave, but its in my scopes .