VisTrails LaTex Extensions

VisTrails package for LaTeX with ALPS modifications

The VisTrails package for LaTeX with modifications for ALPS is installed in the share/alps/latex directory in your ALPS installation. It allows to include images generated by vistrails by calling vistrails directly from latex.

Using VisTrails in a LaTeX document

Add the following lines to the beginning of the latex file:

\usepackage{vistrails}

Then include the following command where you would like to include vistrails images using the server at www.vistrails.org:

\vistrails[host=vistrails.sci.utah.edu,
db=vistrails,
version=<version_number>,
vtid=<vistrails_id>,
tag=<tag>
port=3306,
buildalways,
execute,
showspreadsheetonly,
pdf]{width=0.45\linewidth}

or use the following command to run it on alps.comp-phys.org, using ALPS packages:

\alpsvistrails[host=vistrails.sci.utah.edu,
db=vistrails,
version=<version_number>,
vtid=<vistrails_id>,
tag=<tag>
port=3306,
buildalways,
execute,
showspreadsheetonly,
pdf]{width=0.45\linewidth}

The tag, port, buildalways, execute, showspreadsheetonly and pdf options are optional. The default value for port is 3306. If buildalways is provided it will always call vistrails, even if it was already called once for the same combination of host, db, version, port and vt_id. If tag is provided, version can be ommitted and buildalways is implicit. execute and showspreasheetonly will affect the link on the generated pdf. If execute is provided the workflow will be execute when open, and showspreadsheetonly will show initially only the spreadsheet. pdf will return the results from the spreadsheet as pdf files The options inside { } are the options you would give to \includegraphics{} command

By default, vistrails will be executed at www.vistrails.org or alps.comp-phys.org and the images downloaded to your hard drive.

If you want to use a different server, add the following to your tex file:

\renewcommand{\vistrailspath}{http://yourwebserver.somethingelse/run_vistrails.php}

or

\renewcommand{\alpsvistrailspath}{http://yourwebserver.somethingelse/run_vistrails.php}

Or if you want to run a local copy of vistrails:

\renewcommand{\vistrailspath}{/path/to/vistrails.py}

This extension uses python. If you don’t have python on your path, use this to set the python interpreter:

\renewcommand{\vistrailspythonpath}{python}

Typesetting the LaTeX file

To use the package, copy vistrails.sty and includevistrail.py to the same place where your .tex files are located. The option -shell-escape needs to be activated on the latex command line when typesetting the file:

pdflatex -shell-escape example.tex

Vistrails will create a directory called vistrails_images/host_db_vtid_version_png or vistrails_images/host_db_vtid_version_pdf containing the png files or pdf files generated by the spreadsheet. See the ALPS 2.0 paper in doc/papers/alps for a complete example of usage.