书目超链接显示为蓝色

书目超链接显示为蓝色

在我的 MWE 示例中:

\documentclass[11pt,fleqn]{book} % Default font size and left-justified equations

\usepackage{etex}

\usepackage[svgnames]{xcolor} % Required for specifying colors by name

%========================================================================================
%   Font Settings
%========================================================================================

\usepackage{avant} % Use the Avantgarde font for headings
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
\usepackage{textcomp} % Text Companion fonts which provide many text symbols in the TS1 encoding.

%========================================================================================
%   Math Formulas
%========================================================================================

\usepackage{empheq}
\usepackage[font={color=ocre,bf},figurename=Fig.,labelfont={it}]{caption}
\usepackage[framemethod=default]{mdframed}
\usepackage{mathtools}
\usepackage[most]{tcolorbox}
\tcbset{myformula/.style={
  arc=0pt,
  outer arc=0pt,
  %colback=ocre!10,
  colback=mygray,
  colframe=ocre,
  boxrule=0.8pt,
  left=2pt,
  right=2pt,
  highlight math style={
    arc=0pt,
    outer arc=0pt,
    colback=mygray,
    colframe=red.
    }
  }
}

\newenvironment{spread}[1]{%
  \advance\jot#1% indeed
  }{%
\ignorespacesafterend
}

\usepackage{graphicx}

%========================================================================================
%   Bibliography
%========================================================================================

\usepackage[refsection=chapter,defernumbers=true,sorting=none,sortcites=true,autopunct=true,babel=hyphen,abbreviate=false,backref=true,backend=biber]{biblatex}
\addbibresource{chap1.bib}
 \defbibheading{bibempty}{}


% --------------------------------------------------------------------
% line breaks in URLs at "-"
\PassOptionsToPackage{hyphens}{url}
% --------------------------------------------------------------------

%% hyperref settings
   \usepackage[%
               ,pdftex%
               ,plainpages=false%
               ,colorlinks%
               ,linkcolor={Navy}%
               ,citecolor={Navy}%
               ,linktocpage={true}%
               ,breaklinks%
               ,pdfcreator={pdflatex}%
               ,pdfstartview=FitH
               ,bookmarksopen=true% book marks in PDF reader
               ]{hyperref}


\begin{document}
\noindent
This is just some text to show the text lines before the align environment \cite{pll_wikipedia}.

\begin{tabular}{lll}
  T1 & - & This is an explanation of equaion 1 \\
  T2 & - & This is the explanation of another equ \\
  T2T3 & - & $\dfrac{Test}{Test2}$ \\
\end{tabular}

\newpage
\section*{Bibliography}
\subsection*{Online}
\printbibliography[heading=bibempty,type=misc,prefixnumbers={O}]


\end{document} 

对于我来说chapt1.bib

@misc{pll_wikipedia,
    howpublished = {\url{http://en.wikipedia.org/wiki/Phase-locked loop}},
    author = {Wikipedia},
    %note = {Last visited on <insert date here>},
    title = {Phase-Locked Loop},
}

我希望超链接看起来像这样:

在此处输入图片描述

相反,它显示如下:

在此处输入图片描述

我怎样才能使超链接文本显示为蓝色并且与文档正文显示相同的文本?

另外,出于某种原因,使用 Legrand Orange Book 模板时,我无法将 URL 链接的颜色更改为蓝色。在文件中structure.tex,这是文档中超链接的命令:

%----------------------------------------------------------------------------------------
%   HYPERLINKS IN THE DOCUMENTS
%----------------------------------------------------------------------------------------

\usepackage{hyperref}
\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor=blue,bookmarks=true,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
\usepackage{bookmark}
\bookmarksetup{
open,
numbered,
addtohook={%
\ifnum\bookmarkget{level}=0 % chapter
\bookmarksetup{bold}%
\fi
\ifnum\bookmarkget{level}=-1 % part
\bookmarksetup{color=ocre,bold}%
\fi
}
}

如何更改 Legrand Orange Book 模板中 url 超链接的颜色?

答案1

这是可行的:这是一个设置的问题urlcolor\urlstyle=same

\documentclass[11pt,fleqn]{book} % Default font size and left-justified equations

\usepackage{etex}
\usepackage{filecontents}
\begin{filecontents}{chap1.bib}
@misc{pll_wikipedia,
    howpublished = {\url{http://en.wikipedia.org/wiki/Phase-locked loop}},
    author = {Wikipedia},
    %note = {Last visited on <insert date here>},
    title = {Phase-Locked Loop},
}
\end{filecontents}
\usepackage[svgnames]{xcolor} % Required for specifying colors by name

%========================================================================================
% Font Settings
%========================================================================================

\usepackage{avant} % Use the Avantgarde font for headings
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
\usepackage{textcomp} % Text Companion fonts which provide many text symbols in the TS1 encoding.

%========================================================================================
% Math Formulas
%========================================================================================

\usepackage{empheq}
\usepackage[font={color=ocre,bf},figurename=Fig.,labelfont={it}]{caption}
\usepackage[framemethod=default]{mdframed}
\usepackage{mathtools}
\usepackage[most]{tcolorbox}
\tcbset{myformula/.style={
  arc=0pt,
  outer arc=0pt,
  %colback=ocre!10,
  colback=mygray,
  colframe=ocre,
  boxrule=0.8pt,
  left=2pt,
  right=2pt,
  highlight math style={
    arc=0pt,
    outer arc=0pt,
    colback=mygray,
    colframe=red.
    }
  }
}

\newenvironment{spread}[1]{%
  \advance\jot#1% indeed
  }{%
\ignorespacesafterend
}

\usepackage{graphicx}

%========================================================================================
% Bibliography
%========================================================================================



% --------------------------------------------------------------------
% line breaks in URLs at "-"
\PassOptionsToPackage{hyphens}{url}
% --------------------------------------------------------------------

%% hyperref settings
   \usepackage[%
 pdftex,%
 plainpages=false,%
 colorlinks,%
 linkcolor=Navy,%
 citecolor=Navy,%
 urlcolor=Navy,%
 linktocpage=true,%
 breaklinks,%
 pdfcreator=pdflatex,
 pdfstartview=FitH,%
 bookmarksopen=true% book marks in PDF reader
 ]
{hyperref}
\usepackage[refsection=chapter,defernumbers=true,sorting=none,sortcites=true,autopunct=true,babel=hyphen,abbreviate=false,backref=true,backend=biber]{biblatex}
\addbibresource{chap1.bib}
 \defbibheading{bibempty}{}

     \AtBeginDocument{\urlstyle{same}}%

\begin{document}

\noindent
This is just some text to show the text lines before the align environment \cite{pll_wikipedia}.

\begin{tabular}{lll}
  T1 & - & This is an explanation of equation 1 \\
  T2 & - & This is the explanation of another equation \\
  T2T3 & - & $\dfrac{Test}{Test2}$ \\
\end{tabular}

\newpage
\section*{Bibliography}
\subsection*{Online}
\printbibliography[heading=bibempty,type=misc,prefixnumbers={O}]

\end{document} 

在此处输入图片描述

相关内容