% -*- coding: utf-8; -*-
%
% Copyright (C) 2016 by Paul Gaborit
%
% Tis file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
\documentclass[]{iscram}

\usepackage[utf8]{inputenc}

\usepackage{lipsum}
\usepackage{tikz}
\usepackage{fancyvrb}
\usepackage{listings}
\usepackage{enumitem}
\usepackage{tcolorbox}
\usepackage{multicol}
\usepackage{siunitx}
\lstdefinestyle{common}{
  xleftmargin=.5em,
  xrightmargin=.5em,
  frame=single,framesep=.5em,framerule=0pt,
  fancyvrb=true,
  basicstyle=\ttfamily,
  keywordstyle=\color{cyan!50!blue!75!black}\bfseries,
  commentstyle=\color{red!50!black}\itshape,
  stringstyle=\ttfamily\color{green!50!black},
  numbers=none,
  showspaces=false,
  showstringspaces=false,
  fontadjust=true,
  keepspaces=true,
  flexiblecolumns=true,
  emphstyle=\color{red},
}
\lstdefinestyle{TeX}{
  style=common,
  backgroundcolor=\color{blue!5},
  aboveskip=5pt,
  belowskip=5pt,
  language=[LaTeX]TeX,
  moretexcs={
    %
    abstract, addbibresource, iscramset, keywords, mainmatter,
    maketitle, printbibliography, subsection, subsubsection, url,
    urldef, href, includegraphics, ldots, parencite, citeauthor,
    citeyear, citetitle, midrule, toprule, bottomrule
    %
  },
  fancyvrb=true,
}
\lstdefinestyle{console}{
  style=common,
  backgroundcolor=\color{gray!10},
  aboveskip=5pt,
  belowskip=5pt,
}

\newlist{options}{description}{1}
\setlist[options]{%
  beginpenalty=10000,%
  itemsep=.5\parskip plus .3\parskip minus .2\parskip,
  parsep=.5\parskip plus .3\parskip minus .2\parskip,
  topsep=.5\parskip plus .3\parskip minus .2\parskip,
  partopsep=.5\parskip plus .3\parskip minus .2\parskip,
  style=nextline,labelindent=1em,%
  font=\normalfont\ttfamily}

\colorlet{macro color}{cyan!50!blue!75!black}
\colorlet{option color}{red!50!black}
\colorlet{generic color}{green!40!black}
\newcommand\macro[1]{{\textcolor{macro color}{\ttfamily\bfseries\string#1}}}
\newcommand\option[1]{\textcolor{option color}{\ttfamily#1}}
\newcommand\generic[1]{\textcolor{generic color}{\ttfamily\itshape\makebox{<#1>}}}
\newtcolorbox{pseudoTeX}{colback=blue!5,colframe=blue!5,before=\nobreak}
\let\LaTeXorig\LaTeX
\renewcommand\LaTeX{\bgroup\fontfamily{lmr}\selectfont\upshape\LaTeXorig\egroup}

\addbibresource{iscram-class-doc.bib}

\urldef{\sitewebgind}\url{http://gind.mines-albi.fr}
\urldef{\sitewebminesalbi}\url{http://www.mines-albi.fr}
\urldef{\gmailpaulgaborit}\url{paul.gaborit@gmail.com}
\urldef{\jdmail}\url{j.doe@example.com}
\urldef{\sitex}\url{www.example.com}

\iscramset{
  %CoRe Paper 2017={Documentation pseudo-Track},
  title={
    International Conference on
    Information Systems for Crisis
    Response and Management\\
    \LaTeX{} Class
    %Publications Format
  },
  short title={ISCRAM \LaTeX{} Class},
  author={
    short name={Paul Gaborit},
    full name=Paul Gaborit\thanks{corresponding author},
    affiliation={
      Centre Génie Industriel -- Mines Albi%
      \thanks{\href{http://gind.mines-albi.fr}{\sitewebgind}
        and \href{http://www.mines-albi.fr}{\sitewebminesalbi}}\\
      \href{mailto:paul.gaborit@gmail.com}{\gmailpaulgaborit}
    },
  },
  author={
    full name=Sébastien Truptil,
    affiliation={
      Centre Génie Industriel -- Mines Albi
    },
  },
}

\usepackage{tikzpagenodes}
\usetikzlibrary{fit}
\newcommand\iscramshowframe{%
  \begin{tikzpicture}[remember picture,overlay]
    \node[fit=(current page text area),inner sep=0,node contents=,name=cpta];
    \node[fit=(current page header area),inner sep=0,node contents=,name=cpha];
    \node[fit=(current page footer area),inner sep=0,node contents=,name=cpfa];
    \node[fit=(current page),inner sep=0,node contents=,name=cp];
    
    \path (cpta.north) -- (cpta.center) coordinate[pos=.5] (mid);
    
    \draw[red] (cpta.north west) rectangle (cpta.south east);
    \draw[red] (cpha.north west) rectangle (cpha.south east);
    \draw[red] (cpfa.south west) -- (cpfa.south east);
    
    
    \draw[red,dashed] (cpta.north west) -- (cpta.north west -| cp.west)
    coordinate[pos=.5] (mid);
    \draw[<->,red] (mid) -- (mid |- cp.north)
    node[pos=.5,above,sloped]{\SI{1}{in}};
    
    \draw[red,dashed] (cpta.south west) -- (cpta.south west -| cp.west)
    coordinate[pos=.5] (mid);
    \draw[<->,red] (mid) -- (mid |- cp.south)
    node[pos=.5,above,sloped]{\SI{1}{in}};
    
    
    \draw[<->,red] (cpta.west) -- (cpta.west -| cp.west)
    node[pos=.5,above,sloped]{\SI{1}{in}};
    
    \draw[<->,red] (cpta.east) -- (cpta.east -| cp.east)
    node[pos=.5,above,sloped]{\SI{1}{in}};
    
    \draw[red,dashed] (cpha.north east) -- (cpha.north east -| cp.east)
    coordinate[pos=.5] (mid);
    \draw[<->,red] (mid) -- (mid |- cp.north)
    node[pos=.5,above,sloped]{\SI{1/2}{in}};
    
    \draw[red,dashed] (cpfa.south east) -- (cpfa.south east -| cp.east)
    coordinate[pos=.5] (mid);
    \draw[<->,red] (mid) -- (mid |- cp.south)
    node[pos=.5,above,sloped]{\SI{1}{cm}};
  \end{tikzpicture}%
}

\begin{document}

\maketitle

\makeatletter
{\centering\large\iscram@version{}\\\iscram@date\par}
\makeatother

\abstract{
  In this document we describe the formatting requirements for the
  Proceedings of ISCRAM papers.
  
  \emph{Please review this document carefully: submissions must follow
    the format presented here} and be sure to adhere to the formatting
  requirements as this will ultimately be your camera-ready version,
  delivered as pdf.

  \emph{Please note several limitations on length:} (1) your abstract
  should be no more than 150 words, (2) your entire paper should be
  between \pgfmathprintnumber{4000} and \pgfmathprintnumber{8000} words
  in length for \textbf{CoRe Papers} (presenting completed work
  including a complete description of methods, results and validation),
  including all materials and references. Or (2) your entire paper
  should be between \pgfmathprintnumber{3000} to
  \pgfmathprintnumber{6000} words in length for \textbf{WiPe Papers}
  (presenting work in earlier stages, outlining and discussing concepts
  and methods and presenting first results), including all materials and
  references.

  \emph{Please make sure that your initial submission does not include
    any author identifying information: use the \option{anonymous} class
    option.} Avoid identifying self-citations as your own work
  (e.g. ``In our previous research (Author Year) we found
  \ldots{}''). Instead simply say ``Previous research (Author Year)
  found \ldots{}'' Keep the self-citations in the bibliography so that
  reviewers may refer to them if necessary. This will ensure a proper
  double-blind-review process. If your paper is accepted please remove
  the \option{anonymous} option before the final upload.  }



\keywords{Guides, Instructions, Conference Publications, ISCRAM \LaTeX{}
  Class.}

\section{Documentation}


The figure~\ref{fig:exampledoc} (at the end of this document) shows an
example of use of the ISCRAM document class.

\subsection{How to load the \texttt{iscram} document class}

The \lstinline[style=TeX]{iscram} document class accepts some
\generic{options}. You may use:

\begin{pseudoTeX}
  \ttfamily\macro\documentclass[\generic{options}]\{iscram\}
\end{pseudoTeX}

or:

\begin{pseudoTeX}
  \ttfamily\macro\documentclass\{iscram\}\\
  \macro\iscramset\{\generic{options}\}
\end{pseudoTeX}

\subsection{\texorpdfstring{All the available \generic{options}}{The <options>}}

\begin{options}

\item[\option{draft}]

  if this boolean option is set, the class shows any overfull
  boxes. \emph{Note:} don't use this option in your final submission.
  
\item[\option{anonymous}]

  if this boolean option is set, the \texttt{iscram} class produces an
  anonymous version of the paper (no author, no affiliation, no
  e-mail). \textbf{Use this option to submit the first version of your
    paper (an anonymous version)}.

\item[\option{first alone}]

  if this boolean option is set, the first author has its own line in
  the list of authors.

\item[\option{title}=\generic{title}]

  defines \generic{title} as the main title of your paper. This title is
  inserted in your document by \macro\maketitle.

\item[\option{short title}=\generic{short title}]

  defines \generic{short title} (up to 8 words) as the short title of
  your paper, used in the header.

\item[\option{author}=\{\option{short name}=\generic{short name},
  \option{full name}=\generic{full name},
  \option{affiliation}=\generic{affiliation}\}]

  appends an author (with its affiliation) at the end of the list of
  authors (inserted in your paper by \macro\maketitle). The
  \emph{\generic{affiliation}} may contain several lines (separated by
  \macro{\\}). To add several authors, this option can be use several
  times. The \emph{\generic{short name}} (default value:
  \emph{\generic{full name}}) of the first author is used in the header of
  your paper.

\item[\option{footer/line 1}=\generic{text},
  \option{footer/line 2}=\generic{text},
  \option{footer/line 3}=\generic{text}]

  define respectively \generic{text} as content of the
  first line, second line and third line of the footer.

\end{options}

\subsubsection{Prefefined styles for 2017 edition}

\begin{options}
  
\item[\option{iscram 2017 footer}]

  a predefined style that sets the two last lines of the footer for a
  paper published in ISCRAM 2017.
  
\item[\option{WiPe Paper 2017}=\generic{track name}]

  a predefined style that sets the three lines of the footer for a
  \textbf{WiPe Paper} published in the track \emph{\generic{track name}}
  in ISCRAM 2017 (choose the appropriate track or use ``Open Track'' if
  you do not have a specific track in mind).
  
\item[\option{CoRe Paper 2017}=\generic{track name}]
  
  a predefined style that sets the three lines of the footer for a
  \textbf{CoRe Paper} published in the track \emph{\generic{track name}}
  in ISCRAM 2017 (choose the appropriate track or use ``Open Track'' if
  you do not have a specific track in mind).

\end{options}

\subsection{Using packages}

In your preamble, you may use your prefered packages with, for example
(choose the appropriate \generic{inputcoding}):

\begin{pseudoTeX}
\ttfamily\macro\usepackage[\generic{inputcoding}]\{inputenc\}
\end{pseudoTeX}

\subsubsection{Packages loaded by the \texttt{iscram} class}

The \texttt{iscram} class requires (and loads) some packages:
\begin{multicols}{6}
  \texttt{biblatex}\\
  \texttt{booktabs}\\
  \texttt{caption}\\
  \texttt{etex}\\
  \texttt{etoolbox}\\
  \texttt{float}\\
  \texttt{fontenc}\\
  \texttt{geometry}\\
  \texttt{hyperref}\\
  \texttt{microtype}\\
  \texttt{newtxmath}\\
  \texttt{nowidow}\\
  \texttt{newtxtext}\\
  \texttt{pgfopts}\\
  \texttt{titlesec}\\
  \texttt{url}\\
  \texttt{xcolor}
\end{multicols}

To pass additional \generic{options} to one of these
\generic{package}, you may call \macro\PassOptionsToPackage{} \emph{before} the call to
\macro\documentclass{}:

\begin{pseudoTeX}
\ttfamily\macro\PassOptionsToPackage\{\generic{options}\}\{\generic{package}\}\\
\macro\documentclass\{iscram\}
\end{pseudoTeX}

\subsection{Useful commands}

Here are described some useful commands in order of usage:

\begin{options}
\item[\macro\addbibresource\{<bibfile>\}]

  call this command in your preamble to add a \emph{\texttt{bibfile}} as
  a resource to find your bibliographic references.

\item[\macro\maketitle]

  to create a new page with the title and the list of authors or your
  paper (to specifiy \emph{title} and \emph{authors}, use class options
  or use \macro\iscramset{}).

\item[\macro\abstract\{\generic{abstract}\}]

  to insert an \generic{abstract} as a section of your paper.

\item[\macro\keywords\{\generic{keywords}\}]

  to insert the list of \generic{keywords} as a subsection of your paper.

\item[\macro\section\{\generic{section title}\}]
  
  to insert a new section (sans-serif font, uppercase,
  bold, 10bp).
    
\item[\macro\subsection\{\generic{subsection title}\}]
  
  to insert a new subsection (sans-serif font, bold, 10bp).
    
\item[\macro\subsubsection\{\generic{subsubsection title}\}]
  
  to insert a new subsubsection (sans-serif font, italice, 10bp).
    
\item[\macro\cite\{\generic{key}\} or
  \macro\cite\{\generic{key1},\generic{key2}\}]

  to insert one or more bibliographic references, referenced by
  \generic{key}, \generic{key1}, \generic{key2} \ldots{}

\item[\macro\citeauthor\{\generic{key}\}]

  to insert the authors from the \generic{key} bibliographic reference.

\item[\macro\citeyear\{\generic{key}\}]

  to insert the year of publication of the \generic{key} bibliographic
  reference.

\item[\macro\citetitle\{\generic{key}\}]

  to insert the title of the \generic{key} bibliographic reference.

  
\item[\macro\printbibliography]

  to insert the list of the cited references. Compile your document with
  \texttt{latexmk} or use \texttt{biber} (not \texttt{bibtex}) after a
  first compilation to produce the correct bibliographic file
  (\texttt{.bbl}) from your bibliographic sources (\texttt{.bib}).
\end{options}

\subsection{Compilation}

The better way to compile your document is to use the \texttt{latexmk}
tool:

\begin{lstlisting}[style=console]
latexmk -pdf my-paper.tex
\end{lstlisting}

You may use the traditional method:

\begin{lstlisting}[style=console]
pdflatex my-paper.tex
biber my-paper
pdflatex my-paper.tex
pdflatex my-paper.tex
\end{lstlisting}

\section{Tips and Tricks}

\subsection{Compatibility}

The \texttt{iscram} class requires recent \TeX{} distributions (MikTeX or
TeXLive 2016).

For any questions, problems, suggestions concerning the iscram class,
contact the authors by mail
(\href{mailto:paul.gaborit@gmail.com}{\gmailpaulgaborit}).

\subsection{Title and Authors}

\subsubsection{Add footnotes in title or authors descriptions}

Use \macro{\thanks} to add footnotes attached to your \option{title} or
to the \option{name} of an author or to its \option{affiliation}
(\emph{note:} don't use \macro{\thanks} into the \option{short title} or
\option{short name} options).

\subsubsection{Links to web sites and to e-mail address}

You may use \macro{\href}, \macro{\urldef} and
\macro{\url} to add links to web pages or to e-mail address.

\begin{minipage}{.32\linewidth}
e-mail: \href{mailto:j.doe@example.com}{\jdmail}\\
web site: \href{http://www.example.com/}{\sitex}
\end{minipage}
\hfill
\begin{minipage}{.65\linewidth}
  
In your peamble:

\begin{lstlisting}[style=TeX]
\urldef{\jdmail}\url{j.doe@example.com}
\urldef{\sitex}\url{www.example.com}
\end{lstlisting}

Then in your document:

\begin{lstlisting}[style=TeX]
e-mail: \href{mailto:j.doe@example.com}{\jdmail}\\
web site: \href{http://www.example.com/}{\sitex}
\end{lstlisting}
\end{minipage}

\subsubsection{First author is important}

Use the \option{first alone} option to emphasize the first author: with
this option, the first author (and its affiliation) is alone on its line
just below the title. The others authors are grouped two by two.

\subsection{Abstract and Keywords}

Every submission should begin with an \macro{\abstract} of no more than
\textbf{150 words}, followed by a set of \textbf{up to five keywords}
(coma separated values). The abstract should be a concise statement of
the problem, approach, and conclusions of the work described. It should
clearly state the paper's contribution to the field.

\subsection{Figures and Tables}

Figures and tables should be centered. The caption of a figure should be
\emph{below} the figure. The caption of a table should be \emph{above}
the table. Read the documentation of the \texttt{booktabs} package to
find useful advices about composition of tables.

The \texttt{iscram} class uses TeX Gyre Termes (similar to Times) as
serif font and TeX Gyre Heros (similar to Helvetica) as sans-serif
font. You should use the same fonts in your figures and tables.

\subsubsection{Examples of figures}

Here is the code of the figure~\ref{fig:HMI} (a simple figure).

\begin{lstlisting}[style=TeX]
\begin{figure}
  \centering
  \includegraphics[width=4cm]{HMI}
  \caption{Human Computer Interaction}
  \label{fig:HMI}
\end{figure}
\end{lstlisting}
\begin{figure}
  \centering \includegraphics[width=4cm]{HMI}
  \caption{Human Computer Interaction}
  \label{fig:HMI}
\end{figure}

Here is the code of the figure~\ref{fig:HMI2} (a figure with a
description).
\begin{lstlisting}[style=TeX]
\begin{figure}
  \centering
  \begin{minipage}[c]{.6\linewidth}
    Here, some text to describe the illustration on the right. This
    figure combines two minipages.
  \end{minipage}
  \hfill
  \begin{minipage}[c]{.35\linewidth}
    \centering \includegraphics[width=4cm]{HMI}\par
  \end{minipage}
  \caption{Human Computer Interaction (with description)}
  \label{fig:HMI2}
\end{figure}
\end{lstlisting}
\begin{figure}
  \centering
  \begin{minipage}[c]{.6\linewidth}
    Here, some text to describe the illustration on the right. This
    figure combines two minipages.
  \end{minipage}
  \hfill
  \begin{minipage}[c]{.35\linewidth}
    \centering \includegraphics[width=4cm]{HMI}\par
  \end{minipage}
  \caption{Human Computer Interaction (with description)}
  \label{fig:HMI2}
\end{figure}

Here is the code of the figure~\ref{fig:HMI3} (an HERE figure: note the \option{[H]} option).
\begin{lstlisting}[style=TeX]
\begin{figure}[H]
  \centering
  \includegraphics[width=4cm]{HMI}
  \includegraphics[width=4cm,angle=90]{HMI}
  \caption{Human Computer Interaction (example of HERE figure)}
  \label{fig:HMI3}
\end{figure}
\end{lstlisting}
\begin{figure}[H]
  \centering
  \includegraphics[width=4cm]{HMI}
  \includegraphics[width=4cm,angle=90]{HMI}
  \caption{Human Computer Interaction (example of HERE figure)}
  \label{fig:HMI3}
\end{figure}


\subsubsection{Example of table}

Here is the code of the table~\ref{tab:treatments}:

\begin{table}
  \caption{A very nice table}
  \label{tab:treatments}
  \centering
  \begin{tabular}{rrr}
    \toprule
                       & \textit{Treatment 1} & \textit{Treatment 2}
    \\\midrule
    \textit{Setting A} & 125                  & 95
    \\
    \textit{Setting B} & 85                   & 102
    \\
    \textit{Setting C} & 98                   & 85
    \\\bottomrule
  \end{tabular}
\end{table}
\begin{lstlisting}[style=Tex]
\begin{table}
  \caption{A very nice table}
  \label{tab:treatments}
  \centering
  \begin{tabular}{rrr}
    \toprule
                       & \textit{Treatment 1} & \textit{Treatment 2}  \\\midrule
    \textit{Setting A} & 125                  & 95    \\
    \textit{Setting B} & 85                   & 102   \\
    \textit{Setting C} & 98                   & 85    \\\bottomrule
  \end{tabular}
\end{table}
\end{lstlisting}

\subsection{Bibliography: References and Citations}

\emph{Your references should comprise only published material accessible
  to the public. Proprietary information (such as internal reports) may
  not be cited.}

The \macro{\parencite} macro called with one or more bibliographic keys
is the standard way to insert citations. You may add one or more
\texttt{.bib} files as bibliographic sources via the
\macro{\addbibresource} macro (in your preamble).

The \texttt{biblatex} package provides many other macros to cite
references. Here is an example:\par
\nobreak
\begin{minipage}{.5\linewidth}
\begin{lstlisting}[style=TeX,basicstyle=\small\ttfamily]
In \citeyear{Agarwal2000},
\citeauthor{Agarwal2000} wrote an article
titled \citetitle{Agarwal2000}
\parencite{Agarwal2000} \ldots{}
\end{lstlisting}
\end{minipage}
\hfill
\begin{minipage}{.475\linewidth}
In \citeyear{Agarwal2000}, \citeauthor{Agarwal2000} wrote an article
titled \citetitle{Agarwal2000} \parencite{Agarwal2000} \ldots{}
\end{minipage}

All our references: \parencite{pittir13924,
  Tractinsky:1997:AAU:258549.258626, Shneiderman:1997:DUI:523237,
  Ghani:1991:EFC:126686.150736, ajzen1988attitudes,
  AJZEN1991179,Agarwal2000}.

At the end of your paper, you should call the \macro{\printbibliography}
macro to insert all the cited references.


\printbibliography[heading=bibliography]

\iscramshowframe

\section{Changes}

\begin{itemize}

\item \textbf{v1.0.2} PDF documentation included into CTAN package.

\item \textbf{v1.0.1} Fix bibliography style for papers with same
  authors. First release to CTAN.
  
\item \textbf{v1.0.0} First public release.

\end{itemize}

\begin{figure}
  \centering
\begin{lstlisting}[style=TeX]
\documentclass{iscram}
\iscramset{
  CoRe Paper 2017={Open Track},
  title={Example of title},
  short title={Example of short title},
  author={
    short name={J. Doe},
    full name={John Doe},
    affiliation={Affiliation\\j.doe@example.com},
  },
}
\addbibresource{example.bib}

\begin{document}
\maketitle
\abstract{A short abstract \ldots{}}
\keywords{Some keywords}

\section{First section}

\subsection{First subsection}

\subsubsection{First subsubsection}

Bla bla \parencite{key} \ldots{}

\printbibliography
\end{document}
\end{lstlisting}
  \caption{Example of usage of ISCRAM document class}
  \label{fig:exampledoc}
\end{figure}


\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

