% ==========================================
\newif\ifpdf 
\ifx\pdfoutput\undefined \pdffalse % we are not running PDFLaTeX 
\else 
\pdfoutput=1 \pdftrue % we are running PDFLaTeX 
\fi
% ==========================================
\usepackage[a4paper,textwidth=14cm]{geometry}
\usepackage[latin1]{inputenc}
\usepackage{varioref}
\usepackage{url}
\usepackage{multicol}
\usepackage{colortbl}
%\usepackage[active]{srcltx}
\usepackage{color}
\usepackage[english]{babel}
%\usepackage{picins}
%\usepackage{fancyhdr}
%\usepackage{picins}
\usepackage{xspace}
% ==========================================
%%% Math
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{bm}
\usepackage{theorem}
\usepackage{stmaryrd}

% ==========================================
%%% Graphics
\usepackage{graphics}
\ifpdf
\usepackage[pdftex]{graphicx} 
\else
\usepackage[ps2pdf]{graphicx} 
\fi
\graphicspath{{figs/}}

% ==========================================
% bib
\usepackage{natbib}
%\bibliographystyle{abbrvnat}
\bibliographystyle{plainnat}

%\bibliographystyle{plain}

% http://merkel.zoneo.net/Latex/natbib.php?lang=fr

% ==========================================
%% PDF configuration 
% http://www.p-joeckel.de/pdflatex/)
% http://ringlord.com/publications/latex-pdf-howto/

%%%% Options of pdflatex
\ifpdf
\DeclareGraphicsExtensions{.pdf,.jpg,.mps,.png,.eps}
\usepackage[pdftex,                %
    bookmarks         = true,%     % Signets
    bookmarksnumbered = true,%     % Signets numérotés
    pdfpagemode       = None,%     % Signets/vignettes fermé à l'ouverture
    pdfstartview      = FitH,%     % La page prend toute la largeur
    pdfpagelayout     = SinglePage,% Vue par page
    colorlinks        = true,%     % Liens en couleur
    urlcolor          = magenta,%  % Couleur des liens externes
    pdfborder         = {0 0 0}%   % Style de bordure : ici, pas de bordure
    ]{hyperref}%                   % Utilisation de HyperTeX
%\usepackage[pdftex,bookmarks,pagebackref]{hyperref}
\pdfadjustspacing=1

%%%% Options for latex + dvips -Ppdf + ps2pdf
\else
\DeclareGraphicsExtensions{.eps,.ps}
\usepackage[ps2pdf,bookmarks,pagebackref]{hyperref}
\fi

%%%% Commun options
\hypersetup{
  linktocpage,%
  %%------------- Color Links ------------------------------ 
  colorlinks=true,% 
  linkcolor=myred,%
  citecolor=mydarkblue,% 
  urlcolor=myblue,%
  menucolor=red,%
  %%------------- Doc Info --------------------------------- 
  pdftitle={The Black Box Toolkit},%
  pdfauthor={},%
  %%------------ Doc View ----------------------------------}
  pdfhighlight=/P,%
  bookmarksopen=false,%
  plainpages=false,
  pdfpagemode=None}

\hyperbaseurl{http://www.creatis.insa-lyon.fr/creatools/}

\definecolor{myblue}{rgb}{0,0,0.7}
\definecolor{myred}{rgb}{0.7,0,0}
\definecolor{mygreen}{rgb}{0,0.7,0}
\definecolor{mydarkblue}{rgb}{0,0,0.5} 

% ==========================================
\def\UserProyectVersion{@PROJECT_VERSION@}
\def\UserProyectVersionDate{@PROJECT_VERSION_DATE@}
\def\todo{\scriptsize\fbox{\bf TODO !!}\normalsize}
\def\x{\bm{x}}
\def\UserProyect{{\xspace}$\texttt{@PROYECT_NAME@}$ }

\def\bb{{\xspace}$\texttt{bb}$ }
%\def\bbp{{\xspace}$\texttt{bbp}$\xspace}

\def\cmake{{\xspace}$\texttt{cmake}$ }

\def\C{{\xspace}$\texttt{C}$ }
\def\CPP{{\xspace}$\texttt{C++}$ }

\def\xml{{\xspace}$\texttt{xml}$ }


\def\lin{{\xspace}\textit{Linux} }
\def\win{{\xspace}\textit{Windows} }


\def\UserDocumentGuide [#1]{
\begin{center}
{\Large \UserProyect}
\vspace{1cm}

{\Huge #1}
\vspace{1cm}

\UserProyect version \UserProyectVersion \hspace{2mm}(\UserProyectVersionDate)
\vspace{0.5cm}

Generated on : \today 
\vspace{0.5cm}

Eduardo D\'avila, Jean-Pierre Roux, Juan Carlos Prieto
\vspace{0.3cm}

CREATIS-LRMN, Centre de Recherche en Imagerie M\'edicale \\ 
CNRS UMR 5220, INSERM U620, INSA Lyon, Universit\'e Claude-Bernard Lyon 1

\end{center}
\tableofcontents
\listoftables
\listoffigures
}

% ==========================================
%%% mode: latex
%%% TeX-master: "UserProyectUsersGuide"
%%% End: 

\newcounter{Ctrfile}
%% env
\newenvironment{file}[1]
{
\bigskip\hrule\smallskip
\stepcounter{Ctrfile}
\textbf{File #1}
%\hspace{0.2cm}\arabic{Ctrfile}\hfill \textbf{#1}
\smallskip\hrule\medskip
%\algocaption{#1}
}
{
\hrule\smallskip
\hfill\textbf{End of file}
\smallskip\hrule
\bigskip
}
