You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checked with the latest development build (copy version output from About dialog)
I made a backup of my libraries before testing the latest development version.
I have tested the latest development version and the problem persists
Steps to reproduce the behaviour
Open a BibTeX library.
Create a BibTeX entry.
Add a long text to a field which would not be wrapped (review, quotation, note).
Save the BibTeX library to a file.
Open the file with a text editor and check the width the lines. There is no wrapped line!
Appendix
This probably was observed when adding an option to disable wrapping for fields in BibTeX. Unfortunately, there is confusion in JabRef regarding wrapping and multiline, considering it synonymous. However, there are situations where you want to enable wrapping for multiline fields (for instance, when the field allows "formatted" text), and there are situations where you do not want to wrap long lines (for instance, for fields such as url). Actually, it is up to the user whether wrapping should be enabled.
However, although there is a method for wrapping a string (StringUtil.wrap), since commit dcf9047 (import citavi knowledge items (JabRef#9033)) the method is no more used. Before that, it was called from just one method: FieldWriter.writeStringLabel (commit 14e9790, when the method FieldWriter.putIn was inlined into FileWriter.writeStringLabel): String wrappedLine = StringUtil.wrap(line, preferences.getLineLength(), OS.NEWLINE);. For some reason, the call to StringUtil.wrap was removed when fixing bug 9025 with pull request 9033.
Just for reference, originally FileWriter was named LatexFieldFormatter. The refactoring (change of class name) was in commit fdfad7c, for pull request 5838.
The text was updated successfully, but these errors were encountered:
JabRef version
5.15 (latest release)
Operating system
GNU / Linux
Details on version and operating system
Fedora 41
Checked with the latest development build (copy version output from About dialog)
Steps to reproduce the behaviour
Appendix
This probably was observed when adding an option to disable wrapping for fields in BibTeX. Unfortunately, there is confusion in JabRef regarding wrapping and multiline, considering it synonymous. However, there are situations where you want to enable wrapping for multiline fields (for instance, when the field allows "formatted" text), and there are situations where you do not want to wrap long lines (for instance, for fields such as url). Actually, it is up to the user whether wrapping should be enabled.
However, although there is a method for wrapping a string (StringUtil.wrap), since commit dcf9047 (import citavi knowledge items (JabRef#9033)) the method is no more used. Before that, it was called from just one method: FieldWriter.writeStringLabel (commit 14e9790, when the method FieldWriter.putIn was inlined into FileWriter.writeStringLabel):
String wrappedLine = StringUtil.wrap(line, preferences.getLineLength(), OS.NEWLINE);
. For some reason, the call to StringUtil.wrap was removed when fixing bug 9025 with pull request 9033.Just for reference, originally FileWriter was named LatexFieldFormatter. The refactoring (change of class name) was in commit fdfad7c, for pull request 5838.
The text was updated successfully, but these errors were encountered: