Zotero bib(la)tex import should let (La)TeX commands as they are

Hi,

when Zotero imports .bib files, it does perform some funny things with LaTeX commands. But, as such commands are legitimate in .bib files, Zotero should let them just as they are. Minimal example of input .bib file:

@book{mittelbach_latex_2004,
title = {The {\LaTeX} companion},
isbn = {9780201362992},
language = {english},
publisher = {Addison-Wesley},
author = {Mittelbach, Frank and Goossens, Michel}
}

@manual{lehman,
title = {The \texttt{biblatex} package},
url = {http://tug.ctan.org/pkg/biblatex},
author = {Lehman, Philipp and Kime, Philip and Boruvka, Audrey and Wright, Joseph}
}
which gives, after biblatex export:

@book{mittelbach_latex_????,
title = {The {\textbackslash}{LaTeX} companion},
isbn = {9780201362992},
language = {english},
publisher = {Addison-Wesley},
author = {Mittelbach, Frank and Goossens, Michel}
}

@book{lehman_textttbiblatex_????,
title = {The {\textbackslash}textttbiblatex package},
url = {http://tug.ctan.org/pkg/biblatex},
author = {Lehman, Philipp and Kime, Philip and Boruvka, Audrey and Wright, Joseph}
}
  • not sure how to deal with this. We're not going to just import LaTeX codes into Zotero, though, since they produce gibberish when used with Zotero's own citation capabilities.
    We could just parse it out entirely, I suppose (i.e. just render ("LaTeX and "biblatex" in Zotero) - it's not going to be stable on back&forth export/import, but at least it won't create nonsense.
  • @adamsmith said "We're not going to just import LaTeX codes into Zotero, though, since they produce gibberish when used with Zotero's own citation capabilities."

    But in case of Bib(La)TeX use, it would be very useful. Maybe this could be subject to an option in the configuration in order to avoid to LaTeX' users the pain of rewrite all the LaTeX macros in their exported .bib file.

    BTW, sorry for asking, but I'm not a regular user of Zotero, how Zotero manages documents which have specific style characters (italic, bold, small caps, ...) in (e.g.) titles?
  • how Zotero manages documents which have specific style characters
    http://www.zotero.org/support/kb/rich_text_bibliography

    while it's still a little unstable, in general those should convert to proper bibtex codes and vice versa.
  • OK. Maybe are missing some:

    1. font families, at least "sans-serif" and "monospace": http://www.w3schools.com/cssref/pr_font_font-family.asp
    2. font styles, at least "oblique": http://www.w3schools.com/cssref/pr_font_font-style.asp
  • we're definitely not going to do font-families and I'd argue they shouldn't be handled in titles (or bibliographic data in general) ever.

    I'm also not convinced that bibliographic data ever needs an oblique font. I've never seen that required in a style guide, for example.

    While we're happy to make things work were we can, we'll never get perfect BibLaTeX <--> Zotero correspondence.
  • You said "font-families and I'd argue they shouldn't be handled in titles (or bibliographic data in general) ever" but I was told that in contrary, bibliographic references in general (particularly titles) should be as far as possible close to the original.

    You said "I'm also not convinced that bibliographic data ever needs an oblique font. I've never seen that required in a style guide, for example." I agree that oblique fonts should be rare but, once again, if used, it would be in order to be close to the original, not for following a given style.

    You said "While we're happy to make things work were we can, we'll never get perfect BibLaTeX <--> Zotero correspondence." I can understand :) But at least monospace font family could be helpful...
  • but I was told that in contrary, bibliographic references in general (particularly titles) should be as far as possible close to the original.
    you were told that where? I don't believe that's correct (it's certainly not the case in any other bibliographic data standard I'm aware of, including the most exacting standards like MODS and MARC) and it's certainly not the way Zotero is set up.
  • Unfortunately, I don't remember where I was told that. Anyway, if it is not correct, why Zotero does provide rich text formatting?

    BTW, how Zotero would display "Pseudomonas aureofaciens nov. spec. and its pigments" with styles where titles are in italic?
  • Limited rich text - mainly subscripts, superscripts, and italics - are part of the citation data. We're really mainly interested in the ability to produce correct citations. I'm pretty sure you'll not find a single manual that requires to maintain the font-family of the original title.

    Italics get reverted, so they'd show as normal font when the rest of the title is in italics.
  • edited November 14, 2013
    Zotero supports italics via <i></i> formatting as well as superscript/subscript. The formatting in these cases actually has meaning, while san-serif/serif are purely decorative. If you could provide an example where monospace or oblique change the meaning, it may be worth considering.

    Trying to match a font family, IMO, would be on the same level as trying to match the actual font or font size.

    (Edited)
  • Well, I agree monospace or oblique doesn't drastically change the meaning but do bold and small caps, provided by limited rich text, change it?

    About monospace, the idea came to my mind to follow it for the biblatex package documentation's title (http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf) where I noticed the name of the package had been monospaced by the author: I'm pretty sure this was intentional and meaningful, hence I wanted to respect it.
  • I don't really see the need to spend more time discussing this, I highly doubt this is going to happen.

    If you can find any relevant data standard or citation/style manual that requires this we can maybe rethink it, but having spend a rather significant amount of time with author instructions and style manuals I'll say that I'd be very surprised.
  • OK, thanks for this instructive discussion.
Sign In or Register to comment.