• Home   /  
  • Archive by category "1"

Url Link Latex Bibliography Format

LaTeX forum ⇒ Graphics, Figures & Tables ⇒ JABREF and HYPERLINKS

Information and discussion about graphics, figures & tables in LaTeX documents.










sw3quant
Posts:76
Joined: Tue Nov 02, 2010 11:40 pm

JABREF and HYPERLINKS

Postby sw3quant » Sun Nov 07, 2010 4:43 pm

Hello.

I am very new to Latex. I am using MikTex 2.8, WinEdt 6, JABREF 2.6 and Windows Vista. I am creating PDFs.

In JABREF there is a URL field, which you can use to link straight to the reference document of interest on the web.

When I generate the PDF I would like teh final PDF to include this hyperlink, so all the reader has to do is click on it and get taken there, rather than have to copy and paste the reference into google and search for it.

I have had a look and cant see how this can be done.

Would anyone be kind enough to help me on this? Please remember if it can't be done with JABREF and requires some complex hyperlink package, I would be greatful if you included a step by step example.

many thanks!!!
frabjous
Posts:2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Sun Nov 07, 2010 6:31 pm

I don't think the question can be answered without knowing what bibliography style you're using and what fields it supports for which types of bibliography entries.

You'll get quicker help if you create a minimal sample document showing your usage, and perhaps a single item bib file exported from JabRef.
sw3quant
Posts:76
Joined: Tue Nov 02, 2010 11:40 pm

Postby sw3quant » Sun Nov 07, 2010 10:53 pm

Hi,

thanks for your kind response.

Unclear what is meant by "bibliography style" but guess it refers to the type of entry that I wish to see inserted into the final PDF? If that is what it means I am just using all the default settings on JABREF. I have not changed anything. On entering data into JABREF i just specify which data source (journal, book etc) and then fill in as much information as possible. One field I always fill in is the "url" field.

The document showing usage is at:
http://www-h.eng.cam.ac.uk/help/tpl/tex ... PSnPDF.zip

You see this includes a JABREF *.bib file. However in this case the url field is left blank.

many thanks
frabjous
Posts:2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Sun Nov 07, 2010 11:10 pm

No, a minimal document. As in, just a few lines. And one-entry bib file. These are just supposed to be examples. No one has time to go through your entire thesis.

Do you really want to post your thesis on some random website? I'd delete that if I were you.

The bibliography style is a .bst file. Somewhere in one of those documents, you must be using a \bibliographystyle command to set your bibliography style. I'm far too lazy to go looking for it in some huge set of files.

Please read the following:
Board Rules
The Post on Avoidable Mistakes
Instructions on creating a minimal working example
This FAQ on "How to Ask Questions the Smart Way"


Anyway, you can load the hyperref package and see if that helps.
sw3quant
Posts:76
Joined: Tue Nov 02, 2010 11:40 pm

Postby sw3quant » Thu Nov 11, 2010 2:57 pm

Thanks for your reply.

The link is to a thesis template that uses JABREF. It is not my thesis or indeed anything to do with me. In fact there is no writing in at all and only 2 references in the .bib file.

I thought this was what you asked for?

Would very much appreciate knowing how to include the url field of the bib file as a hyperlink in the final PDF.

many thanks for your kind time
frabjous
Posts:2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Thu Nov 11, 2010 6:20 pm

Wow. Sorry, I downloaded that, opened it up and saw it had 80 files and folders in it, and just assumed it was your full dissertation. Cambridge is a crazy place if they're giving you 80-file templates.

There are two bibliography style files in there: jmb.bib and CUEDbiblio.bst. I don't know what the difference is, but it seems that it defaults to CUEDbiblio.bst, so I'm going to assume you're using that unless you tell me otherwise.

That .bst file does not support the URL field which some bibliography files do. However, it appears that the template does load the hyperref package. You could try putting, e.g.:

\url{http://www.somedomain.co.uk/someplace}

including the command, inside the "note" or "howpublished" fields. (I can't remember what these look like exactly in JabRef, and I'm too lazy to install it now, but these are standard BibTeX fields which I'm sure it supports somehow.) I think these should produce clickable hyperlinks.

But to be honest, with a template that complicated, there has to be someone there at Cambridge who is responsible for answering questions about it, and if the above advice doesn't work, I'd ask them.
sw3quant
Posts:76
Joined: Tue Nov 02, 2010 11:40 pm

Postby sw3quant » Mon Nov 15, 2010 12:43 am

Hi.

I am bit unclear on your reply Im afraid. JABREF is essentially a nice GUI front end for I think what used to be called bibtex.

I am using JABREF to do all my references. In the template you see there is a folder called references.bib.

This is a file that opens with JABREF and is where you enter the BIBTEX style data including the URL.

Whenever you want to cite anything in the thesis you just write "\cite{myRefAB123}".

I have never touched either of the *.bst files you mention, but I too assume that it's the CUED file.

You say:

You could try putting \url{http://www.cam.ac.uk}
including the command, inside the "note" or "howpublished" fields. (I can't remember what these look like exactly in JabRef, and I'm too lazy to install it now, but these are standard BibTeX fields which I'm sure it supports somehow.) I think these should produce clickable hyperlinks.

I am afraid I am unclear on what you mean here. Please could you re-explain. I see note and howpublished are mentioned in the CUED.bst file. Are you suggesting I need to modify this file somehow? If so how?

(FYI the whole template was written by someone who did know LATEX but is no longer around to take questions on it). Cambridge seems pretty bad at doing any such support I'm afraid: we are left to fend for ourselves!

Many Thanks!
frabjous
Posts:2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Mon Nov 15, 2010 1:38 am

sw3quant wrote:Hi.

I am bit unclear on your reply Im afraid. JABREF is essentially a nice GUI front end for I think what used to be called bibtex.



BibTeX is still called BibTeX, and of course I know what JabRef is. I've used it before. I mentioned BibTeX in my message, so I can't imagine why you would have thought I wouldn't know these things.

I am using JABREF to do all my references. In the template you see there is a folder called references.bib.

This is a file that opens with JABREF and is where you enter the BIBTEX style data including the URL.

Whenever you want to cite anything in the thesis you just write "\cite{myRefAB123}".


Yes, I knew all that.

I have never touched either of the *.bst files you mention, but I too assume that it's the CUED file.


Don't assume. Look. Near the end of thesis.tex, you'll see:



If you haven't changed this, then you are using CUEDbiblio -- the other bibliographystyle lines are "commented out" by the %, so they aren't active. If you changed it so there was a % in front of the first line but not in front of the others, then you would be using a different style.

You say:

You could try putting \url{http://www.cam.ac.uk}
including the command, inside the "note" or "howpublished" fields. (I can't remember what these look like exactly in JabRef, and I'm too lazy to install it now, but these are standard BibTeX fields which I'm sure it supports somehow.) I think these should produce clickable hyperlinks.

I am afraid I am unclear on what you mean here. Please could you re-explain. I see note and howpublished are mentioned in the CUED.bst file. Are you suggesting I need to modify this file somehow? If so how?


No, you shouldn't need to modify this file. Or at least I really hope you don't. I just needed to see it to see what fields are supported and what fields are not. "Note" and "Howpublished" fields are supported by it. However, "URL" is not. Hence, filling in the URL in BibTeX's URL field won't do any good, but perhaps you can use these fields instead.

So I'm telling you to try putting the URL inside these fields in JabRef, complete with \url{...} which is the code to make them clickable hyperlinks.

Perhaps this picture will help:

jabref.jpg (54.23 KiB) Viewed 21687 times


Note that only certain kinds of Bibliography items have "howpublished" fields. Others won't. But I think you can probably use "note" instead. You might not need to do both. But you'll need to test these out with your actual files and entries.
sw3quant
Posts:76
Joined: Tue Nov 02, 2010 11:40 pm

Postby sw3quant » Mon Nov 15, 2010 3:32 pm

Thank you very much for your kind replies. They are very helpful indeed.

As you mentioned, some entry types in JABREF might not have the "Howpublished" field, indeed none of mine do, but they all have the "Note" field.

When I do as you suggest and copy the url from my url field into the note field and surround by \url{} and compile I see that the output PDF contains a hyperlink to the URL as you said it would. Many Thanks.

However, I am afraid this is not quite what I am aiming for. As many of my URLs point to very long paths on servers (several whole lines of text), I would like the actual URL to be hidden and to just show a "globe/other symbol" type figure (as JABREF does for example, when there is a URL in the JABREF url field). This would then be shown next to the reference and allow a user reading it online to connect to the URL by clicking on it. (of course it is of no use to an offline/hardcopy user).

How could I do this? I know the approach is possible as I have seen it in some scientific papers.

To reply to the second post below:

When I tried adding \url{} around the contents of the url field, nothing happens. I dont mind going through my whole JABREF file and modifiying it with \url{}. I also dont mind modifying the bibtex file everytime I import something. Given this are there any advantages to choosing a Biblatex?

Many Thanks

Return to “Graphics, Figures & Tables”

Jump to
  • LaTeX Community
  •    Announcements
  •    Community talk
  •    Comments & Wishes
  •    New Members
  • LaTeX
  •    Text Formatting
  •    Graphics, Figures & Tables
  •    Math & Science
  •    Fonts & Character Sets
  •    Page Layout
  •    Document Classes
  •    General
  • LaTeX's Friends
  •    BibTeX, biblatex and biber
  •    MakeIndex, Nomenclature, Glossaries and Acronyms
  •    Conversion Tools
  •    Viewers for PDF, PS, and DVI
  •    XeTeX
  •    Others
  • LaTeX Distributions
  •    Decision Guidance
  •    MiKTeX and proTeXt
  •    TeX Live and MacTeX
  •    Others
  • LaTeX Editors
  •    Decision Guidance
  •    AUCTeX
  •    Kile
  •    LEd
  •    LyX
  •    Scientific Word/Workplace
  •    Texmaker and TeXstudio
  •    TeXnicCenter
  •       Announcements
  •       General
  •       Templates, Wizards & Tools
  •       Feature Suggestions
  •       Development
  •    TeXShop
  •    TeXworks
  •    WinEdt
  •    WinShell
  •    Others
  • LaTeX Templates
  •    Articles, Essays, and Journal Templates
  •    Theses, Books, Title pages
  •    Letters
  •    Presentations and Posters
  •    Curricula Vitae / Résumés
  •    Assignments, Laboratory books and reports
  •    Calendars and Miscellaneous

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

Powered by phpBB® Forum Software © phpBB Limited

BibTeX: How to cite a website

With the increasing importance of the internet for scientific research, need increases for properly citing online resources. Unfortunately, when the main LaTeX citation machinery BibTeX was created, this was not to be foreseen; this is why there is to date no canonical way to cite, say, a website. Different workarounds have emerged, using for example some trickery with the type (see below), but the right way™ hasn't been found yet.

This could change with the advent of biblatex. Its new entry type is supposed to contain references to web resources and doesn't give room for confusion anymore.

With the BibTeX entry


and the LaTeX file

one gets a nicely typeset list of references.


Note that there are plenty of more options and entry types in the biblatex package, such as (the currently unused) and .

Because of its supposedly large impact on the (La)TeX community, the author of biblatex still declares the package as 'beta' which is why it is not included in TeXlive, for example. Should you for this or some other reason be unable to install biblatex, there are (inferior) alternatives to use for URL citations in a reference list.

Alternatives

Using the natbib package

The natbib package extends the functionality of regular bibtex to a certain degree, and allows for website citations as well. There is no specific entry type for online resources, but , , and work quite well.


Note that standard bibstyles (such as ) will not typeset the key contents of the individual entries; it is required to use one of natbib's own entries, e.g. .


Using the url package

The most elemental way to include web references is via the key of the entry. Use



and



One thought on “Url Link Latex Bibliography Format

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *