retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.29k stars 284 forks source link

Minimize bibtex export package dependencies #1402

Closed jaromrax closed 4 years ago

jaromrax commented 4 years ago

I cannot find a solution for titles that are in latex. I have tons of latex titles to export, I still get e.g.

{Vertex} {Constant}
 for $undefined\{7\}undefinedmathrm\{{Be}\}\{(p,undefinedensuremath\{undefinedgamma\})\}undefined\{8\}undefinedmathr
m\{{B}\}$ {Reactions}},

for the original title like Vertex Constant for $^{7}\mathrm{Be}{(p,\ensuremath{\gamma})}^{8}\mathrm{B}$ Reactions

Is there a simple solution? Thank you jaromir

label-gun[bot] commented 4 years ago

It looks like you did not upload an debug report. The debug report is important; it gives @retorquere your current BBT settings and a copy of the problematic reference as a test case so he can best replicate your problem. Without it, @retorquere is effectively blind. Debug reports are useful for both bug analysis and enhancement requests; in the case of export enhancements, I need the copy of the references you have in mind.

  1. If your issue relates to how BBT behaves around a specific reference(s), such as citekey generation or export, select at least one of the problematic reference(s), right-click it, and submit an BBT debug report from that popup menu. If the problem is with export, please do include a sample of what you see exported, and what you expected to see exported for these references.

  2. If the issue does not relate to references and is of a more general nature, generate an debug report by restarting Zotero with debugging enabled (Help -> Debug Output Logging -> Restart with logging enabled), reproducing your problem, and selecting "Send Better BibTeX debug report..." from the help menu.

Once done, you will see a debug ID in red. Please post that debug id in the issue here.

Thank you!

retorquere commented 4 years ago

I really need that debug log, generated as explained by label-gun in point 1.

jaromrax commented 4 years ago

Thank you very much for the care. Is the reference ok? FR3Q3ZGL-euc

I was checking the output. During compilatoin I am also getting errors like

l.56 ...eaction rate for {{Mg22}}+p\textrightarrow
                                                  {{Al23}} from the

and package

retorquere commented 4 years ago

There's a few things going on, but first: did you get ...for $undefined\{7\}undefinedmathrm\{{Be}\}... using Better BibTeX, or Better BibLaTeX? I can't reproduce the undefined parts. When I export that using Better BibTeX, I get

{Overall {{Normalization}} of the {{Astrophysical}} \${{S}}\$ {{Factor}} and the {{Nuclear Vertex Constant}} for \$\^\{7\}\textbackslash{}mathrm\{\vphantom\}{{Be}}\vphantom\{\}\{(p,\textbackslash{}ensuremath\{\textbackslash{}gamma\})\}\^\{8\}\textbackslash{}mathrm\{\vphantom\}{{B}}\vphantom\{\}\$ {{Reactions}}},

no undefined in sight.

jaromrax commented 4 years ago

Thank you for the care again, your task is complicated by the fact, that I was playing with .js and conversions for hours and I have mixed up few versions... sorry for that now - with Better Bibtex - I get the same:

 title = {Overall {{Normalization}} of the {{Astrophysical}} \${{S}}\$ {{Factor}} and the {{Nuclear Vertex Constant}} for \$\^\{7\}\textbackslash{}mathrm\{\vphantom\}{{Be}}\vphantom\{\}\{(p,\textbackslash{}ensuremath\{\textbackslash{}gamma\})\}\^\{8\}\textbackslash{}mathrm\{\vphantom\}{{B}}\vphantom\{\}\$ {{Reactions}}},

for

Overall Normalization of the Astrophysical $S$ Factor and the Nuclear Vertex Constant for $^{7}\mathrm{Be}{(p,\ensuremath{\gamma})}^{8}\mathrm{B}$ Reactions

(sorry, I tried to remove \$ and other characters from old bibtex.js manually)

jaromrax commented 4 years ago

I am still searching and I have found something! - the tag #LaTeX makes a good change, tagging in process...

https://forums.zotero.org/discussion/5324/bibtex-and-greek-characters/p2

retorquere commented 4 years ago

Yeah that was the next thing I was going to suggest -- either:

But I worried about those undefineds so I wanted to diagnose that first.

retorquere commented 4 years ago

(sorry, I tried to remove $ and other characters from old bibtex.js manually)

That's in principle OK, but in practice not a good idea:

jaromrax commented 4 years ago

Yes, I get the point with .js, I dont edit them anymore. My final message now:

Thank you for your help, it was vital, even you can think, you only directed me to proper use of BBT. Thank you again. I have realized: 1/ tag #LaTeX makes the BBT exporter leave latex there. This solved a lot. 2/ a lot of references have a mixed latex and utf8 characters - I repair manually 3/ \textrightarrow - I cannot use, the main package somehow blocks the textcomp package, I repair manually to $\rightarrow$ 4/ I still need to change the language in .bib with cat ~/Downloads/Exported\ Items.bib | sed 's/{en}/{english}/g' > my.bib, which may be a problem of the main package. 5/ There can be also a mix : latex in title + utf8 in authors - I dont get a proper conversion of the utf8 letter Š to {\v S}, other letters were ok - I handled manually

Great to have your package. Best regards, Jaromir

retorquere commented 4 years ago

In the next release, exports will default to character translation that minimizes the need for external packages, so that the manual fixup won't be necessary, as it will default to $\rightarrow$.

retorquere commented 4 years ago

Wait, reaction rate for Mg22 doesn't occur in de debug log you sent.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.