2

In my MWE example:

\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} 

and for my 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},
}

I wanted the hyperlink to look like:

enter image description here

Instead it shows up like this:

enter image description here

How can I get the hyperlink text to show up blue and also with the same text as the body of the document?

Also, for some reason, when using the Legrand Orange Book template, I cannot change the color of the url link to blue. In the structure.tex file, this is the commands for the hyperlinks in the documents:

%----------------------------------------------------------------------------------------
%   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
}
}

How to also change the color on the url hyperlinks in the Legrand Orange Book template?

  • 1
    (1) that is far from minimal. Lots of unrelated stuff. (2) you haven't set urlcolor – daleif Jul 14 '15 at 20:29
1

This works: it's a matter of setting urlcolor and \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} 

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.