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.

I want to turn off printing of DOIs in my BibTex bibliography in Lyx.

When I try to add the option doi=false under

Document settings -> Bibliography -> Bibliography generation -> Options

the bibliography is not generated anymore (i.e. question mark for citation and empty bibliography). How can I set this option via Lyx ?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Currently, LyX uses BibTeX. And for BibTeX, there is no easy way. You need to do some modifications. The major part is found in Getting rid of DOI, ISSN links from bibliography (Please, vote up that one!). I rewrote it and added the LyX part.

  1. For your bibliography style (e.g. plainnat, alphadin, ...), locate the corresponding .bst file. It is likely in your system tex directory under texmf/bibtex/bst/blabla/. Copy the file to texmf/bibtex/bst/blabla/ in your home directory (possibly you have to create the directories). And rename your file <style>.bst to something like <style>-nodoi.bst. (If you intented to use this style only once you could put it in the same directory as your .lyx file is in.)

  2. In this file search for the function format.doi. Depending on your bibliography style, the entry looks similar to

    FUNCTION {format.doi}
    { doi empty$
        { "" }
        { doiprefix doi * doiurl doi * make.href }
      if$
    }
    

    Change this to

    FUNCTION {format.doi}
    {
    }
    
  3. In LyX in the dialog for setting the bibliography style, the new style is not listed at first but after clicking "Rescan" it will show up (except you put the .bst file together with your .lyx file; then type the new style name manually).


Depending on your bibliography style DOI entries could still keep appearing in your bibliography. Then you have to modify more places in step 2. For example, you should change

    FUNCTION { format.doi.urn }
    { urn empty$
         { doi empty$
              { "" }
              { "DOI" doi n.dashify tie.or.space.connect }
           if$
         }
         { "URN" urn n.dashify tie.or.space.connect }
      if$
    }

to - maybe

    FUNCTION { format.doi.urn }
    { urn empty$
         { "" }
         { "URN" urn n.dashify tie.or.space.connect }
      if$
    }

In LyX, the field "Document settings -> Bibliography -> Bibliography generation -> Options" does not modify the LyX document (actually, the LaTeX document which is internally created by LyX). This setting is used for the internal program call to bibtex.

The option doi=false is only applicable to biblatex, see Biblatex: Get rid of ISSN, URLs and DOIs in references. But biblatex is not yet fully supported by LyX.

share|improve this answer

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.