Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

All, I have:

\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{hyperref}

\begin{document}

Now is the time.

\begin{thebibliography}{99}
\bibitem{kn:gnus} David Arnold. {\em Writing Scientific Papers in \LaTeX.} December 31, 2008.
\url{http://msemac.redwoods.edu/~darnold/math55/WritingScientificPapers/project_latex.pdf}
\end{thebibliography}

\end{document}

Couple of questions. How can I turn off the blue highlighting around the url?

And, any suggestions for better formatting this reference bibitem?

Thanks.

share|improve this question
2  
It's normally better to use bibtex (or biblatex) to generate the bibliography and take care of these styling issues –  David Carlisle Feb 24 at 21:38
add comment

2 Answers

up vote 4 down vote accepted

I assume that if you don't want URLs to be colored in the references, you probably don't want them colored anywhere in the document. If that's the case, be sure to load the hyperref package as follows:

\usepackage[colorlinks=true,urlcolor=black]{hyperref}

The typeset version of the modified MWE looks like this:

enter image description here

\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage[colorlinks,urlcolor=black]{hyperref}
\begin{document}
Now is the time.
\begin{thebibliography}{99}
\bibitem{kn:gnus} David Arnold. {\em Writing Scientific Papers in \LaTeX.} December 31, 2008.
\url{http://msemac.redwoods.edu/~darnold/math55/WritingScientificPapers/project_latex.pdf}
\end{thebibliography}
\end{document}
share|improve this answer
    
How come your pdf ouput properly do the line break in hyperlink? I have to use linkbreak in hyperref package. My pdf output got out of the page frame. I don't like to use linkbreak because it only works with pdflatex and I would like to use xelatex. –  Aung Feb 25 at 0:11
    
@Aung - I'm afraid I can't reproduce the issue you mention: Regardless of whether I compile the example code given in the answer with pdflatex, xelatex or lualatex, I get the same output, with or without the breaklinks option set. Are you maybe experiencing issues with other entries? Please consider editing your posting to list some of the entries in question. –  Mico Feb 25 at 5:18
add comment

I'd recommend that you consider biblatex for your bibliographical needs- it allows easy customization of your bibliography entries and provides many features and options.

I have converted your MWE into two files: mybib.bib which contains the bibliography entry, and myfile.tex which contains your document. To get a complete pdf you'll need to run

pdflatex myfile
bibtex myfile
pdflatex myfile

Personally, I prefer to let arara do the lifting for me, so you can just run

arara myfile

on the code below, and you'll get a pdf. You can customize the colour of your hyperlinks by consulting the hyperref documentation.

myfile.tex

% arara: pdflatex
% arara: bibtex
% arara: pdflatex
\documentclass{article}

\usepackage[backend=bibtex]{biblatex}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\addbibresource{mybib}

\begin{document}

Now is the time. 
\nocite{*}

\printbibliography

\end{document}

mybib.bib

@online{kn:gnus,
author= {David Arnold},
title= {Writing Scientific Papers in \LaTeX},
date= {December 31, 2008},
url = {http://msemac.redwoods.edu/~darnold/math55/WritingScientificPapers/project_latex.pdf}
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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