BibTeX support in 2.1

I have updated to 2.1rc1 and still I can see very little flexibility in exporting for BibTeX. Will this change in the final release of 2.1? What I am after is to be able to keep a standard style for all my .bib file, such as the following "example.bib":

@STRING{PRA = "Phys.\ Rev.\ A"}
@STRING(PRL = "Phys.\ Rev.\ Lett.")

@ARTICLE{example:Allen&al:PRA:1992,
AUTHOR = "L. Allen and M. W. Beijersbergen and R. J. C. Spreeuw
and J. P. Woerdman",
TITLE = "Optical angular momentum of light and the transformation of
{L}aguerre-{G}aussian laser modes",
JOURNAL = PRA,
VOLUME = 45,
PAGES = "8185-8189",
YEAR = 1992,
}

@BOOK{example:Allen&al:Book:2003,
AUTHOR = "L. Allen and S. M. Barnett and M. J. Padgett",
TITLE = "Optical Angular Momentum",
PUBLISHER = "IOP",
ADDRESS = "Bristol, UK",
YEAR = 2003,
}

@INPROCEEDINGS{example:Berry:SingOpt:1998,
AUTHOR = "Michael V. Berry",
TITLE = "Paraxial beams of spinning light",
BOOKTITLE = "Singular Optics",
EDITOR = "Marat S. Soskin",
VOLUME = 3487,
PAGES = "6-11",
MONTH = "August",
ORGANIZATION = "The International Society for Optical Engineering",
PUBLISHER = "SPIE",
YEAR = 1998,
}

@INBOOK{example:Cohen-Tannoudji&al:Inbook:1989,
AUTHOR = "Claude Cohen-Tannoudji and Jaques Dupont-Roc and Gilbert
Grynberg",
TITLE = "Photons and Atoms: Introduction to Quantum Electrodynamics",
PUBLISHER = "Wiley",
ADDRESS = "New York, Chichester, Brisbane, Toronto, Singapore",
CHAPTER = 1,
YEAR = 1989,
}

@ARTICLE{example:Courtial&al:PRL:1998,
AUTHOR = "J. Courtial and D. A. Robertson and K. Dholakia and L. Allen
and M. J. Padgett",
TITLE = "Rotational Frequency Shift of a Light Beam",
JOURNAL = PRL,
VOLUME = 81,
NUMBER = 22,
PAGES = "4828-4830",
YEAR = 1998,
}

@ARTICLE{example:Tamburini&al:PRL:2006,
AUTHOR = "Fabrizio Tamburini and Gabriele Anzolin and G. Umbriaco
and Antonio Bianchini and Cesare Barbieri",
TITLE = "Overcoming the {Rayleigh} Criterion Limit with Optical
Vortices",
JOURNAL = PRL,
VOLUME = 97,
NUMBER = 25,
PAGES = "163903(4)",
YEAR = 2006,
}

The .bib files I have been able to produce sofar in 2.0 and 2.1rc1 require a rather extensive hand editing before I get them in the above shape (which is what I need).

Bo
  • Will this change in the final release of 2.1?
    No. It's a release candidate.
  • While there's a known issue with keys/labels that really should be addressed (and I believe will be in 2.2?), adding support for macros in output seems a much lower priority. Macros are designed to make human entry easier, and in this case it's a machine that's generating the output.

    Now if/when zotero supports treating publications as full class objects, then that might be another matter.
  • Export formats are relatively easily modified-- just edit BibTeX.js in the translators directory of your Zotero data directory to meet your needs.
  • I am not so keen on javascript. Does zotero support other scripting languages, such as perl?
  • Not directly. You could potentially have a translator that was a wrapper for external programs, but I don't see the point & I don't think it would really help you here.

    What are the specific changes that you want to see? If you want macro support or better keys, read bdarcus's comment: there's not much improvement that can be done on the translator level, but some improvements will come as the backend data changes. If you merely want to remove a few fields from BibTeX output, or change the punctuation of auto-generated keys, you don't need to know much javascript to make these small modifications to the current translator.
  • I want full configurability of BibTeX entries. See my example above! I would have thought that there are quite a lot of LaTeX-ers who have already come up with a solution (javascript or otherwise). Don't feel like I want to reinvent the wheel once again...
  • What do you mean by "full configurability"?
    See my example above!
    If I missed any differences between the current output and yours (macros, keys, and fewer fields), let me know.

    I use the BibTeX produced by Zotero with little modification (mostly just to the keys). I might be able to refer you to other people's versions of the BibTeX translator, but everyone has their own pet peeves, so you may have to try tweaking it to your own liking if your preferences differ.
  • edited March 7, 2011
    Here's what 2.1rc1 gives me:

    @article{allen_orbital_1992,
    title = {Orbital angular momentum of light and the transformation of {Laguerre-Gaussian} laser modes},
    volume = {45},
    lccn = {0812},
    url = {http://link.aps.org/doi/10.1103/PhysRevA.45.8185},
    doi = {10.1103/PhysRevA.45.8185},
    abstract = {Laser light with a {Laguerre-Gaussian} amplitude distribution is found to have a well-defined orbital angular momentum. An astigmatic optical system may be used to transform a high-order {Laguerre-Gaussian} mode into a high-order {Hermite-Gaussian} mode reversibly. An experiment is proposed to measure the mechanical torque induced by the transfer of orbital angular momentum associated with such a transformation.},
    number = {11},
    journal = {Physical Review A},
    author = {L. Allen and M. W. Beijersbergen and R. J. C. Spreeuw and J. P. Woerdman},
    month = jun,
    year = {1992},
    pages = {8185}
    }

    whereas I need it to be

    @STRING{PRA = "Phys.\ Rev.\ A"}

    @ARTICLE{example:Allen&al:PRA:1992,
    AUTHOR = "L. Allen and M. W. Beijersbergen and R. J. C. Spreeuw
    and J. P. Woerdman",
    TITLE = "Optical angular momentum of light and the transformation of
    {L}aguerre-{G}aussian laser modes",
    JOURNAL = PRA,
    VOLUME = 45,
    PAGES = "8185-8189",
    YEAR = 1992,
    }

    Not much similarity at all! Not only do I need a completely different key structure and another layout than the one that zotero gives me, but I also need to be able to use abbreviated journal names, accompanied by a @STRING construct etc etc. I want zotero's BibTeX entries to behave *and* look exactly as my own BibTeX databases, which I have built up over the past 20+ years!
  • I want zotero's BibTeX entries to behave *and* look exactly as my own.
    I don't think there are plans to support this. The output of the two styles should be more-or-less-the-same where the metadata is the same. [Note the titles differ (Gaussian vs. Gauss), Zotero would support the ending page number if it was in the database, and your by-hand example lacks an issue number (although you included it in your example for Courtial in your first post, so I don't know why you only sometimes include this information).] We strive to produce valid BibTeX that is as rich as possible and can be properly processed by as many tools as possible.

    To get exactly what you want, you'd have to modify the translator [just as you'd need to modify the export templates for any other reference manager (or at least those that allow you to)].

    To change the case of tag names, the order the tags are printed in (and which are actually used), and the form of enclosure is relatively simple if you have past experience programming.

    Your citation keys do not seem very predictable (some use the resource type, some use a shorttitle of the work or the parent work (which may-or-may-not be in the actual metadata). You can make Zotero's auto-generated keys look more similar to your manually generated keys, but it seems like you're waiting for there to be an editable local id field in Zotero's database & this is discussed, above.

    @STRING/abbreviations have also already been discussed.
  • I tried to enter a comment here but was not able to do so...
Sign In or Register to comment.