1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
This directory contains the vistrails package for latex.
It allows you to include the image generated by vistrails
by calling vistrails directly.
To use it, copy vistrails.sty and includevistrail.py to the same
place where your .tex files are.
add the following lines to the beginning of the latex file:
\usepackage{vistrails}
If you want to run a local copy of vistrails (see head.tex file for instructions on the different platforms and versions of latex):
\renewcommand{\vistrailspath}{/path/to/run.py}
If you want to use a media wiki server (see http://www.vistrails.org/usersguide/v2.0/html/latex.html for instructions on how to set up the server), add the following to your tex file:
\renewcommand{\vistrailspath}{http://yourwebserver.somethingelse/run_vistrails.php}
To embed the links in the generated images, use
\renewcommand{\vistrailsdownload}{http://yourwebserver.somethingelse/download.php}
or just set to empty to make the images not clickable:
\renewcommand{\vistrailsdownload}{}
This extension uses python. If you don't have python on your path, use this
to set the python interpreter:
\renewcommand{\vistrailspythonpath}{python3}
Then include the following command where you would like to include
the vistrails images:
\vistrails[host=<your_host>,
db=vistrails,
version=<version_number>,
vtid=<vistrails_id>,
tag=<tag>
port=3306,
buildalways, %will force execution or download
execute, % vistrails will execute the workflow after the user opens it after clicking on the image
showspreadsheetonly, % only the spreadsheet will be shown when the user opens the workflow
pdf, % download images as pdf files
showworkflow, % show the workflow instead of the results
showtree, % show version tree instead of the results
getvtl, % will also download the vistrail/workflow
]{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
After running at least once, VisTrails will cache the images and latex
instructions.
The latex code will be in the "cached" folder and the images in
vistrails_images.
If you set the \vistrailspythonpath to a invalid path VisTrails will use
the cached files.
The option -shell-escape needs to be activated on the latex command line:
pdflatex -shell-escape example.tex
Vistrails will create in the current directory a directory called
vistrails_images/host_db_vtid_version with the png files generated by
the spreadsheet.
See head.tex for a complete example of usage.
It is also possible to embed workflow results stored in crowdlabs.org
To use it, copy crowdlabs.sty and includecrowdlabs.py to the same
place where your .tex files are. Do not use this in conjunction with the vistrails extension.
add the following lines to the beginning of the latex file:
\usepackage{crowdlabs}
Then go to crowdlabs.org and visit the page of the workflow you want to embed and copy the embed to Latex snippet.
|