% -*- coding: utf-8 -*-

\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{beamerthemeWarsaw}
\usepackage{moreverb,wallpaper}
\usepackage{hyperref,wrapfig}
\usepackage{multicol}


\usecolortheme{crane}

%% commande pour mettre une image, même syntaxe que \includegraphics

\newcommand{\img}[2][width=5cm,keepaspectratio=true]{
  \label{img:#2} \hyperdef{img}{#2}{
  \includegraphics[#1]{#2}} }

% \imgref{nomlabel}{texte} 
\newcommand{\imgref}[2]{
\hyperref{}{img}{#1}{\includegraphics[width=0.5cm]{#1}\hspace{1ex} #2}
}

% \video[num_loops, default:0=>infini]{texte à cliquer}{fichier vidéo}
\newcommand{\video}[3][0]{ \label{video:#3}
\hyperdef{video}{#3}{\href{run:./video.sh #1
#3}{\beamerbutton{#2}\hspace{1ex}}}}

% \videovlc[num_loops, default:0=>infini]{texte à cliquer}{fichier vidéo} 
\newcommand{\videovlc}[3][0]{ \label{video:#3}
\hyperdef{video}{#3}{\href{run:vlc
#3}{\beamerbutton{#2}\hspace{1ex}}}}

% \videoref{nomlabel}{texte} 
\newcommand{\videoref}[2]{
\hyperref{}{video}{#1}{\includegraphics[width=0.5cm]{monstyle-img/tool-movie_on.png}\hspace{1ex}
#2} }

\newcommand{\HREF}[2]{\underline{\textcolor{blue}{\href{#1}{#2}}}}

\newcommand{\licenceCcBySa}{license:
\HREF{http://creativecommons.org/licenses/by-sa/2.0/}{CC-BY-SA}\includegraphics[width=1cm]{monstyle-img/cc.png}\includegraphics[width=0.35cm]{monstyle-img/by.png}\includegraphics[width=0.35cm]{monstyle-img/sa.png}}
\newcommand{\licenceGFDL}{license:
\HREF{http://en.wikipedia.org/wiki/GNU_Free_Documentation_License}{GFDL} \includegraphics[width=1cm]{monstyle-img/gnu.png}}
\newcommand{\licenceLGPL}{license:
\HREF{http://en.wikipedia.org/wiki/LGPL}{LGPL} \includegraphics[width=1cm]{monstyle-img/200px-GNU_Lesser_General_Public_License_3_Logo.svg.png}}
\newcommand{\licencePubDom}{license: Public
Domain \includegraphics[width=0.35cm]{monstyle-img/pd.png}}
\newcommand{\licenceOPL}{license: \HREF{http://www.opencontent.org/openpub/}{Open Publication License}}

\newcommand{\licenceYouTube}{license:
\HREF{http://www.framablog.org/index.php/post/2006/10/21/Bliptv-versus-YouTube}{YouTube
gives no licensing information}. We shall use the French
\HREF{http://fr.wikipedia.org/wiki/Droit_de_citation}{right for short
quotes}.}  

\newcommand{\licenceInconnue}{Unknown license.
We shall use the French \HREF{http://fr.wikipedia.org/wiki/Droit_de_courte_citation}{right for short quotes}.}  

\newcommand{\licenceArtLibre}{license:
\HREF{http://artlibre.org/}{Art
Libre}\includegraphics[width=1cm]{monstyle-img/artlibre.png}}

%% insertion d'un logo

\newcommand{\monlogo}{\logo{\href{http://www.ofset.org}{\includegraphics[width=.5cm,keepaspectratio=true]{monstyle-img/jumping-gnu}}\href{http://qa.debian.org/developer.php?login=georgesk@debian.org}{\includegraphics[width=.5cm,keepaspectratio=true]{monstyle-img/debian-openlogo}}}}
