I use LyX 1.6 and JabRef 2.5.
I use a bib style file called vancouver.bst.
Some entries (citations) in JabRef have an URL field. When using these the URL comes in the bibliography list. How can I avoid this?
Thank you all for your feedback.
BibTeX, biblatex and biber ⇒ Hiding the URL/Doi field in bibliography list
Hiding the URL/Doi field in bibliography list
Last edited by Matias on Sun Jan 24, 2010 8:36 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Hiding the URL/Doi field in bibliography list
vancouver.bst already contains configuration options for including eprint numbers, doi and hyper links, so let's add an option for the url field as well. Make a copy of vancouver.bst under a new name, say my-vancouver.bst, and make the following changes to that file:
Change the linetoIn the function init.config.constants, add the lineFinally, in the function output.url, change the first lineto
Setting the flag addurls to #1, the output should be identical to that of the original vancouver.bst
Edit: I noted that your title says that you also want to hide the doi. In my Texlive 2009 copy of vancouver.bst, this is the default. However, there is a flag for changing this. Check in the function init.config.constants for the lineand change it towhich should give a bibliography without doi:s
Change the line
Code: Select all
INTEGERS { hrefform addeprints adddoiresolver }
Code: Select all
INTEGERS { hrefform addurls addeprints adddoiresolver }
Code: Select all
#0 'addurls := % 0=no urls; 1=include urls
Code: Select all
{ url empty$
Code: Select all
{ addurls not url empty$ not and
Edit: I noted that your title says that you also want to hide the doi. In my Texlive 2009 copy of vancouver.bst, this is the default. However, there is a flag for changing this. Check in the function init.config.constants for the line
Code: Select all
#1 'adddoiresolver := % 0=no DOI resolver; 1=include it
Code: Select all
#0 'adddoiresolver := % 0=no DOI resolver; 1=include it
Re: Hiding the URL/Doi field in bibliography list
Really nice work.
I didn't need the last thing you described about doi. I just wanted the URL field (which had the doi thing in it) gone.
There is one concern left. I don't need it at the moment, but what if I need to cite a URL now? Is there a field in JabRef (or BibTex data entries) that I could use to include it?
I didn't need the last thing you described about doi. I just wanted the URL field (which had the doi thing in it) gone.
There is one concern left. I don't need it at the moment, but what if I need to cite a URL now? Is there a field in JabRef (or BibTex data entries) that I could use to include it?
Re: Hiding the URL/Doi field in bibliography list
The field for adding a url to an entry is 'url' -- the one you just disabled. If you want to cite a webpage, vancouver.bst supports the 'webpage' entry type. The urls of these entries are still displayed even in the patched version. (The style seems to have a bug for these entries. Bibtex errors out on webpage entries unless there is a non-empty 'type' field.)
If you want an url in an entry of some other type you can always add it in the note field.
If you want an url in an entry of some other type you can always add it in the note field.
Re: Hiding the URL/Doi field in bibliography list
Much easier solution:
Create a new optional field called "website" and paste your urls here.
You also can add "website" to Jabrefs optional fields so you will see it in Jabref, too. Now only add urls you really want in your bibliography to the url-field.
Create a new optional field called "website" and paste your urls here.

You also can add "website" to Jabrefs optional fields so you will see it in Jabref, too. Now only add urls you really want in your bibliography to the url-field.