nlatexdb Version 0.04

Database Access in LaTeX
Copyright (C) 2011 Robin Höns

Why nlatexdb? The history

A few years ago, I wanted to do database reports, and MS Reporting Services appeared rather inconvenient to me. So I figured I'd use the typesetting power of Latex, and I found latexdb by Hans-Georg Eßer. The idea was great, but unfortunately I couldn't make it run under Windows, so I wrote a clone in Ruby, called ratexdb.

At the time, Ruby had a convenient and powerful database access package called DBI, so I really didn't have to write much code in order to support a whole bunch of data sources. Great! In the next few years, I fixed some bugs, added some nice features at the request of helpful users (thank you!), -- and then I got a new computer.

I installed Latex, I installed Ruby, and it turned out DBI wouldn't work any more. It seems that people have chosen that from now on DBI shall be deprecated, there is a new thing called RDBI, and everybody should use that. I tried it, it didn't work. It depended on some packages, and those packages on some other packages, and I can't really claim I had a good time installing all these packages.

So what did I do? Well, I had a good time rewriting the whole thing in C# -- since my Ruby code was rather ugly anyway, I decided this time I'd do it a bit more cleanly. Most of the code was written in a delayed train, so thanks to the Deutsche Bahn for making this program possible.

Improvements over latexdb

Improvements over ratexdb

Requirements

You need Latex (I used Miktex 2.9) and a .Net runtime 2.0 or newer. Under newer Windows versions, it should already be installed, otherwise you can get it from Microsoft here. Under Linux or MacOS you can use Mono.

For using your favourite database, you might need to install an appropriate database provider. Usually it should be installed automatically with the database client. Mono comes with a whole bunch of DbProviders included.

Download

Nlatexdb is published under the GNU General Public License and available here:

Download nlatexdb 0.04 (2011-08-29)

Added some more debug output. This should help in debugging the SQL queries.

Download nlatexdb 0.03 (2011-08-16)

Added variables RegexSplitter and VariableSplitter.

Added command \texdbforfile.

More debug output.

Download nlatexdb 0.02 (2011-08-16)

Compiled under Mono for .Net 2.0. Should be more platform-independent.

Added exe.config file for some configuration possibilities.

Renamed from natexdb to nlatexdb (turns out there is somebody calling himself natexdb... no need to create name clashes)

Download natexdb 0.01 (2011-08-05)

Initial release.

Please read the README file for more information.

Installation

Just copy nlatexdb.exe to a place where it is found. You might have to install a database provider for your favourite database.

Helper Tools

Nlatexdb is just a preprocessor. So it won't work with multi-part documents (joined by the Latex "\input" command). You can put the query definitions in each file, and run nlatexdb on all of them. But you won't be able to use SQL variables of one file in another file.

Therefore, a kind user sent me an awk script which combines all Latex files in one resulting file: latexmerge.awk

Contact

If you have a question, find a bug, like to propose an improvement, or just wish to tell me you used this tool successfully, contact me!

Acknowledgements

Many thanks to Hans-Georg Eßer for LatexDb.

Many thanks to myself for ratexdb, and to the people who helped improving it.

nlatexdb is Copyright © 2011 Robin Höns.

It is released under the GNU GPL, a copy of which you find in the package after downloading. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Last Change: 29. August 2011 by Robin Höns