JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.53k stars 2.47k forks source link

Export: HTML table (with/without abstract and BibTeX) adds pages of books #10118

Open ghost opened 1 year ago

ghost commented 1 year ago

JabRef version

5.9 (latest release)

Operating system

Windows

Details on version and operating system

Windows 10 22H2

Checked with the latest development build

Steps to reproduce the behaviour

  1. Create a book entry with field "pages" and give it a value
  2. Export database as HTML table (with abstract and BibTeX)
  3. In the Journal/Proceedings column , the pages value of a book is wrongly inserted.

See attached HTML table example

test.zip

Appendix

...

Log File ``` Paste an excerpt of your log file here ```
Siedlerchr commented 1 year ago

For reference https://github.com/JabRef/jabref/tree/main/src/main/resources/resource/layout/tablerefsabsbib this is the layout file

ghost commented 1 year ago

I don't know antyhing about code. What I need to change in there?

Siedlerchr commented 1 year ago

I see where it comes from. The comma is always inserted, even if the previous fields are empty: https://github.com/JabRef/jabref/blob/5e4cb4e8afb0dcb33629cfc2034f96b7d4ead053/src/main/resources/resource/layout/tablerefsabsbib/tablerefsabsbib.layout#L5C3-L5C3

One would need to check if at least one of the other fields is present: But not sure if this works for multipe fields. https://docs.jabref.org/collaborative-work/export/customexports#conditional-output

ghost commented 1 year ago

Do you think it can maybe be fixed for next version? I really like it but for books it's a bit annoying that the Journal/Proceedings column is used for wrong information.

The HTML table export (without abstract and BibTeX) has the same problem too.

ghost commented 1 year ago

Hi

I was the author of this post. When exporting HTML Table, there seems to be no sorting used: it's not sorted on author, title, year or Journal/Proceedings. I don't know what order is used, but definitely not something used in JabRef itself. It's looks they are random added.

Would it be possible to make the HTML Table have the SAME sorting as currently used in JabRef? So if you sorted the entries on for example "title" in JabRef, the exported HTML Table should be sorted the same.

In this way we can have the HTML Table a sorting we choose.

Siedlerchr commented 1 year ago

This should already be working by configuring the export sort order:

grafik
ghost commented 1 year ago

Hi

I'm using JabRef 5.9 and following sort orders have a problem:

Dinosaurus Paper.zip