moderncv
loads hyperref
package by itself with the option unicode
. These are the lines from moderncv.cls
.
\AtEndPreamble{
\pagenumbering{arabic}% has to be issued before loading hyperref, as to set \thepage and hence to avoid hyperref issuing a warning and setting pdfpagelabels=false
\RequirePackage[unicode]{hyperref}% unicode is required for unicode pdf metadata
\hypersetup{
breaklinks,
baseurl = http://,
pdfborder = 0 0 0,
pdfpagemode = \pdfpagemode,
pdfstartpage = 1,
pdfcreator = {\LaTeX{} with 'moderncv' package},
% pdfproducer = {\LaTeX{}},% will/should be set automatically to the correct TeX engine used
bookmarksopen = true,
bookmarksdepth= 2,% to show sections and subsections
pdfauthor = {\@firstname{}~\@lastname{}},
pdftitle = {\@firstname{}~\@lastname{}\notblank{\@title}{ -- \@title}{}},
pdfsubject = {Resum\'{e} of \@firstname{}~\@lastname{}},
pdfkeywords = {\@firstname{}~\@lastname{}, curriculum vit\ae{}, resum\'{e}}}}
Hence, if you load the package again, the error
Option clash for package hyperref
is generated. Hence remove the line \usepackage{hyperref}
from your file. On the other hand, if you want to change some settings for hyperref
, use \hypersetup
at appropriate place in your file.
Similarly the \cvitem
is defined as (in moderncv.cls
)
\newcommand*{\cvitem}[3][.25em]{}
which means, \cvitem
takes three arguments and the first argument is optional. The first argument is actually the space between the \cvitem
s with default being 0.25em
. But you are using three arguments with all three being mandatory (enclosed in braces {}
). Remove one argument.
moderncv
already loadshyperref
package with certain options. Hence this error.. If you want to make some changes, please use\hypersetup
. No need of loadinghyperref
again.doument
todocument
as it was clearly a typo. But your code remains uncompilable. AFAIK the command\cvitem
has just two arguments. You use three here. Please have a look on some other examples in order to learn the right syntax and do not loadhyperref
a second time.\href
has two arguments missing one. Thus, moving the second curly closing brace to the end after{text}
is probably the solution:\cvitem{some text}{\href{url}{text}}
.