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

Cleanup: Remove "{" and "}" #60

Closed
2 of 3 tasks
koppor opened this issue Nov 27, 2015 · 14 comments
Closed
2 of 3 tasks

Cleanup: Remove "{" and "}" #60

koppor opened this issue Nov 27, 2015 · 14 comments

Comments

@koppor
Copy link
Member

koppor commented Nov 27, 2015

  • add test cases for "Remove unnecessary $, {, and } and move adjacent numbers into equations.
  • add documentation for "Cleanup entries" including examples
  • support for removal of { and } at title = {{The Title of the Paper}}. Maybe as separate option "Remove case-keeping { and }".

The second point is important as users want to have a clean bibtex entry and biblatex handles the casing correctly. See JabRef#400.

See also JabRef#131 (comment)

@oscargus
Copy link

What is the actual use case of the third point? Crappy Mendeley exporter?

@tobiasdiez
Copy link
Member

Regarding the third point, I remember that I saw an option to remove double braces in the BibtexParser class. Not sure through.

@oscargus
Copy link

Correct. There is a method that does exactly that. Somewhere.

@koppor
Copy link
Member Author

koppor commented Nov 29, 2015

Third point: Yes, crappy mendeley and some Springer hacks. splncs03.bst changes all titles to lower case. One can either hack the bst or *add {} around the title manually. However, in "normal" bibtex files, one does not want these braces. This refs #160

There is a setting in the preference. This functionality should clearly be removed from the settings and put into the CleanUp functionality.

grabbed_20151129-124802

@stefan-kolb
Copy link
Member

I also need these brackets for IEEETran.bst

@oscargus
Copy link

oscargus commented Dec 10, 2015 via email

@stefan-kolb
Copy link
Member

Titles don't keep the original case if I don't use them.

@oscargus
Copy link

In general, one should only add brackets to the words for which the case is important. Adding it to the complete title only makes sense in a few cases (on the other hand, automatically removing the brackets is really, really bad then), as the .bib-file will be incorrect for other .bst in general.

I've ranted about this in #400. Especially, given the fact that CSL supports more than 7500 different citations styles, one can be quite sure that at least one uses sIlLyCaSe... (or at least ALL CAPS). Somehow, the purpose of the .bst is to decide this, therefore only words where the case is fixed should be bracketed. (I also think the integrity check warning should be removed as it is OK to write the title in title case as long as it is not bracketed.)

@stefan-kolb
Copy link
Member

I don't know this will probably be a philosopical discussion, but my approach is to keep the exact name of the title as it was defined by the authors.

@oscargus
Copy link

I do not think it is that philosophical. IEEE (and therefore IEEEtran.sty/.bst) defines that the title of the paper should be in Title Case, while in the references the paper titles should be in "Upper first" case (except if it is a book, when it should be in italic and the casing is not touched). They also define that the author name should be written as Firstname Lastname (although it isn't that strict), while in the references it should be written as F. Lastname (independent of what you put in the .bib-file it will turn out this way). The journal name should be written in upper case in the page heading, but in italic Title Case in the references. Therefore, there is no way that the authors have any opinion here (except for breaking against the specification).

@stefan-kolb
Copy link
Member

Ok, cool then I am breaking the rules all the time 😄

@oscargus
Copy link

🙉 🙈 🙊

(Was looking for other emojis, but those will do. ;-))

@tobiasdiez
Copy link
Member

With JabRef#853 a RemoveBracesFormatter is introduced. So just an UI is missing.

@simonharrer
Copy link

Could be used through save actions, if required.

koppor added a commit that referenced this issue Feb 9, 2024
* Fix closing of JabRef in case of issues with index writer

Uncaught exception occurred in Thread[#60,JavaFX Application Thread,5,main]
java.lang.NullPointerException: Cannot invoke "org.apache.lucene.index.IndexWriter.close()" because "this.indexWriter" is null
	at [email protected]/org.jabref.logic.pdf.search.PdfIndexer.close(PdfIndexer.java:299)
	at [email protected]/org.jabref.logic.pdf.search.PdfIndexerManager.shutdownIndexer(PdfIndexerManager.java:74)
	at [email protected]/org.jabref.gui.LibraryTab.onClosed(LibraryTab.java:792)

* NPEs are caught at onClosed

* Handle absent index writer

* Try to handle null directory

* Discard changes to src/main/java/org/jabref/gui/LibraryTab.java

* Use java.io.tempDir

* Add comments and annotations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants