%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Copyright (C) 2014-2015, New York University.
%% Copyright (C) 2011-2014, NYU-Poly.
%% Copyright (C) 2006-2011, University of Utah.
%% All rights reserved.
%% Contact: contact@vistrails.org
%%
%% This file is part of VisTrails.
%%
%% "Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%%
%%  - Redistributions of source code must retain the above copyright notice,
%%    this list of conditions and the following disclaimer.
%%  - Redistributions in binary form must reproduce the above copyright
%%    notice, this list of conditions and the following disclaimer in the
%%    documentation and/or other materials provided with the distribution.
%%  - Neither the name of the New York University nor the names of its
%%    contributors may be used to endorse or promote products derived from
%%    this software without specific prior written permission.
%%
%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
%% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
%% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
%% PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
%% CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
%% EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
%% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
%% OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
%% WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
%% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
%% ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}
\usepackage{vistrails}

%% uncomment lines below and set to a local path if you want to run vistrails
%% locally. Otherwise, we will run at www.vistrails.org

%% If you are running on a Mac from a binary distribution uncomment the next 2 lines, modifying them according to your system configuration
%\renewcommand{\vistrailspath}{/Applications/VisTrails/VisTrails.app/Contents/MacOS/vistrails}
%\renewcommand{\vistrailsenv}{DYLD_LIBRARY_PATH= }

%% If you are running on Windows from the binary distribution uncommnet the next 3 lines
%\renewcommand{\vistrailspath}{C:/Program Files (x86)/VisTrails/vistrails/run.py}
%\renewcommand{\vistrailspythonpath}{C:/Program Files (x86)/VisTrails/Python27/python.exe}
%\renewcommand{\vistrailsenv}{PATH="C:/Program Files (x86)/VisTrails"}

%% If you are running from source uncomment and modify the lines below 
%% according to your system configuration.
% \renewcommand{\vistrailspath}{D:/emanuele/vistrails/vistrails/run.py}

%% If using MikTex or cygwin on Windows, you need to set the Path to point to your Qt Libraries
%\renewcommand{\vistrailsenv}{PATH=D:/Qt/4.6.3/bin}

%% If your python is in the path, you don't need to uncomment the line. Otherwise 
%% add the complete path to your python executable
%\renewcommand{\vistrailspythonpath}{C:/Python27/python.exe}

\begin{document}

This document shows examples of how to embed a vistrail from a local
file. The file is head.vt and it is located in the same folder as this
file.

To build the pdf version of this document, configure this file
according to your platform and from a terminal window type:
\begin{verbatim}
make head
\end{verbatim}

or
\begin{verbatim}
pdflatex -shell-escape head
\end{verbatim}

Embedding the results of workflow \emph{aliases}:
\begin{center}
\vistrail[filename=head.vt,
version=15]{width=6cm}
\end{center}

Embedding the workflow \emph{aliases} as a pdf:
\begin{center}
\vistrail[filename=head.vt,
version=15,
pdf,
showworkflow]{width=6cm}
\end{center}

Embedding a workflow as a smart tag (if the tag changes to another
workflow, the new workflow will be used when the latex file is
compiled)
\begin{center}
\vistrail[filename=head.vt,
version=42,
tag={volume rendering},
buildalways]{width=6cm}
\end{center}

Embedding the complete tree:
\begin{center}
\vistrail[filename=head.vt,
buildalways,
showtree]{width=8cm}
\end{center}

%% Uncomment the following part part for accessing workflows directly
%% in a database

% Embedding workflow result:
% \begin{center}
% \vistrail[host=localhost,
% db=vistrails,
% port=3306,
% vtid=1,
% version=49]{width=6cm}
% \end{center}

% Embedding workflow graph as pdf
% \begin{center}
% \vistrail[host=localhost,
% db=vistrails,
% port=3306,
% vtid=1,
% version=49,
% pdf,
% showworkflow]{width=6cm}
% \end{center}

% Embedding the tree
% \begin{center}
% \vistrail[host=localhost,
% db=vistrails,
% port=3306,
% vtid=1,
% buildalways,
% showtree]{width=8cm}
% \end{center}
\end{document}

