Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Jan 20, 2017 · 1 comment
Closed
Labels
bug Confirmed bugs or reports that are very likely to be bugs cli status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@ghost
Copy link

ghost commented Jan 20, 2017

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

@ghost ghost changed the title duplicate entry with "subdatabase on .aux file tool" and crossreferences duplicate entries with "subdatabase on .aux file" tool and crossreferences Jan 20, 2017
@lenhard lenhard mentioned this issue Jan 23, 2017
2 tasks
@lenhard
Copy link
Member

lenhard commented Jan 23, 2017

Hi @Nehemie

Thanks for your report. I wish all users would provide a minimal working example, as you did :)

I can confirm the error and implemented a fix. A working version is available at http://builds.jabref.org/fix-aux-duplicates/ Just to be sure, could you please install this version and check that it fixes your issue?

As a side note: I think in BibTeX it is mandatory that entries which are being crossref'd have to appear in the file before the entries which reference them. Resorting the entries has no effect on the issue described here, though.

Regards
Jörg

@lenhard lenhard added bug Confirmed bugs or reports that are very likely to be bugs cli status: waiting-for-feedback The submitter or other users need to provide more information about the issue labels Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs cli status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
None yet
Development

No branches or pull requests

1 participant