Dear All,
I am using hyperref with the pdftex driver to create a pdf file from my LaTex source files. I have a BiBTeX style (no-plain) that allows for URLs in citations and I am using the url package to format the URLs.
Now, I would like to achieve the following: I want the URLs to show up as hyperlinks, but I do not want them to be followed by back references (page number that they come up and so on).
If I use
\usepackage[pdftex]{hyperref} URLs show up as plain text (e.g. \url{http://www.google.com}.
If I use
\usepackage[pdftex,backref]{hyperef}, then the URLs show up as hyperlinks but they are followed by the page number(s) on which they are defined.
How can I avoid that?
Regards,
George
Text Formatting ⇒ hyperref | Hyperlinked URLs without back References
-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
hyperref | Hyperlinked URLs without back References
Actually, the former should produce hyperlinks. Could you make a working example?
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
hyperref | Hyperlinked URLs without back References
Sure. This is my tex file:
The bib file is:
The BiBTeX style can be downloaded from
http://www.soi.city.ac.uk/~cj571/no-plain.bst (not pasting it here as it is too long).
I am including the path package as it is needed for the formatting of the URLs and the hypernat package for the numbers and sort&compress options of natbib to work.
If you run it on MikTeX 2.8 (in WinEdt if it makes any difference) with only the pdftex option selected you get plain text for the URLs (i.e., \url{http://www.google.com}.
If you run it with pdftex and backref, the URLs are formatted fine but you also get the number of the page on which the URL appeared.
I want the URL formatted but not the page number - in my reading, pdftex on its own should have done the trick.
Any ideas?
Regards,
George
Code: Select all
\documentclass[a4paper,12pt,twoside]{article}
\usepackage{path}
\usepackage{url}
\usepackage[comma,square,sort&compress]{natbib}
\usepackage[pdftex]{hyperref}
\usepackage{hypernat}
\begin{document}
\section{Introduction}
\label{sec:intro}
The advancements in ubiquitous computing present new challenges and opportunities for the design, organisation and deployment of software.
%
Service-Oriented Architecture (SOA) \cite{soa,soa2,papazoglou} deals with these issues by organising software as a set of \emph{interoperable} services.
\bibliographystyle{no-plain}
\bibliography{journal}
\end{document}
Code: Select all
@book{papazoglou,
title={Web services: principles and technology},
author={Michael Papazoglou},
isbn={9780321155559},
url={\url{http://books.google.com/books?id=0qLX9nl87EwC}},
year={2008},
publisher={Pearson Prentice Hall}
}
@Article{soa,
title = "Web 2.0 and {SOA}: Converging Concepts Enabling the
Internet of Services",
author = "Christoph Schroth and Till Janner",
journal = "IT Professional",
year = "2007",
number = "3",
volume = "9",
pages = "36--41",
}
@book{soa2,
author = {Thomas Erl},
title = {Service-Oriented Architecture ({SOA}): Concepts, Technology, and Design},
year = {2005},
month = {August},
day = {12},
isbn = {0131858580},
publisher = {Prentice Hall PTR},
address = {Upper Saddle River, NJ, USA},
howpublished = {Hardcover},
}
http://www.soi.city.ac.uk/~cj571/no-plain.bst (not pasting it here as it is too long).
I am including the path package as it is needed for the formatting of the URLs and the hypernat package for the numbers and sort&compress options of natbib to work.
If you run it on MikTeX 2.8 (in WinEdt if it makes any difference) with only the pdftex option selected you get plain text for the URLs (i.e., \url{http://www.google.com}.
If you run it with pdftex and backref, the URLs are formatted fine but you also get the number of the page on which the URL appeared.
I want the URL formatted but not the page number - in my reading, pdftex on its own should have done the trick.
Any ideas?
Regards,
George
-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
hyperref | Hyperlinked URLs without back References
I don't know about the no-plain style but the result seems equal if I use the plainnat style. In either case, add the numbers option to the options list of natbib. (I get an error if processing your example without that option and I know that there are cases in which older versions of natbib were silently assuming it so I guess you actually want numeric citations.) The next thing is to change the bibliography entries from
to simply
as the hyperlink is set automatically. If I do this, everything works fine.
Best
Code: Select all
url={\url{http://books.google.com/books?id=0qLX9nl87EwC}},
Code: Select all
url="http://books.google.com/books?id=0qLX9nl87EwC",
Best
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).