-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Group names can now be rendered using LaTeXs commands #1684
Conversation
Mhh, I think this is the wrong place to add this functionality. If I name my group |
Really!? If you name a group \beta, in a program dealing with LaTeX, would
you be upset if it shows the beta properly? (The \relax use case is, ehh,
far fetched?)
|
Do we really need to allow latex code for group names? Why is normal text not enough? I'd rather not have this option and keep it simple. |
For me the problem is that the Latex -> Unicode converter is not good enough to handle arbitrary text and I think we may run into problems where names of groups are not properly rendered (i.e. "A or B" in the form "A\B", or similar things with backslash). As a user, I kind of expect that JabRef takes what I give it as a name (especially since I can provide unicode strings, I don't see the reason to support latex accents). Moreover, we might run into big performance problems with groups again. The idea is nonetheless good. Just put the conversion code in the automatic generation of groups (since there the user has no control over the names of the groups). |
I see your point, although I'm not fully agreeing with it (I'd rather write Could you have a look at why the backslashes are removed when reading back the group definitions? (Since you have better insight into the group package.) |
9c12074
to
6f55567
Compare
I changed it to do the conversion upon generation of automatic groups (and correspondingly changed the CHANGELOG entry). |
@@ -73,6 +74,8 @@ | |||
private final JabRefFrame frame; | |||
private final BasePanel panel; | |||
|
|||
private static final LatexToUnicodeFormatter FORMATTER = new LatexToUnicodeFormatter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make the formatter a normal variable (initialized directly before the for loop below) instead of static final.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had it like that first. ;-)
Ok, just make the fomatter a normal variable and then this can be merged. I will have a look at the serialization / parsing problem as soon as I'm back in Germany (i.e. in a month) |
* master: (22 commits) Do not cite entries without a key in OpenOffice/LibreOffice (JabRef#1682) (JabRef#1683) Got rid of unused preferences (JabRef#1672) Move labelpattern (JabRef#1626) Implementation of shared database support (full system). (JabRef#1451) Removed bst from architecture tests JabRef#1699 Update PULL_REQUEST_TEMPLATE.md French localization: Menu: Translation of an empty string French localization: Jabref_fr: empty strings translated Updated string similarity version (JabRef#1698) Minify description of release process Announce switch from GPL to MIT in CONTRIBUTING.md and README.md Some cleanups to initialize empty MetaData at fewer positions (JabRef#1696) Automatic group names are converted from LaTeX to Unicode (JabRef#1684) Update ISSUE_TEMPLATE.md (JabRef#1686) Removed (false) NPE issue reported by FindBugs More Swedish translations (JabRef#1691) Updated wiremock version (JabRef#1690) Some minor code cleanups (JabRef#1689) Removed dependencies of Globals.prefs in some tests (JabRef#1688) Lookup BibEntry from ISBN and merge information (JabRef#1621) ... # Conflicts: # src/main/java/net/sf/jabref/gui/BasePanel.java # src/main/java/net/sf/jabref/importer/ImportMenuItem.java # src/main/resources/l10n/JabRef_da.properties # src/main/resources/l10n/JabRef_de.properties # src/main/resources/l10n/JabRef_en.properties # src/main/resources/l10n/JabRef_es.properties # src/main/resources/l10n/JabRef_fa.properties # src/main/resources/l10n/JabRef_fr.properties # src/main/resources/l10n/JabRef_in.properties # src/main/resources/l10n/JabRef_it.properties # src/main/resources/l10n/JabRef_ja.properties # src/main/resources/l10n/JabRef_nl.properties # src/main/resources/l10n/JabRef_no.properties # src/main/resources/l10n/JabRef_pt_BR.properties # src/main/resources/l10n/JabRef_ru.properties # src/main/resources/l10n/JabRef_sv.properties # src/main/resources/l10n/JabRef_tr.properties # src/main/resources/l10n/JabRef_vi.properties # src/main/resources/l10n/JabRef_zh.properties
Inspired by #1681