Skip to content
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

Don't write enclosing braces to PDF metadata? #8452

Closed
drgibbon opened this issue Jan 21, 2022 · 8 comments · Fixed by #8789
Closed

Don't write enclosing braces to PDF metadata? #8452

drgibbon opened this issue Jan 21, 2022 · 8 comments · Fixed by #8789

Comments

@drgibbon
Copy link

When writing metadata to PDF (Tools -> Write metadata to PDF files / F6), JabRef writes the enclosing braces that are only there to protect from LaTeX formatting (e.g., to preserve capitalization in {United Nations}).

I don't know if it would be workable, but it would be nice if JabRef did not write these braces to the PDF metadata.

@ThiloteE
Copy link
Member

ThiloteE commented Feb 1, 2022

Removing braces altogether may create problems for LaTeX users.
Keeping them will create problems for non-LaTeX users.

Solution:

Semi-automatically convert field contents via clean-up actions in Quality > Cleanup entries and only write metadata afterwards:

image

@ThiloteE ThiloteE closed this as completed Feb 1, 2022
@drgibbon
Copy link
Author

drgibbon commented Feb 2, 2022

Thanks for the reply, but doesn't your solution imply altering the database contents? I was referring only to what is written to the PDF metadata (in that I don't want to actually remove the braces from the database entries, as they are there for a reason).

@ThiloteE ThiloteE reopened this Feb 2, 2022
@ThiloteE
Copy link
Member

ThiloteE commented Feb 2, 2022

Hmm, I guess then we would need a tick-able preference at options > preferences > XMP metadata

@JeffersonJefferson-pixel

Hi, I'm interested in working on this issue. Is this issue available?

@ThiloteE
Copy link
Member

@JeffersonJefferson-pixel

There will be some changes to the XMP metadata functionality. You can track this work in pull-request #8681. If you were to start working on this issue here now, there is the possibility you might encounter conflicts. I would suggest to wait until 8681 is merged or keep track of what will change via 8681 while working on this.

The alternative would be to have a look at the other good first issues, the projects page, if you are looking for more advanced challenges (candidates for university projects) or some of the other issues. I personally also would be happy if we could get rid of some of the bugs.

@JeffersonJefferson-pixel
Copy link

JeffersonJefferson-pixel commented Apr 24, 2022

We are actually working on that pull request as well.

@ThiloteE
Copy link
Member

Ah, got it! Thanks! :-)

@koppor
Copy link
Member

koppor commented Apr 25, 2022

The author meant the Unprotect Terms Formatter

Minimal example:

@article{,
  author = {{United} {Nations}},
}

gets

@article{,
  author = {United Nations},
}

The Remove braces formatter is as follows:

@article{,
  author = {{United Nations}},
}

gets

@article{,
  author = {United Nations},
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants