Bashful LaTeX
Authors of dynamic websites are used to certain luxuries. We routinely arrange for our application servers to run scripts and perform computations, incorporating their results into the pages presented to the user. Indeed, this is part of what we mean by “dynamic” sites, and this ability is taken for granted as part of the world of electronic document serving on the web.
If we also happen to be familiar with the older world of electronic document creation before the web, which reaches its pinnacle of excellence with TeX and the macro packages built upon it, including LaTeX, we know that we have traded typographic excellence for dynamic power and flexibility.
The bashful
package is one interesting solution to the problem of introducing dynamic elements into the PDFs produced by LaTeX. This is a LaTeX package written by Joseph (Yossi) Gil and used by including a line like this in your document’s preamble:
\usepackage[verbose, unique]{bashful}
His paper describing the package itself includes that line and masterfully shows how to use bashful
by example. The tutorial includes examples of bashful
’s introspection abilities, quoting its own source, and the ability to run an external bash
script or command and include its output in the typeset document. Since these commands can in turn run any program in any language, the package allows LaTeX to call out to any program and incorporate its standard output and error in to the typesetting process. Gil illustrates this by mentioning the weather conditions at the time the paper was typeset; this information was looked up and inserted into the document by LaTeX automatically.