I am automating the production of LaTeX files but am noticing that depending on the selected database and scripting language there can be length limitations on the character strings being retrieved.

Q: Is there a cross platform text hungry (no 256 character limitations during exports - I know most text fields do have a customizable length limit) database system that is compatible with complex symbols and characters (i.e. new lines) that your experience has been shown to be highly compatible with LaTeX?

I realize this isn't a LaTeX question per se, but since the application is specific to LaTeX I am hoping for practical advice specific to TeX.

My current setup that has lead to problems is:

  • Data in tables in MS Access database
  • Query to concatenate column entries in specific rows into a LateX command
  • An R script to connect to the database (RODBC package) and perform some string operations to build an export file with regular structure.
    • This is the part that fails because a recent update to the package restricts column type exports to 256 characters.
    • Because this is already not a cross platform approach, I am looking to improve the versatility of this flow.
  • LaTeX builds on a manually produced main TeX file that includes these automatically produced files.
  • I've done experiments with MySQL, holding .tex excerpts etc., but had no time to improve my attempts.
    – user31729
    Sep 14 '15 at 21:05
  • You may want to look into templating engines to support your task. Sep 14 '15 at 21:13
  • I'm not sure what TeX-specific advice you are looking for as you don't really ever seem to say. Insofar as there is a TeX aspect to this, it seems likely to be covered by something like this question. I'd say the rest, as it currently is, is off-topic but, whether it is or no, I suspect you would stand a far higher chance of getting a good answer somewhere else.
    – cfr
    Sep 15 '15 at 0:55
  • @cfr - I know just what you mean. I favorited that question months ago. Currently, I am not looking for a 100% tex integrated solution. In part because of the answer to tex.stackexchange.com/questions/254592/…, I am looking for any database or database/script combo that anyone has used that doesn't crash because of 256 character limitations (maybe MySQL and perl???). Maybe it's my scripting choice, maybe it was my database choice, maybe it was both... In this question I am not looking to troubleshoot, but find out what others have successfully used.
    – EngBIRD
    Sep 15 '15 at 3:19
  • You can take a look here tex.stackexchange.com/questions/331594/…
    – mac
    Nov 24 '21 at 14:13

I would recommend using MySQL, and find a good programmer of Perl on jobs.perl.org or at perlmonks.org (if necessary) to help script the interface to the database for storage and retrieval of your TeX. MySQL has multiple data types which it can store, among them one called Text or BLOB. The BLOB type should be more than ample to store your TeX, ranging from 64kb to 4GB of space, but the Perl script to store the TeX would need to escape certain characters for proper handling in the database.

I have regularly stored various forms of text, HTML, etc., in English as well as UTF-8 for Asian languages, in a MySQL database using a Perl interface. If you would like to build your own application, there are a plethora of Perl modules designed specifically for handling TeX/LaTeX, as can be seen HERE.

Not the answer you're looking for? Browse other questions tagged or ask your own question.