JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.58k stars 2.5k forks source link

Clean up entries does not remove curly braces around titles #400

Closed soerenwolfers closed 8 years ago

soerenwolfers commented 8 years ago

I imported a BibTex file from Mendeley and I tried using JabRefs "Cleanup entries" to get at least some order in that mess Mendeley created. However, it does not remove curly braces around titles, such as "{Applied Functional Analysis}". Neither does it convert 1st, 2nd to real superscripts, such as "{The Linux Command Line, 2nd Internet Edition}".

I have Windows 7, Jabref 2.11.1, up-to-date Java and there are no exceptions thrown.

soerenwolfers commented 8 years ago

For example, the tool does not work on a bibliography consisting only of the following entry:

@Book{AttouchHedy;ButtazzoGiuseppe;Michaille, Title = {{Variational Analysis in Sobolev and BV Spaces}}, Author = {{Attouch, Hedy; Buttazzo, Giuseppe; Michaille}, Gerard} }

oscargus commented 8 years ago

I do not think that it should cleanup those things. Although I agree that it is annoying that the original file is not correct. Assume that the title is "{VHDL}", in which case you do not want this.

However, I guess that one can have a specific command for this (one of my co-authors insists of adding '...' around every entry...), but it should probably not be in the regular clean-up, as the clean-up should do things which are always good.

stefan-kolb commented 8 years ago

First of all, the cleanup scripts are currently being reworked.

Trying to reproduce this on current master:

oscargus commented 8 years ago

I would disagree. The problem is that it is more or less impossible to automatically tell if the {} in @Bananach .bib-file is incorrect. What that clean-up is doing is stuff like "{FIR} {FPGA}" => "{FIR FPGA}" and "$\alpha$$\times$$\beta$" => "$\alpha\times\beta$".

stefan-kolb commented 8 years ago

I'm particulary refering to the first post in this issue not the indeed strange author field in the example bib file Author = {{Attouch, Hedy; Buttazzo, Giuseppe; Michaille}, Gerard}.

soerenwolfers commented 8 years ago

Maybe I also misunderstand the purpose of the superscript clean up. Say I have a book with title "Foo, 2nd edition". Should it make "Foo, 2\textsuperscript{nd} Edition" out of that?

stefan-kolb commented 8 years ago

Yes it should. And it does at least for me on the current master. Try out http://builds.jabref.org/master/jabref_windows_3_0dev--snapshot--2015-11-27--master--fc563ef.exe

soerenwolfers commented 8 years ago

Yes, that works now.

oscargus commented 8 years ago

Me too. How would JabRef know that those {} are not there on purpose?

Consider citing the article "FPGAs in the IoT". (http://www.eejournal.com/archives/articles/20140715-lattice) Almost any .bst should render it exactly like that, why not put {} around the whole title rather than "{FPGAs} in the {IoT}" or "{FPGA}s in the {I}o{T}"?

soerenwolfers commented 8 years ago

True. Offtopic: Do you know why LateX does not automatically treat the title as if I had curly braces around it? Can curly braces do anything that I do not intend?

oscargus commented 8 years ago

The .bst-file specifies how everything should be typeset, including casing. For example, in IEEEtran.bst book titles are left as is, but article-titles are made lower case. I think it makes very much sense that bibtex "corrects" it. In this way, one can use the same bibtex-file without worrying about the final format.

oscargus commented 8 years ago

No, curly braces will only do what you intend (or what you wrote at least).

As some sort of measure: there are more than 7500 citation styles supported by CSL: http://citationstyles.org/ so having something generating the correct citation from a unified source is quite useful.

soerenwolfers commented 8 years ago

What I mean is: assume everything in my Mendeley library was perfect. Now, after the move to JabRef, I have curlybraces around every title. Should I bother removing them by hand?

oscargus commented 8 years ago

Maybe. It depends on how often you change publisher and how different their .bst:s are.

matthiasgeiger commented 8 years ago

... and the curly braces just preserve your "perfect" entries: {...} tells BibTeX to print the title exactly as specified without changing the casing. Of course they are not visible in your generated PDF/PS/... file!

koppor commented 4 years ago

Just for reference: The desired functionality is now possible. Needs to be documented though... --> https://help.jabref.org/en/CleanupEntries