@Tim3

Изменение цвета href в Latex?

Всем привет!

Имеется:
\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@email.com}
\homepage{www.homepage.com}{homepage}

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


При компиляции пишет ошибка в строке \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}


Если убираю эти 2 строчки, то все все компилится и проблем нет.
\usepackage{color}
\usepackage[colorlinks,urlcolor=red]{hyperref}


Подскажите в чем проблема?
  • Вопрос задан
  • 370 просмотров
Решения вопроса 1
@AVKor
Класс moderncv сам подключает пакет hyperref. Поэтому пакет этот подключается дважды. Используйте \hypersetup. Можно в самом классе поправить, если хочется. Там вот так сделано:
\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}}}}
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы