% -------------------------------------------------------
% Copyright 2012 Ghersi Andrea (ghanhawk@gmail.com).
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version
% 1.3c, available at 'http://www.latex-project.org/lppl'.
% -------------------------------------------------------

\ProvidesFileSVN
   {$Id: mycv_misc.def 66 2012-04-28 14:38:41Z ghangenit $}
   [v\@versionstr][Miscellaneous commands]

\RequirePackage{hyperref}

% -----------------------------------------------------
% partial hyperref setup: the rest is set in style file
% -----------------------------------------------------

\hypersetup{%
   pdfstartpage = 1,
   pdfauthor    = \@pdfauthor,
   pdftitle     = \@pdftitle,
   pdfsubject   = \@pdfsubject,
   pdfproducer  = \LaTeX{},
   pdfkeywords  = cv curriculum vit\ae{},
   pdfcreator   = \LaTeX{} with 'mycv' (v\@versionstr)
}

%%%%%%%%%%%
%         %
% Margins %
%         %
%%%%%%%%%%%

\newenvironment{mychangemargin}[2]
   {\begin{list}{}{%
    \setlength{\topsep}{0pt}%
    \setlength{\leftmargin}{#1}%
    \setlength{\rightmargin}{#2}%
    \setlength{\partopsep}{0pt}%
    \setlength{\parsep}{\parskip}}\item[]%
   }%
   {\end{list}}

\newenvironment{mychangemarginLeft}[1]
   {\begin{list}{}{%
    \setlength{\topsep}{0pt}%
    \setlength{\leftmargin}{#1}%
    \setlength{\partopsep}{0pt}%
    \setlength{\parsep}{\parskip}}\item[]%
   }%
   {\end{list}}

\newenvironment{mychangemarginRight}[1]
   {\begin{list}{}{%
    \setlength{\topsep}{0pt}%
    \setlength{\rightmargin}{#1}%
    \setlength{\partopsep}{0pt}%
    \setlength{\parsep}{\parskip}}\item[]%
   }%
   {\end{list}}

%%%%%%%%%%%%%%%
%             %
% Other stuff %
%             %
%%%%%%%%%%%%%%%

\DeclareRobustCommand{\mylang}[2][english]{%
   \foreignlanguage{#1}{{z#2}}} %{\color{blue}{#2}}}

% ------------
% pdf metadata
% ------------

\DeclareRobustCommand{\mypdfsubject}[1]{\def\@pdfsubject{#1}}
\DeclareRobustCommand{\mypdfauthor}[1]{\def\@pdfauthor{#1}}
\DeclareRobustCommand{\mypdftitle}[1]{\def\@pdftitle{#1}}

