Skip to content

duplicate entries with "subdatabase on .aux file" tool and crossreferences #2475

@ghost

Description

version JabRef 3.8.1 on Debian stretch (2017-01-20)

When using the tool "create subdatabase on .aux file" with a reference database.bib using crossrefrences, the generated subdatabase has duplicate entries for the crossreferenced entries. Then bibtex makes error with the generated subdatabse due to the duplicate entries

Steps to reproduce (1 create aux file from tex and then use jabref on .aux file). Filenames are jabref.tex and ref.bib

  1. jabref.tex
    \documentclass[letterpaper, 10pt]{article}
    \usepackage[authoryear]{natbib}
    \usepackage{lipsum}
    \begin{document}
    \lipsum[1-4]
    \cite{Lastname1xxxxa,Lastname2xxxxa,Lastnamexxxxa}
    \bibliographystyle{apalike}
    \bibliography{ref}
    \end{document} 
  1. ref.bib (3 entries)
    @InCollection{Lastname1xxxxa,
      author    = {Lastname1, Firstname},
      title     = {Title},
      year      = {xxxx},
      volume    = {xx},
      number    = {xx},
      pages     = {x--xx},
      crossref  = {Lastnamexxxxa},
    }
    
    @InCollection{Lastname2xxxxa,
      author    = {Lastname2, Firstname},
      title     = {Title},
      year      = {xxxx},
      volume    = {xx},
      number    = {xx},
      pages     = {x--xx},
      crossref  = {Lastnamexxxxa},
   }
    
    @Book{Lastnamexxxxa,
      title  = {Title},
      year   = {xxxx},
      editor = {Lastname, Firstname},
      volume = {xx},
      number = {xx},
    }
    
    @Comment{jabref-meta: databaseType:bibtex;}
  1. Makefile
    jabref:
	pdflatex jabref.tex; bibtex jabref.aux; pdflatex jabref.tex
	jabref --nogui --aux jabref,ref-generated.bib ref.bib
  1. ref-generated.bib output (now with 4 entries, aka one duplicate)
@InCollection{Lastname2xxxxa,
  author    = {Lastname2, Firstname},
  title     = {Title},
  year      = {xxxx},
  volume    = {xx},
  number    = {xx},
  pages     = {x--xx},
  crossref  = {Lastnamexxxxa},
  owner     = {Néhémie Strupler},
  timestamp = {2017.01.20},
}

@InCollection{Lastname1xxxxa,
  author    = {Lastname1, Firstname},
  title     = {Title},
  year      = {xxxx},
  volume    = {xx},
  number    = {xx},
  pages     = {x--xx},
  crossref  = {Lastnamexxxxa},
  owner     = {Néhémie Strupler},
  timestamp = {2017.01.20},
}

@Book{Lastnamexxxxa,
  title  = {Title},
  year   = {xxxx},
  editor = {Lastname, Firstname},
  volume = {xx},
  number = {xx},
}

@Book{Lastnamexxxxa,
  title  = {Title},
  year   = {xxxx},
  editor = {Lastname, Firstname},
  volume = {xx},
  number = {xx},
}

@Comment{jabref-meta: databaseType:biblatex;}

->The entry @book is now duplicated. Of course you could clean the subdatabase but this bug wasn't present in earlier version. Sadly I am not sure when it appeared but I think that this bug wasn't present in the version 3.4. I can't say when it appeared exactly and if it is related (only) to 3.8...

Thanks for your great work, and I am sorry that I can't help further

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions