Closed ElieGouzien closed 7 years ago
Can you drop your modified revtex4-1 style in a gist and provide the link so that I can see how you modified it?
I've made a "minimal" example from revtex's sample: https://github.com/ElieGouzien/jabbrev-revtex-bug
The interesting commit is there: https://github.com/ElieGouzien/jabbrev-revtex-bug/commit/0894f8985e1951e8a07a9b9499d009289415c9a2
You have to uncomment %\bibliographystyle{apsrev4-1-jabbrv.bst}
and comment the line above to see the bug appear.
I suppose revtex4-1 to be system-wide installed.
Okay, part of the problem here is that this style is doing something very strange... A simple test is to use "\em" instead of "\JournalTitle" in creating an example. In order to get your stylesheet to work I have to use (note that I'm dropping an extra set of brackets, they're not important for this style):
"\em{" * journal * "}" *
instead of:
"\em{" journal * "}" *
So, "" is the concatenate operator in BibTeX and works like "A B " = "AB" - which means that I am being forced to concatenate the first argument with something that's already on the stack. It is very unusual in a BibTeX style to have a function depend upon something that is already on the stack. However, this is not the entire story - something else is going wrong such that \JournalTitle is not working correctly even after the stylesheet has been modified to say:
"\JournalTitle{" * journal * "}" *
Whatever is going on there is likely a legitimate compatibility problem with jabbrv. I'll look into it and get back to you as soon as I can.
Okay, there are two remaining issues:
1) With this particular style it is necessary to throw in a "\protect" to keep the title from being prematurely evaluated. I can update my instructions to include this information, as it should not hurt any "normal" styles. You can modify your stylesheet like so:
"\protect\JournalTitle{" * journal * "}" *
2) You have escaped spaces in your journal titles. Is this an example that you obtained from somewhere? If you remove the escaped spaces then everything should work, for example:
journal = "Phys.\ Rev.",
should be:
journal = "Phys. Rev.",
It is possible that I can add support for escaped spaces, but that is likely to be incredibly complicated. Is that something that you need?
I think the issue is solved :
*
should be removed. So it gives:
"\protect\JournalTitle{" journal * "}" *
I agree it's a good idea to add it in the general doc.\
since I use complete journals names in my bibtex files.I've seen you added the example file, which is nice. I think to obey it's licence we need to explain the modifications. I've done that in https://github.com/ElieGouzien/jabbrev-revtex-bug/blob/fixed/apsrev4-1-jabbrv.bst.
So thanks a lot for the help !
EDIT: You can play with the "fixed" version there : https://github.com/ElieGouzien/jabbrev-revtex-bug/tree/fixed
That's interesting that the first star can (and should) be removed once that fix is in place, that was making me very nervous about this style.
Fixed by commit f17cb2a51e09e2c6a0df7ccfdde57eb2557ce941.
Hi,
I've tried to use jabbrev with the revtex4-1 bibliography style following "Using Other Styles" and the compilation fails.
I've checked the .bbl file and the only clear difference is the introduction of
{\JournalTitle{*}}
. The compilation error is:If you have any idea of what's wrong I can try to solve it, but for now it's part of black magic for me.