Subscribe:   RSS icon   twitter icon

Bashful LaTeX

Lee Phillips
October 25, 2012

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.


Share with Facebook Share with Twitter Share with Reddit Share with StumbleUpon Share with Digg Share with Slashdot
▶ Comment
lee-phillips.org is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.
Quotilizer ... loading ...

Tenuously related:

The best tool for CVs with publication lists.