T
T
Tim32015-11-20 20:24:35
TeX
Tim3, 2015-11-20 20:24:35

Changing href color in Latex?

Hello!
Available:

\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template

\usepackage[scale=0.75]{geometry} % Reduce document margins

\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage{color}
\usepackage[colorlinks,urlcolor=red]{hyperref}

%----------------------------------------------------------------------------------------
%	NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{firstname} % Your first name
\familyname{familyname} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\mobile{+88 888-888-888}
\email{[email protected]}
\homepage{www.homepage.com}{homepage}

%------------------------------------------------------------------------------
\begin{document}

When compiling, it writes an error in the line \begin{document}
LaTeX Error: Option clash for package hyperref. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.38 \begin{document}

If I remove these 2 lines, then everything compiles and there are no problems.
\usepackage{color}
\usepackage[colorlinks,urlcolor=red]{hyperref}

Tell me what's the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2015-11-20
@Tim3

The class moderncvitself includes the package hyperref. Therefore, this package is connected twice. Use \hypersetup. You can fix it in the class if you want. This is how it's done there:

\hypersetup{
    breaklinks,
    baseurl       = http://,
    pdfborder     = 0 0 0,
    pdfpagemode   = UseNone,% do not show thumbnails or bookmarks on opening
    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{}~\@familyname{}},
    pdftitle      = {\@firstname{}~\@familyname{} -- \@title{}},
    pdfsubject    = {Resum\'{e} of \@firstname{}~\@familyname{}},
    pdfkeywords   = {\@firstname{}~\@familyname{}, curriculum vit\ae{}, resum\'{e}}}}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question