-
-
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
JabRef adds newlines when writing jabref-meta: groupstree:
#250
Comments
As the biber developer, I can say that bibtex libraries tend to remove newlines when reading comments and so if you have to output them again (which biber tool mode does), you lose any verbatim formatting. So, relying on newlines in comments for any processing decisions is generally a bad idea. |
Agreed. The only problem here is the inserted space within a Bibtex key - but I would say that this is also an issue on our side, as breaking within a BibTeX key is not the best idea 😉 |
So what would a fix to this look like? Disable line wrapping in JabRef? |
Breaking after word boundaries? |
Why break lines? |
There are preferences for line wrapping, but I cannot find an option to set the line width in the GUI. Maybe line wrapping was meant to be deleted anyway. I would be very much in favor of this. I do not see why we need line wrapping at all. Related: #116 By the way, I do not think that this will be implemented for 2.11, but instead for 2.80. |
Line breaking in the group serialisation seems to be independent from the globally defined linebreking, as this are the only lines wrapped in my dummy bib file. So it should be rather easy to remove the line breaks for group definitions. |
👍 for removing any line breaking functionality in metadata fields. Other line breaking is not affected by this bug. |
I removed the hard-coded line breaking for MetaData in 4c25b6a. @bluebirch Can you please test with this shapshot https://circle-artifacts.com/gh/JabRef/jabref/837/artifacts/0/home/ubuntu/jabref/build/releases/JabRef-2.80dev--snapshot--2015-10-21--fix-metaData-linebreaking--4c25b6a.jar whether the problem is solved in your workflow using biber. Thanks! |
@matthiasgeiger: how about writing a serialization test that uses the entry sample from @bluebirch, writes it to a file and checks that the file is correct? :) |
@matthiasgeiger That solved the problem, thank you. On a side note, I wonder why not write the groups tree in standard XML or something instead of some kind of obscure CSV format? :-) |
Historical reasons. I don't know, if JSON can be nested in BibTeX (special characters?). Currently, that would be my favorite as we don't need the extensibility of XML (and I am a real XML fan 😇) |
I would guess anything that does not depend on newlines, indents and so on is feasible. However, I suspect brackets ( |
Is this bug fix back-ported to 2.11? |
No. 😞 |
@bluebirch Could you try the 2.11 development at http://ge.tt/9Idc446? We tried to backport the fix. |
Sorry for a late response. Obviously, it was backported to 2.11.1, and it seems to work. Thank you. |
4877f181b1 pt-PT lowercase months (#250) git-subtree-dir: buildres/csl/csl-locales git-subtree-split: 4877f181b1a962ea3e26d23f12d1acba3ccce347
When JabRef writes
jabref-meta
data in@comment{}
entries, it uses a fixed line with. Other programs that read and write the BibTeX file might not care about newlines in comments. An example of this isbiber
, wich I try to use as a BibTeX pretty-printer. Minimum working example:Consider the following BibTeX file written by JabRef:
Note the newline in the middle of a BibTeX key. When processing this file with the current development version of
biber
(previous versions removed comments altogether), it comes out like this:Note that the newline in the BibTeX key is converted to a space (
Para noid2015
), which breaks the groups tree.Now, this could be considered a bug in either
biber
or JabRef. I tend to blame JabRef, since I can't see any reason why JabRef should write fixed-with@comment
entries and thus rely on truly verbatim treatment of@comment
entries.The text was updated successfully, but these errors were encountered: