-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Sorting by title is broken #2200
Comments
Okay I found the reason... |
It looks like JabRef consider the 'times-cited" as a text and not as a number. |
But it managed somehow to sort the titles inside {} (just takes { as first letter), yet it cannot do the same with 'numbers treated as text'. The same things happens with year which is much more popular field than times-cited. |
Indeed, @mlep is right, times-cited and year are sorted based on their textual representation. @mzagorowska In this representation, the sorting is absolutely fine. You can reproduce the same behavior in the folder system of your operating system (at least in windows). If you create folders with names '2', '201', etc. they will be sorted in exactly the same fashion as above. This is just to explain the behavior, not to justify it. Of course it would make sense to interpret these columns as numbers and sort them according to their numerical order. It might make sense for a few more fields that typically store numerical values, such as the volume of an article. Since there are no mandatory type definitions for fields in BibTeX, JabRef does not really take this into account so far and I cannot say how easy or difficult it will be to implement this. But I think this would be a sensible enhancement. |
Just to make sure: or
|
The first one. Full example of an entry: |
Okay, thank you! The problems are caused by the double-braces Nonetheless, the incorrect sorting of Have you put those fields manually or have you configured JabRef to do this? |
OK, this might be a problem. Unfortunately, such formatting was not my idea, such entries are taken directly from Web of Science database. Apparently, I cannot just copy and paste the .bib file from their website. Thank you for your help! But as you have said, the title problem remains. |
Find-ReplaceAll should solve most of your problems: Just replace However, please make a backup of the bib-file first 😉 |
To get a numeric sorting for any custom field, we would need to make the field type numeric inside our implementation (I think there are several field types like month etc pp that are treated differently). I don't think this is possible for the user at the moment but only inside the code. |
@matthiasgeiger @mzagorowska The find-replace may corrupt your database. |
Regarding the sorting bug, we need to use the latex free version of the entry title in case we want to have such a sorting. |
@mlep Exactly, I think that {{ is sometimes necessary (as in your example). We have a choice between correct sorting or correct title. The only solution I can think of is to have every title in {{ }}, but I have no idea how to change existing entries (not manually). |
@mzagorowska Generally, there is no reason to have a whole content between {{ and }}. Maybe you can ask on the forum how to change this issue without trouble. |
@JabRef/developers What is our decision on this? Should we ignore LaTeX commands for sorting? I tend to say so. |
👍 for ignoring the LaTeX commands - think, we should just use the latex-free version of the BibEntry, shouldn't we? |
Yes. However, this sorting stuff is organized using the GlazedLists lib - thus, requires some time to dig into the details how to change the current behavior. |
Does the LaTeX-free version really solve the problem here? I mean does that actually remove the double braces? Because the bracing isn't really LaTeX-specific, is it? |
JavaFX? 😇 |
At least running "Latex To Unicode" removes the braces... |
Just a note regarding sorting (that we might want to discuss in another issue maybe): The sorting of titles in libraries and also in other reference managers, such as EndNote, avoids the words "A", "An", or "The" at the beginning of titles for the sorting. The reason for this is that you usually have a huge amount of entry titles starting with this and if you take into account "A" the sorting becomes less useful. We might want to consider doing the same in JabRef. Personally, I like it more if we take these words into account for the sorting, but I have been told that the other way is the professional one. |
* create getFieldOrAliasLatexFree method based on non-latex-free version using lambdas * use latexfree version of fields for sorting maintable - fixes #2200 * add tests and fix a glitch * add CHANGELOG entry
JabRef version 3.6 and current master
As reported in the forum sorting by title does not sort ALL entries correctly:
In fact there seem to be two independent lists which are sorted correctly. Without a look at the good I could not find a pattern which entries are assigned to which list...
The text was updated successfully, but these errors were encountered: