%%% comments.tex --- 

%% Author: Giménez, Christian
%% Version: $Id: comments.tex,v 0.0 2016/05/04 20:52:32 christian Exp$

% Copyright 2016 Giménez, Christian
  
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.

% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.

% You should have received a copy of the GNU General Public License
% along with this program.  If not, see <http://www.gnu.org/licenses/>.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Cualquier duda ejecutar texdoctk.
\newcounter{commentcounter}
\setcounter{commentcounter}{1}

\newcommand{\comments}[2]{\addtocounter{commentcounter}{1}%
{\tiny\textcolor{#1}{\hspace{-1mm}$^{\arabic{commentcounter}}$}}%
{\marginpar{\tiny\textcolor{#1}{\arabic{commentcounter}:#2}}}%
}

\definecolor{christiancolor}{rgb}{0.0,0.8,0.0}
\newcommand{\Christian}[1]{%
\comments{christiancolor}{#1\\-- C}%
}

%% Alias for \christian
\newcommand{\Chris}[1]{\Christian{#1}}

%% Laura is red color, imagine why! :-P lol
\definecolor{lauracolor}{rgb}{0.8,0.0,0.0}
\newcommand{\Laura}[1]{%
  \comments{lauracolor}{#1\\-- L}%
}

%% Alias for \laura
\newcommand{\Lau}[1]{\Laura{#1}}

\definecolor{germancolor}{rgb}{1.0,0.5,0.0}
\newcommand{\German}[1]{%
  \comments{germancolor}{#1\\-- G}%
}

%% Alias for \german
\newcommand{\Ger}[1]{\German{#1}}

\newcommand{\ChrisCom}[1]{\textcolor{darkgreen}{\tiny \textbf{\PencilRightDown Christian:}#1}}
\newcommand{\ChrisQ}[1]{\textcolor{red}{\tiny\bf (?)\HandRight Christian:} \textcolor{darkgreen}{\tiny #1}}
\definecolor{darkgreen}{rgb}{0.0,0.5, 0.0}
\newcommand{\CText}[1]{\textcolor{darkgreen}{#1}}

\newcommand{\TODO}[1]{\comments{red}{\bf{}$\rightarrow$TODO:\\#1}}

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

\newcounter{mycomment}

\newcommand{\comment}[3]{%
  \commentopt{#1}{#2}{#3}%
}
\newcommand{\commentin}[3]{%
  \commentopt[inline]{#1}{#2}{#3}%
}

\newcommand{\chris}[2]{%
  \commentopt[backgroundcolor=green!40]{C}{#1}{#2}
}
\newcommand{\chrisin}[2]{%
  \commentopt[inline,backgroundcolor=green!40]{C}{#1}{#2}
}
\newcommand{\german}[2]{%
  \commentopt[backgroundcolor=blue!40]{G}{#1}{#2}
}
\newcommand{\germanin}[2]{%
  \commentopt[inline,backgroundcolor=blue!40]{G}{#1}{#2}
}

%%
%% Usage: \commentopt[todonotes-OPTIONS][USER-INITIALS][DATE]{COMMENT TEXT}
%% Add a todonotes \todo formatted for adding a comment.
%% Code based on the example in the todonotes.pdf documentation.
\newcommand{\commentopt}[4][]{%
  % initials of the author (optional) + note in the margin
  \refstepcounter{mycomment}%
  {%
    %% \setstretch{0.7}% spacing
    \todo[#1]{%
      \textbf{[\uppercase{#2} {#3} \themycomment]:}~#4}%
  }}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% TeX-PDF-mode: t
%%% coding: utf-8
%%% End: 
