Uses of "LaTeX cleanup" action. What do you use it for and why?

Hello people. I have seen this cleanup action, but I am not sure if I should use it BEFORE I export to LaTeX or if it is used to clean up bibliographic data that was once part of a LaTeX document and now needs cleanup, because the data is supposed to be in unicode format again?

Which one is it?

It SAYS it cleans up LaTeX code, but it does some weird stuff. I am especially confused about the following: " Escape percent character (e.g. 50% ⇒ 50\%)", which means I will have weird \% in my entries if I do this. Should it not remove the % or do nothing to the % instead? For context: % starts the comment environment in Latex.

See here for details: Save actions - JabRef

I can only say that the reason for escaping the percent character is due to biber (the biblatex processor) failing otherwise. symbols - Error with percent sign in bib entry field when using biblatex/biber - TeX - LaTeX Stack Exchange

@ThiloteE I am not sure to understand what you find weird.

To me, percent characters need to be escaped, for both biber and bibtex.
There is nothing weird to have \% in your entry: \% is the percent character while % is the character used for comments in the code.

Here is an example:

  author = {MyName, Surname},
  title = {In 2022, JabRef use increased by 650 % according to pool},
  journal = {International Journal},
  year = {2023},
  volume = {12},
  pages = {1-500},

Since the % character is not escaped, upon compilation with bibtex, you get something like

Surname MyName. In 2022, jabref use increased by 650 International Journal,
12 :1–500, 2023.

with the title truncated

If you escape the % character, you get the full title.

1 Like

Thank you for the feedback. This was my use case as well so far and I am glad I am not alone with this. So this part is definitely preparing the bibliographic data to be used with LaTeX/Biber.

I assume you have never seen a case, where one would need to backslash the % sign when using Unicode? (Imagine a use case, where users will not want to export entries to LaTeX, but rather use it with the LibreOffice/OpenOffice or Microsoft Word integration)

What about the other parts?

  • Remove redundant $ , { , and } (but not if the } is part of a command argument​)
  • Move numbers, + , - , / , and brackets into equations
  • Move numbers followed by a space left of $ inside the equation (e.g. 0.35 $\mu$m )
  • Replace all @@ with $
  • Replace multiple spaces with a single space

Is this also about preparing entries for LaTeX? Or is this already some kind of conversion to Unicode?

(I am trying to clarify because of Rename cleanup actions: "Make LaTeX ready" and "Make BibTeX ready" · Issue #8672 · JabRef/jabref · GitHub)