Need to italicize part a title

13»
  • Thanks that did the trick.
  • Adam,

    I experimented with this version of the RIS translator that preserves html codes last week, and it seemed to work. But now it's not. here is what I did:

    (1) I exported a file containing two sample records from EndNote using RefMan (RIS) formatting. I saved this as an html file.

    (2) I edited the html file to eliminate all html codes except a pair indicating an italicized phrase.

    (3) I saved this as a text file, as shown below.

    (4) I replaced the default RIS transator for Zotero with the one noted in your posting of 8 April 2012 above.

    (5) After shutting down everything, including Zotero, and rebooting, I tried importing this text file, and the html cods for italics disappeared in the Zotero record.

    Can you help me understand what is going on?

    Thanks,
  • Follow-up to my posting of 12 seconds ago:

    Here is the file I tried to import:

    TY - JOUR
    AU - Anderson, M. M.
    AU - Jenkins, S. H.
    C1 - In File
    DA - 1979
    KW - FELIS-CATUS
    POPULATION-GENETICS
    LB - 219
    PY - 1979
    SP - 267-269
    ST - Gene frequencies in the domestic cats of Reno, Nevada: confirmation of a recent hypothesis
    T2 - Journal of Heredity
    TI - Gene frequencies in the domestic cats of Reno, Nevada: confirmation of a recent hypothesis
    VL - 70
    ID - 86
    ER -


    TY - JOUR
    AU - Basey, J. M.
    AU - Jenkins, S. H.
    C1 - In File
    DA - 1995
    KW - FOOD-SELECTION
    BROWSER
    CASTOR-CANADENSIS
    CENTRAL-PLACE-FORAGING
    RISK-SENSITIVE-FORAGING
    PREDATION
    MODEL
    OPTIMAL-FORAGING
    L1 - c:\data\pdf files\basey_1995.pdf
    LB - 12732
    PY - 1995
    SP - 2197-2208
    ST - Influences of predation risk and energy maximization on food selection by beavers (<i>Castor canadensis</i>)
    T2 - Canadian Journal of Zoology
    TI - Influences of predation risk and energy maximization on food selection by beavers (<i>Castor canadensis</i>)
    UR - c:\data\pdf files\basey_1995.pdf
    VL - 73
    Y2 - 10 November 2008
    ID - 12621
    ER -

    Steve
  • You might want to try this version: https://raw.github.com/gist/3277963/d46ee56c330f20550bc542dfda4a117427c555d1/RIS.js

    It's the same as adamsmith's version above, but with a slightly adjusted timestamp. (I suspect that your copy of Zotero automatically updates to the latest version of the official RIS.js translator, which has been very recently updated)
  • I'm sorry to say this no longer works, and I can't for the life of me figure out why not. Is it possible that Zotero isn't using translators stored on my computer, but instead going to Zotero on the web to find translators each time I try to do an import?

    I compared rintze's version of the RIS translator with the one adamsmith linked to above, and verified that the only difference is the date stamp in two places.

    Thanks,

    Steve J.
  • No one has responded to my last message above, so I will elaborate. First, let me reiterate that Zotero will be virtually useless for organismal biologists who use a large number of sources with scientific names in titles unless Zotero provides a better way of dealing with italicized text than manually entering <i> and </i> codes before and after text that needs to be italicized in bibliographies. I sense relatively little interest on the part of Zotero developers in addressing this issue, although I do appreciate the efforts of adamsmith and rintze to provide a workaround, although it no longer works.

    So, why doesn't it work? It seems that the operative code in the workaround version of RIS.js is as follows:

    //Don't unescape HTML
    /* if (tag != "N1" && tag != "AB" && value !== undefined
    && Zotero.Utilities.unescapeHTML) {
    value = Zotero.Utilities.unescapeHTML(value);
    } */

    I don't do Java programming, but I have a good deal of experience in programming in R, so can guess at what this is supposed to do. This block of code apparently deactivates the if function, i.e., it deactivates a call to Zotero.Utilities.unescapeHTML. This implies that this code is active in the standard version of RIS.js. I'd like to figure out what it does, but a search for this Zotero Utility produces the following error message:

    No node extension/branches/1.0/chrome/content/zotero/xpcom/utilities.js at revision 10867

    This is why I'm stuck.

    Thanks,

    Steve Jenkins
  • edited August 10, 2012
    I looks like you're searching in the old Subversion repository. The current Zotero code is here.

    (Edit: I'm not an organismal biologist, I just wrote the code that implements in-field rich text in the citation formatter. Someone from the field, or someone who knows the RIS import translator code, will be better positioned to answer your query.)
Sign In or Register to comment.