%outils, langages : \textsf
%acronymes : \textsc

\newcommand{\dotnet}{\textsf{.NET}\xspace}
\newcommand{\aadl}{\textsf{AADL}\xspace}
\newcommand{\ada}{\textsf{Ada}\xspace}
\newcommand{\adele}{\textsf{Adele}\xspace}
\newcommand{\agg}{\textsf{AGG}\xspace}
\newcommand{\antlr}{\textsf{ANTLR}\xspace}
%\newcommand{\antlrf}{\textsf{ANTLR}\xspace}
%\newcommand{\antlrc}{\textsc{ANTLR}\xspace}
%\newcommand{\antlrc}{\textsc{Antlr}\xspace}
\newcommand{\asf}{\textsf{ASF}\xspace}
\newcommand{\asfsdf}{\textsf{ASF+SDF}\xspace}
\newcommand{\AST}{\textsf{AST}\xspace}
\newcommand{\atl}{\textsf{ATL}\xspace}
\newcommand{\awk}{\textsf{AWK}\xspace}
%\newcommand{\bnf}{\textsf{BNF}\xspace}
\newcommand{\btollvm}{\textsf{b2llvm}\xspace}
\newcommand{\B}{\textsf{B}\xspace}
\newcommand{\C}{\textsf{C}\xspace}
\newcommand{\cadp}{\textsf{CADP}\xspace}
\newcommand{\caml}{\textsf{Caml}\xspace}
\newcommand{\csharp}{\textsf{C\#}\xspace}
%\newcommand{\cmof}{\textsf{CMOF}\xspace}
\newcommand{\cmof}{\textsc{CMOF}\xspace}
\newcommand{\coq}{\textsf{Coq}\xspace}
\newcommand{\crystalreports}{\textsf{Crystal Reports}}
\newcommand{\cwm}{\textsf{CWM}\xspace}
\newcommand{\dart}{\textsf{Dart}\xspace}
%\newcommand{\dsml}{\textsf{DSML}\xspace}
\newcommand{\dsml}{\textsc{DSML}\xspace}
\newcommand{\dsmls}{\textsf{DSMLs}\xspace}
%\newcommand{\dsl}{\textsf{DSL}\xspace}
\newcommand{\dsl}{\textsc{DSL}\xspace}
\newcommand{\dsls}{\textsf{DSLs}\xspace}
%\newcommand{\ebnf}{\textsf{EBNF}\xspace}
\newcommand{\eclipse}{\textsf{Eclipse}\xspace}
%\newcommand{\mtom}{\textsf{M2M}\xspace}
\newcommand{\great}{\textsf{GReAT}\xspace}
\newcommand{\mtom}{\textsc{M2M}\xspace}
\newcommand{\eclipsemmt}{\textsf{Eclipse MMT}\xspace}
\newcommand{\eclipsemtom}{\textsf{Eclipse M2M}\xspace}
\newcommand{\eclipsemmtoqvt}{\textsf{Eclipse MMT Operational QVT}\xspace}
\newcommand{\eclipsemtomoqvt}{\textsf{Eclipse M2M Operational QVT}\xspace}
\newcommand{\ecore}{\textsf{Ecore}\xspace}
\newcommand{\elan}{\textsf{Elan}\xspace}
\newcommand{\emf}{\textsf{EMF}\xspace}
%\newcommand{\emof}{\textsf{EMOF}\xspace}
\newcommand{\emof}{\textsc{EMOF}\xspace}
\newcommand{\epsilonlanguage}{\textsf{Epsilon}\xspace}
\newcommand{\etl}{\textsf{ETL}\xspace}
\newcommand{\fiacre}{\textsf{Fiacre}\xspace}
%\newcommand{\fnrae}{\textsf{FNRAE}\xspace}
\newcommand{\fnrae}{\textsc{FNRAE}\xspace}
\newcommand{\gms}{\textsf{GMS}\xspace}
\newcommand{\gom}{\textsf{Gom}\xspace}
\newcommand{\gomantlradapter}{\textsf{GomAntlrAdapter}\xspace}
%\newcommand{\gpl}{\textsf{GPL}\xspace}
\newcommand{\gpl}{\textsc{GPL}\xspace}
\newcommand{\haskell}{\textsf{Haskell}\xspace}
\newcommand{\henshin}{\textsf{Henshin}\xspace}
%\newcommand{\idm}{\textsf{IDM}\xspace}
\newcommand{\idm}{\textsc{IDM}\xspace}
\newcommand{\isabelle}{\textsf{Isabelle/HOL}\xspace}
\newcommand{\java}{\textsf{Java}\xspace}
\newcommand{\jcheck}{\textsf{JCheck}\xspace}
\newcommand{\jjtrav}{\textsf{JJTraveler}\xspace}
\newcommand{\jqvt}{\textsf{JQVT}\xspace}
\newcommand{\junit}{\textsf{JUnit}\xspace}
\newcommand{\junitquickcheck}{\textsf{JUnit-quickcheck}\xspace}
\newcommand{\kermeta}{\textsf{Kermeta}\xspace}
\newcommand{\kmf}{\textsf{KMF}\xspace}
\newcommand{\kevoree}{\textsf{Kevoree}\xspace}
\newcommand{\lemuridae}{\textsf{Lemuridae}}
\newcommand{\lkms}{\textsf{LKMS}}
\newcommand{\llvm}{\textsf{LLVM}\xspace}
\newcommand{\maude}{\textsf{Maude}\xspace}
%\newcommand{\mda}{\textsf{MDA}\xspace}
\newcommand{\mda}{\textsc{MDA}\xspace}
%\newcommand{\mde}{\textsf{MDE}\xspace}
\newcommand{\mde}{\textsc{MDE}\xspace}
\newcommand{\mediniqvt}{\textsf{Medini-QVT}\xspace}
\newcommand{\mediniqvtr}{\textsf{Medini-QVT-Relations}\xspace}
\newcommand{\miniml}{\textsf{MiniML}}
\newcommand{\mps}{\textsf{MPS}\xspace}
%\newcommand{\mof}{\textsf{MOF}\xspace}
\newcommand{\mof}{\textsc{MOF}\xspace}
\newcommand{\moflon}{\textsf{Moflon}\xspace}
\newcommand{\moment}{\textsf{MOMENT}\xspace}
\newcommand{\momenttwo}{\textsf{MOMENT2}\xspace}
\newcommand{\mt}{\textsf{MT}\xspace}
\newcommand{\ocaml}{\textsf{OCaML}\xspace}
\newcommand{\ocl}{\textsf{OCL}\xspace}
%\newcommand{\omg}{\textsf{OMG}\xspace}
\newcommand{\omg}{\textsc{OMG}\xspace}
\newcommand{\optimalj}{\textsf{OptimalJ}\xspace}
\newcommand{\osate}{\textsf{Osate}\xspace}
\newcommand{\osatetwo}{\textsf{Osate2}\xspace}
\newcommand{\pluscal}{\textsf{+CAL}\xspace}
\newcommand{\pluscaltwo}{\textsf{+CAL 2.0}\xspace}
%\newcommand{\pluscal}{\textsf{PlusCal-2}\xspace}
\newcommand{\perl}{\textsf{Perl}\xspace}
\newcommand{\propcheck}{\textsf{PropCheck}\xspace}
\newcommand{\python}{\textsf{Python}\xspace}
\newcommand{\quarteft}{\textsf{quarteFt}\xspace}
\newcommand{\quickcheck}{\textsf{QuickCheck}\xspace}
\newcommand{\qvt}{\textsf{QVT}\xspace}
\newcommand{\qvtc}{\textsf{QVT-Core}\xspace}
\newcommand{\qvto}{\textsf{QVT-Operational}\xspace}
\newcommand{\qvtr}{\textsf{QVT-Relations}\xspace}
\newcommand{\rascal}{\textsf{Rascal}\xspace}
\newcommand{\rodin}{\textsf{Rodin}}
\newcommand{\rtfiacre}{\textsf{RT-Fiacre}\xspace}
\newcommand{\ruby}{\textsf{Ruby}\xspace}
\newcommand{\rushcheck}{\textsf{RushCheck}\xspace}
\newcommand{\scala}{\textsf{Scala}\xspace}
\newcommand{\scalacheck}{\textsf{ScalaCheck}\xspace}
\newcommand{\sdf}{\textsf{SDF}\xspace}
\newcommand{\smartqvt}{\textsf{SmartQVT}\xspace}
\newcommand{\spoofax}{\textsf{Spoofax}\xspace}
\newcommand{\sdl}{\textsf{SDL}\xspace}
\newcommand{\sed}{\textsf{sed}\xspace}
\newcommand{\sql}{\textsf{SQL}\xspace}
\newcommand{\stratego}{\textsf{Stratego}\xspace}
\newcommand{\strategoxt}{\textsf{Stratego/XT}\xspace}
\newcommand{\tamed}{\textsf{TaMeD}}
\newcommand{\tefkat}{\textsf{Tefkat}\xspace}
\newcommand{\tina}{\textsf{TINA}\xspace}
\newcommand{\tlaplus}{\textsf{TLA+}\xspace}
\newcommand{\tom}{\textsf{Tom}\xspace}
%\newcommand{\tom}{\textsc{Tom}\xspace}
\newcommand{\tomemf}{{\tom}-{\emf}}
\newcommand{\tomjava}{{\tom}+{\java}}
\newcommand{\topcased}{\textsc{TOPCASED}\xspace}
\newcommand{\txl}{\textsf{TXL}\xspace}
\newcommand{\uml}{\textsf{UML}\xspace}
\newcommand{\viatra}{\textsf{VIATRA2}\xspace}
\newcommand{\xbase}{\textsf{Xbase}\xspace}
\newcommand{\xmi}{\textsf{XMI}\xspace}
\newcommand{\xml}{\textsf{XML}\xspace}
\newcommand{\xpend}{\textsf{Xpend}\xspace}
\newcommand{\xquery}{\textsf{XQuery}\xspace}
\newcommand{\xqueryuf}{\textsf{XQuery Update Facility}\xspace}
\newcommand{\xslt}{\textsf{XSLT}\xspace}
\newcommand{\xtext}{\textsf{Xtext}\xspace}
\newcommand{\xtend}{\textsf{XTend}\xspace}

\newcommand{\ie}{\textit{i.e.}\xspace}
\newcommand{\etc}{\textit{etc.}\xspace}
\newcommand{\eg}{\textit{e.g.}\xspace}
\newcommand{\adhoc}{\textit{ad-hoc}\xspace}
\newcommand{\via}{\textit{via}\xspace}
\newcommand{\vs}{\textit{vs}\xspace}
\newcommand{\acontrario}{\textit{a contrario}\xspace}
\newcommand{\defacto}{\textit{de facto}\xspace}

\newcommand{\lex}[1]{{\textrm{\textbf{#1}}}}
\newcommand{\todo}[1]{\textcolor{red}{#1}}
\newcommand{\ttodo}[1]{\textcolor{red}{[TODO: #1]}}
\newcommand{\needcite}{\textcolor{red}{$^{[citation\ needed]}$}}


%\newcommand{\figureref}[1]{(Figure~\ref{#1})}
%\newcommand{\figurerefit}[1]{(\textit{Fig.~\ref{#1}})}
\newcommand{\keyword}[1]{\textbf{\textsf{\footnotesize{#1}}}\xspace}
\newcommand{\verbemph}[1]{\textcolor{red}{\textbf{\ttfamily #1}}}
%\newcommand{\verbemph}[1]{\textbf{\scriptsize{\ttfamily\bfseries #1}}}
\newcommand{\code}[1]{{\footnotesize {\sffamily #1}}\xspace}
\newcommand{\figcode}[1]{{\scriptsize {\sffamily #1}}\xspace}
\newcommand{\minicode}[1]{{\tiny {\sffamily #1}}\xspace}

\newcommand{\nnbb}[2]{
    \fbox{\bfseries\sffamily\scriptsize#1}
    {\sf\small$\blacktriangleright$\textit{#2}$\blacktriangleleft$}
   }
\newcommand{\jcb}[1]{\nnbb{Jean-Christophe}{#1}}
%\newcommand{\pem}[1]{\nnbb{Pierre-Etienne}{#1}}
%\newcommand{\mp}[1]{\nnbb{Marc}{#1}}

\newcommand{\compresslist}{
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
%\setlength{\topsep}{0pt}
%\setlength{\partopsep}{0pt}
}

%\renewcommand*\arraystretch{1.0}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\tomgray}[1]{\color{gray}{\ttfamily{#1}}}
\newcommand{\tomred}[1]{\color{red}{\ttfamily{#1}}}
\newcommand{\javablue}[1]{\color{blue}{\ttfamily{#1}}}

\newcommand{\hlred}[1]{\color{red}{\ttfamily{\footnotesize{#1}}}}
\newcommand{\tomblue}[1]{\color{blue}{\ttfamily{\footnotesize{#1}}}}

\definecolor{darkgreen}{HTML}{129d1c}
\definecolor{mydarkred}{HTML}{a41313}
\definecolor{myred}{HTML}{d01e1e}
\definecolor{myblue}{HTML}{0000FF}

\newcommand{\colcode}[2]{\color{#1}{\ttfamily{#2}}\color{black}}
\newcommand{\colcodetwo}[2]{\color{#1}{\ttfamily{\footnotesize{#2}}}\color{black}}

\newcommand{\customComment}[2]{\noindent ---#1: \marginpar{$\bullet$}\small #2}
\newcommand{\commentPEM}[1]{\todo{\customComment{PEM}{#1}}}
\newcommand{\commentJCB}[1]{\todo{\customComment{JCB}{#1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\lstset{basicstyle={\ttfamily},
        keywordstyle={\rmfamily\bfseries},
        columns=flexible}
\lstdefinelanguage{gom}{
  escapechar={\#},
  alsoletter={\%},
  morekeywords={\%match,module,imports,abstract,
                syntax,make,make_insert,realMake},
  sensitive=true,
  morecomment=[l]{//},
  morecomment=[s]{/*}{*/},
  morestring=[b]",
}
\lstnewenvironment{gomcode}[1][]%
{\lstset{language={gom},
	captionpos=b,
  escapechar={\#},
frame=tb,#1}}
{}

\lstnewenvironment{gomcode1}[1][]%
{\lstset{language={gom},
	captionpos=b,
  numberblanklines=false,
  numberstyle=\tiny,
  numbers=left,
  escapechar={\#},
frame=tb,#1}}
{}

\lstdefinelanguage{tom}{
  showtabs=false,
  escapechar={\#},
  alsoletter={\%,-,>,`},
  morekeywords={\%typeterm,\%op,\%oplist,\%oparray,\%strategy,\%match,
    is_fsym,get_slot,get_head,get_tail,is_empty,implement,equals,
    \%transformation,make,make_empty,make_insert,realMake,\%gom,visit,
    get_default,make_append,module,imports,abstract,syntax,is_sort,
    definition,traversal,\%tracelink,\%resolve,get_element,get_size,`,->},
  sensitive=true,
	captionpos=b,
  columns=flexible,
  showspaces=false,
  extendedchars=true,
  showstringspaces=false,
  morecomment=[l]{//},
  morecomment=[s]{/*}{*/},
  morestring=[b]",
  breaklines=false,
}

\lstnewenvironment{tomcode}[1][]%
{\lstset{%language={java},
        language={tom},
        keywordstyle={\scriptsize\bfseries},
        %basicstyle=\scriptsize,
        basicstyle={\ttfamily\scriptsize},
        numberblanklines=false,
        numberstyle=\tiny,
        numbers=left,
        escapechar={\#},
       	numbersep=4pt,
  frame=tb,#1}}
{}

\lstnewenvironment{tomcode2}[1][]%
{
\lstset{language={tom},
        keywordstyle={\scriptsize\bfseries},
        % keywordstyle={\sffamily\scriptsize\bfseries},
        basicstyle={\ttfamily\scriptsize},
        escapechar={\#},
        aboveskip=\baselineskip,#1}}
{}

\lstnewenvironment{tomcode3}[1][]%
{\lstset{%language={java},
        language={tom},
        keywordstyle={\bfseries},
        %basicstyle=\scriptsize,
        basicstyle={\ttfamily},
        numberblanklines=true,
        numberstyle=\tiny,
        numbers=left,
        escapechar={\#},
       	%numbersep=4pt,
  frame=tb,#1}}
{}

\lstnewenvironment{tomcode4}[1][]%
{\lstset{%language={java},
        language={tom},
        keywordstyle={\bfseries},
        %basicstyle=\scriptsize,
        basicstyle={\ttfamily},
        escapechar={\#},
  frame=tb,#1}}
{}

\lstdefinelanguage{gr}{}
\lstnewenvironment{ebnf}[1][]%
{\lstset{#1}\lstset{
        language={gr},
        frame=tb,
        basicstyle={\scriptsize\ttfamily},
        morekeywords={context, free, rules, lexical},
        keywordstyle=\sffamily\bfseries,
        escapechar={\#},
        captionpos=b
    }}
{}

\lstdefinelanguage{tomwovisit}{
  escapechar={\#},
  alsoletter={\%,-,>,`},
  morekeywords={\%typeterm,\%op,\%oplist,\%oparray,\%strategy,\%match,
    is_fsym,get_slot,get_head,get_tail,is_empty,implement,equals,
    \%transformation,make,make_empty,make_insert,realMake,\%gom,
    get_default,make_append,module,imports,abstract,syntax,is_sort,
    definition,traversal,\%tracelink,\%resolve,get_element,get_size,`,->},
  sensitive=true,
  morecomment=[l]{//},
  morecomment=[s]{/*}{*/},
  morestring=[b]",
}
\lstnewenvironment{tomcodewovisit}[1][]%
{\lstset{language={tomwovisit},
        keywordstyle={\scriptsize\bfseries},
        %basicstyle=\scriptsize,
        basicstyle={\ttfamily\scriptsize},
        columns=flexible,
        numberblanklines=false,
        numberstyle=\tiny,
        numbers=left,
       	numbersep=4pt,
        captionpos=b,
        showtabs=false,
        showspaces=false,
        showstringspaces=false,
        extendedchars=true,
        breaklines=false,
        escapechar={\#},
        alsoletter={\%,`,-,>},
  morekeywords={\%typeterm,\%op,\%oplist,\%oparray, \%strategy,\%match,
    is_fsym,get_slot,get_head,get_tail,is_empty,implement,equals,
    \%transformation, make,make_empty,make_insert,realMake,\%gom,
    get_default, make_append, module,imports,abstract,syntax,is_sort,
    definition, traversal, \%tracelink, \%resolve, get_element, get_size, `, ->},
  frame=tb,#1}}
{}

\lstnewenvironment{codesource}[1][]%
{\lstset{%language={java},
    tabsize=4,
    basicstyle={\ttfamily\scriptsize},
    %basicstyle={\footnotesize\sffamily},
    numberblanklines=true,
    %numberstyle=\scriptsize ,
    numberstyle=\tiny,
    numbersep=4pt,
    numbers=left,
    %firstnumber=auto,
    %upquote=true,
    aboveskip={1.0\baselineskip},
    columns=flexible,
    showstringspaces=false,
    extendedchars=true,
    breaklines=false,
    prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
    %frame=tb,
    showtabs=false,
    showspaces=false,
    showstringspaces=false,
    %keywordstyle=\bfseries,
    keywordstyle={\scriptsize\bfseries},
    %identifierstyle=\ttfamily,
    %stringstyle=\ttfamily,
    commentstyle=\textit,
	  captionpos=b,
    escapechar={\#},
    frame=tb,#1}}
{}

\lstnewenvironment{codesource2}[1][]%
{\lstset{%language={java},
    tabsize=4,
    basicstyle={\ttfamily},
    %basicstyle={\footnotesize\sffamily},
    numberblanklines=true,
    %numberstyle=\scriptsize ,
    numberstyle=\tiny,
    %numbersep=4pt,
    numbers=left,
    %firstnumber=auto,
    %upquote=true,
    aboveskip={1.0\baselineskip},
    columns=flexible,
    showstringspaces=false,
    extendedchars=true,
    breaklines=false,
    prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
    %frame=tb,
    showtabs=false,
    showspaces=false,
    showstringspaces=false,
    keywordstyle=\bfseries,
    %identifierstyle=\ttfamily,
    %stringstyle=\ttfamily,
    commentstyle=\textit,
	  captionpos=b,
    escapechar={\#},
    frame=tb,#1}}
{}


\lstnewenvironment{mycode}[1][]%
{\lstset{basicstyle={\footnotesize\ttfamily},
        columns=flexible,
        captionpos=b,
        showtabs=false,
        showspaces=false,
        showstringspaces=false,
        extendedchars=true,
        breaklines=false,
        escapechar={\#},
  frame=none,#1}}
{}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newtheorem{thm-fr}{Th\'eor\`eme}
\newtheorem{definition}[thm-fr]{D\'efinition}
\newtheorem{example}[thm-fr]{Exemple}

\newcommand{\caV}{\ensuremath{\mathcal{V}}\xspace}
\newcommand{\caS}{\ensuremath{\mathcal{S}}\xspace}
\newcommand{\caT}{\ensuremath{\mathcal{T}}\xspace}
\newcommand{\caF}{\ensuremath{\mathcal{F}}\xspace}
\newcommand{\caE}{\ensuremath{\mathcal{E}}\xspace}
\newcommand{\caX}{\ensuremath{\mathcal{X}}\xspace}
\newcommand{\caP}{\ensuremath{\mathcal{P}}\xspace}
\newcommand{\caR}{\ensuremath{\mathcal{R}}\xspace}
\newcommand{\TFX}{\ensuremath{\caT(\caF,\caX)}\xspace}
\newcommand{\TF}{\ensuremath{\caT(\caF)}\xspace}
\newcommand{\SF}{\ensuremath{(\caS,\caF)}\xspace}
\newcommand{\rarrow}{\rightarrow_{\mathcal{R}}\xspace}
\newcommand{\aphiarrow}{\rightarrow^{\phi}_{\mathcal{A}}\xspace}
\newcommand{\phiarrow}[1]{\rightarrow^{\phi_{#1}}\xspace}
\newcommand{\piarrow}{\rightarrow^{\pi}\xspace}
\newcommand{\caO}{\ensuremath{\mathcal{O}}\xspace}
\newcommand{\caA}{\ensuremath{\mathcal{A}}\xspace}

\newcommand{\nat}{\ensuremath{\mathbb{N}}\xspace}
\newcommand{\var}[1]{\ensuremath{\caV}ar(#1)\xspace}
\newcommand{\match}{\mathrel{\mbox{$~<\hspace{-1.1em}<~$}}}
\newcommand{\nmatch}{\mathrel{\mbox{$\match\hspace{-1.1em}/~$}}}
\newcommand{\dom}[1]{\mathcal{D}om(#1)\xspace}
\newcommand{\refltransclo}
  {\mathrel{\mbox{$\rightarrow$\hspace{-0.8em}{\footnotesize $^*$}$~$}}}
\newcommand{\symrefltransclo}
  {\mathrel{\mbox{$\leftrightarrow$\hspace{-0.7em}{\footnotesize $^*$}$~$}}}
\newcommand{\rightarrowrule}[1]%{\overset{#1}{\longrightarrow}}
  {\mathrel{\mbox{$\rightarrow$\hspace{-0.8em}{\footnotesize $^{#1}$}$~$}}}



% Pour mes grands titres
\newcommand{\grandtitre}[1]{%
  \begin{flushleft}
    \textbf{\huge #1}
    \par\rule{\textwidth}{1pt}
  \end{flushleft}
}


% Pour mes titres
\newcommand{\titre}[1]{%
  \begin{flushleft}
    \rule{\textwidth}{1pt}
    \par\vspace{0.1cm}
    \textbf{\large #1}
    \par\rule{\textwidth}{1pt}
  \end{flushleft}
}

%\newcommand{\myul}[2][black]{\setulcolor{#1}\ul{#2}\setulcolor{black}}
%\def\mathunderline#1#2{\color{#1}\underline{{\color{black}#2}}\color{black}}
\newcommand{\myul}[2]{\color{#1}\underline{{\color{black}#2}}\color{black}\xspace}

