I'm using hyperref
and BibLaTeX's verbose
style, and would like for bibliography entries and initial (but not subsequent) citations, instead of printing out a URL, to use the URL to make the titles of entries and citations into external hyperlinks. Is there a way to do this?
I see how I might get part way there, in the bibliography, but I'm not sure how to get what I'm looking for in the initial citations as well.
\documentclass[nobib,nohyper]{tufte-handout}
\usepackage{lipsum}
\RequirePackage{xpatch} % For the patches below
\RequirePackage{hyphenat} % See -- http://code.google.com/p/tufte-latex/issues/detail?id=60
\RequirePackage[
backend=bibtex,
natbib=true,
bibstyle=verbose, citestyle=verbose, % bibstyle extensively modifed below
doi=true, url=true, % excluded from citations below
citecounter=true, citetracker=true,
block=space,
backref=true, backrefstyle=two,
abbreviate=false
]{biblatex}
% For tufte-like behavior (I never use \cite itself); see -- https://tex.stackexchange.com/a/47763/7844
% Not directly related to the question but included for completeness
\let\citep\footcite
% Some customizations
\AtEveryCitekey{\clearfield{url}\clearfield{doi}\clearfield{eprint}\clearfield{isbn}}
\renewbibmacro*{in:}{}
% Some reordering and exclusions; see -- https://tex.stackexchange.com/q/46804/7844
% I'd like to preserve these changes, making the feature requested here an option
\newbibmacro*{addendum+pubstate+pageref}{%
\usebibmacro{addendum+pubstate}%
\clearfield{addendum}%
\clearfield{pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\clearlist{pageref}%
\setunit{\adddot\par\nobreak}}
\xpretobibmacro{doi+eprint+url}{\usebibmacro{addendum+pubstate+pageref}}{}{}
\xpretobibmacro{eprint}{\usebibmacro{addendum+pubstate+pageref}}{}{}
\xpretobibmacro{url+urldate}{\usebibmacro{addendum+pubstate+pageref}}{}{}
\RequirePackage[]{hyperref}
\RequirePackage[all]{hypcap} % See -- https://tex.stackexchange.com/a/27349/7844
\begin{filecontents}{\jobname.bib}
@book{9780201134476,
author = {Knuth, Donald E},title = {{Computers & Typesetting, Volume A: The TeXbook}},
publisher = {Addison-Wesley Professional},year = {1986},isbn = {0201134470},
url = {http://www.amazon.com/dp/0201134470}}
@book{9780226458083,
author = {Kuhn, Thomas S},title = {{The Structure of Scientific Revolutions}},
publisher = {University Of Chicago Press},year = {1996},isbn = {0226458083},
url = {http://www.amazon.com/dp/0226458083}}
@book{9781903436837,
author = {Shakespeare, William},title = {{Much Ado about Nothing}},
publisher = {Arden Shakespeare},year = {2005},isbn = {1903436834},
url = {http://www.amazon.com/dp/1903436834}}
@book{9780765303615,
author = {Brin, David},title = {{Existence}},
publisher = {Tor Books},year = {2012},isbn = {0765303612},
url = {http://www.amazon.com/dp/0765303612}}
@book{9780691122946,
author = {Frankfurt, Harry G},title = {{On Bullshit}},
publisher = {Princeton University Press},year = {2005},isbn = {0691122946},
url = {http://www.amazon.com/dp/0691122946}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\subsection*{Some initial citations}
This\citep{9780691122946} is an initial citation, which in verbose style, it has no hyperlink and I've customized the style to omit the URL in the citation, though not in the bibliographic entry. Here's another,\citep{9780226458083} and here\citep{9781903436837,9780765303615,9780691122946} are some additional ones for good measure.
I'd like the titles for these to link externally, using the URL field from the \texttt{.bib} entry (using the DOI instead of there's no URL there).
\subsection*{Something to take up some space to demonstrate internal linking}
\lipsum[1]\lipsum[2]\lipsum[3]\lipsum[4]
\subsection*{Some subsequent citations, showing back links}
This\citep{9780691122946} is a subsequent citation, which hyperlinks back to the first corresponding citation.
So are these.\citep{9780226458083, 9781903436837,9780765303615,9780691122946}.
These work as I want them to.
\defbibnote{@prenote}{Here, as an option, instead of displaying the URL, I'd like to have the title behave as desired in the first section above: as an external link, using the URL field from the \texttt{.bib} entry.}
\printbibliography[prenote=@prenote]
\end{document}
\AtEveryCite{\DeclareFieldAlias{linked}{default}}
. You'll probably want to omit the fix for multiple URLs because that use of theurl
field is non-standard. BTW: If this answers your question, I can make an edit about that so we can close this post as a duplicate. – Audrey Mar 26 '12 at 23:07title
format definition.) – orome Mar 27 '12 at 0:06url
option isn't settable on a per-entry basis. lockstep posted a workaround here. I think we've discussed how to print the URL on its own line already elsewhere. – Audrey Mar 27 '12 at 1:31