Text Formattinghyperref, natbib | Correct colored Links for Citations

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
CCCarsten
Posts: 2
Joined: Thu May 03, 2012 4:34 pm

hyperref, natbib | Correct colored Links for Citations

Post by CCCarsten »

Hy guys, I am new to this forum and decided to come here as I couldn't find and answere elsewhere.

Currently, I use colorlinks with natbib and bibtex and I would like to have blue linked references of the Author (Year) style in my text. Currently, it looks like
  • \citep: (Author, Year, p. 123)
  • \citet: Author (Year, p. 12)
But it should be
  • \citep: (Author, Year, p. 123)
  • \citet: Author (Year, p. 12)
Here is an example of an economics paper using LaTeX:
http://www.aeaweb.org/aea/2011conferenc ... ?pdfid=325

Does anyone know what package they use?

That's what I currently use:

Code: Select all

\documentclass[english,BCOR=1.5cm,DIV=14,a4paper,12pt,listof=totoc,bibliography=totoc,headsepline]{scrartcl}
\usepackage[utf8]{inputenc}

\usepackage{mathpazo}
\usepackage[T1]{fontenc}

\usepackage[automark]{scrpage2}
\usepackage{babel}

\usepackage[round]{natbib}
\usepackage{babelbib}

\usepackage{graphicx}

\usepackage{threeparttable}
\usepackage{colortbl}

\usepackage[pdftex,colorlinks]{hyperref}
\usepackage{color}

\setlength{\parindent}{0in}
\setlength{\parskip}{\baselineskip}

\onehalfspacing

\bibliographystyle{agsm}

\pagestyle{scrheadings}
\automark[subsection]{section}
\clearscrheadfoot
\rohead{\pagemark}
\chead{\leftmark}

% PDF-Optionen
\hypersetup{
 pdftitle=title,
 pdfauthor=me,
 pdfsubject=(Title),
}

\makeatletter
\def\ScaleIfNeeded{%
\ifdim\Gin@nat@width>\linewidth
\linewidth
\else
\Gin@nat@width
\fi
}
\makeatother

\urlstyle{rm}

\definecolor{darkblue}{rgb}{0,0,.4}
\hypersetup{colorlinks=true, breaklinks=true, citecolor=darkblue, linkcolor=darkblue, menucolor=darkblue, urlcolor=darkblue} 

%%%%%%%

\title{Title}
\date{today}
\author{me}

%%%%%
\begin{document}

\input{sub/title.tex}
\maketitle

\begin{abstract}
\input{sub/abstract.tex}
\end{abstract}

\newpage
\pagenumbering{Roman}
\tableofcontents

\newpage
\pagenumbering{arabic}
\input{sub/sections/Lorem_ipsum.tex}

\clearpage
\newpage
\bibliography{sub/BibBA}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

CCCarsten
Posts: 2
Joined: Thu May 03, 2012 4:34 pm

Re: hyperref, natbib | Correct colored Links for Citations

Post by CCCarsten »

So if nobody has any idea what package to use or what option to set, maybe you can tell me how to make at least the brackets blue as well?
Post Reply