wshanks / lyz

LyZ is a plugin for Zotero, which is intended to make working with LyX/Zotero more pleasant.
GNU General Public License v3.0
107 stars 13 forks source link

Protecting capitals in .bib output from LyZ #10

Closed derekwolfson closed 10 years ago

derekwolfson commented 10 years ago

Is there anyway to change the .js to protect capitals in the fields in .bib by enclosing them with {}? For example if the title is "How the Indian context is different" the output into .bib should be "How the {I}ndian context is different", but instead it omits the {} so that the final output in the .pdf bibliography created by LyX is "How the indian context is different". Doing these changes by hand in the .bib file is possible, but isn't ideal.

wshanks commented 10 years ago

Hmm, well, LyZ creates the .bib file by using Zotero's BibTeX or BibLaTeX export translator, so it has the functionality currently available to that translator. At first glance, it looks like https://github.com/zotero/translators/blob/master/BibTeX.js#895 does have the functionality you describe (see line 895), so I am surprised it does not work that way, but I don't have time to test it right now. So it is not preserving any capitals beyond the first for you? Which BibTeX fields are you looking at?

derekwolfson commented 10 years ago

Strange indeed -- I also checked their BibTeX translator and found those lines. I thought that code would make Zotero have the correct behavior - but I think that is only for names such as McDonald.

It looks like lines 881-891 might be what I am after but for some reason they are disabled. I'll close this issue and move it over the Zotero's Github since this has nothing to do with LyZ.

https://github.com/zotero/translators/blob/master/BibTeX.js#L881-L891