Changing position of Editor in MHRA

I am a complete novice to using CSL.

I am currently trying to customise MHRA to fit with my university in house style. I have managed to make some small changes, but am struggling with moving the position of the editor for an edited collection of essays. For example, MHRA currently cites:

Negotiating Clerical Identities, ed. by Jennifer D. Thibodeaux ( New York, 2010)

and I would like it to cite as:

Jennifer D. Thibodeaux (ed.), Negotiating Clerical Identities (New York, 2010)

Could anyone offer me a sample of code that would make this happen? OR at least highlight which bit of the code I need to change?

Thanks.
  • Try the (new and still under development) Visual Editor. Search by name (MHRA) here and click "Edit the style".
    This should be fairly easy if you choose a relevant citation via the "Example citations" button (eg. Borges' Selected Non-fictions which has an editor).

    The basic idea is to edit the "editor-translator" macro (change the label form to 'short', add affixes for parens and invert 'Name' and 'Label' place) and to drag and drop it before the "title-note" macro.

    Tell me if it looks too complicated (and there is a "Give Feedback" link in the editor page).
  • Thanks so much for this-- so far I have managed to edit the "editor-translator" macro-- but I am having problems dragging and dropping it! Every time I pick it up it drops to the bottom of the list... will keep trying.
  • Also-- will this move the editor for all edited books? I only need it at the front for referencing the whole of an edited volume, rather than for book sections from an edited volume.
  • When I wrote "move the macro" I wasn't clear. In the middle pane, click on the relevant part of the "example citations", i.e, the part with "ed by". Automatically, in the left pane,the relevant part of code will be selected. You'll see, under "Inline citations" or "bibliography" (then Layout>Conditional>Else>Group), an "editor-translator (macro)", this is the one you have to drag and drop (twice: once for "Inline citations", once for "Bibliography".
  • Also-- will this move the editor for all edited books?
    Yes.
    I only need it at the front for referencing the whole of an edited volume, rather than for book sections from an edited volume.
    You need to add another conditional statement. This might be tricky with the visual editor indeed.
  • Ah. Thank you. I think I am too stupid to do this! I only want it to move the editor to the start if I am citing a whole collection, rather than for all edited volumes (i.e. not for a volume in which I am only citing one essay). Does this mean I would have to put in an extra condition somewhere?

    The alternative for me would be to insert p. or pp. (for plural) infront of the cited page numbers of the Chicago Manual Full Notes... which might be easier...

    Thanks for your help- I am not sure I am cut out for this!
  • edited August 7, 2012
    So you want to get:
    -Jorge Luis Borges, Eliot Weinberger (ed.), Esther Allen, Suzanne Jill Levine and Eliot Weinberger (trans.), Selected Non-fictions (New York: Viking, 1999), p. 559

    -Isabela Mares, “Firms and the Welfare State: When, Why, and How Does Social Policy Matter to Employers?,” in Peter A Hall and David Soskice (ed.), Varieties of Capitalism. The Institutional Foundations of Comparative Advantage (New York: Oxford University Press, 2001), pp. 184–213.

    You've to add two conditionals (and twice actually: under "inline citations" and "bibliography"): one before title-note, one after.
    The former would be an "if book", the latter an "if article OR chapter". Both of them would call the same macro: "editor-translator"

    Ok?
  • Thanks once again. I now seem to have the editors duplicated both before and after... Can you tell that I am a historian?
  • Do you mean that you don't get the desired result?
  • Sorry- I wasn't very clear. Yes I did mean that I didn't get the desired result.

    I was getting:

    Jorge Luis Borges, Eliot Weinberger (ed.), Esther Allen, Suzanne Jill Levine and Eliot Weinberger (trans.), Selected Non-fictions, Jorge Luis Borges, Eliot Weinberger (ed.) (New York: Viking, 1999), p. 559

    But I think it is maybe simpler for me to just edit the footnotes manually to match my style just before submission. In an ideal world I need it to do this:

    Edited book: Jennifer D. Thibodeaux (ed.), Negotiating Clerical Identities (Harlow, 2010)

    Article/Chapter in book: Derek Neal, 'What can Historians do with Clerical Identity?,' Negotiating Clerical Identities, ed. by Jennifer Thibodeaux (Harlow, 2010), pp. 1-10

    Multiple editors: Jennifer D. Thibodeaux and Derek Neal (eds), Negotiating Clerical Identities (Harlow, 2010)

    Thanks for all your help-- my understanding of CSL has definitely improved a lot over the day-- even if my desired format still eludes me!
  • edited August 7, 2012
    The two conditional statements have to be different: one when you cite what you called a whole collection ("if book"), the other when you cite one essay ("if chapter OR article").

    Screenshot here.
  • Thanks again-- I realised that I needed to remove the original editor-translator macro fromt the sequence. Once I followed your screenshot it worked. It is now very much almost there.

    The one last thing I am struggling with is getting the labels to be conditional on type. I need (ed.) for the book format and ed. by for chapters/articles. I tried adding a conditional clause to this effect into the editor-translator macro, but it didn't work, so I must be doing something wrong.

    I need:

    Jorge Luis Borges, Eliot Weinberger (ed.), Selected Non-fictions (New York, 1999), p. 559.

    Isabela Mares, ‘Firms and the Welfare State: When, Why, and How Does Social Policy Matter to Employers?’, in Varieties of Capitalism. The Institutional Foundations of Comparative Advantage, ed. by Peter A Hall and David Soskice (New York, 2001), pp. 184–213.
  • I tried adding a conditional clause to this effect into the editor-translator macro,
    That's right.

    Edit the macro "editor-translator" (left pane, under "MACROS"): add two conditional statements under "Group"
    If "book" => Names/Conditional. Else if "chapter OR article" => Names/Conditional.

    Names/Conditional just above are the existing one that you have to duplicate (manually...) in each (new) conditional. In the second conditional you create, you'll have to edit "Label" and switch "Label" and "Name" (both are under "Names").
  • edited August 8, 2012
    Thanks. When trying to add the second condition Else if "chapter OR article" I get this error:

    Uncaught TypeError: Cannot read property 'name' of undefined

    url: http://steveridout.com/csl/CSLEDIT/src/CSLEDIT.visualEditor-710a63faf12880a52445f81645f2f4e246d0c306.js

    line: 14123

    I might have messed something up earlier on? The 'Conditional' node appears, but I can't add any child-nodes to it.

    I can proceed no problem with 'If' rather than 'Else-if'.
  • Send your report to the developer via the Feedback link in the editor page. He is closest to the editor code (as he is the author of it), and the best source of help.
  • @Eilid: try this (download using the "raw" link on the top right of that page).

    You can load it in the visual editor in order to make other changes ("Style" button on the top left> "Load CSL")
  • Thanks so much-- that worked a dream and with a little more tweaking now matches my house style! One small thing is that when I load it into Zotero the brackets around ed. in the book format are not present in the bibliography. When I upload it into the Visual Editor they appear-- and I can't see them missing from the bibliography under layout. Any thoughts?

    Otherwise this is perfect and I am really really grateful.
  • edited August 8, 2012
    Very strange indeed. Looks like a bug - but not in the visual editor I think.
    @fbennett might help us here: the relevant lines in the code are 99 (macro), 391-395 (inline citation) and 423-427 (bibliography).

    (by the way, you should check that your style validates especially as the editor is still under dev.)
  • I think you're getting confused by the effects of substitution. If you look at the "author" macro, you see that when an item doesn't have any authors, the macro uses the "editor" name variable instead.
  • edited August 8, 2012
    You're absolutely right. Thank you. And we should have used a better example in the visual editor (such as "Beyond varieties of capitalism: conflict, contradiction, and complementarities in the European economy" which has no author but three editors).

    @Eilid: in the "author" macro, "Names">"Label", edit the affixes to add the parens (or line 32 directly in the code: style updated)
  • Thank you! I made that change in line 32 and it worked a dream. Hopefully I now have it working to match the in-house style.

    Thanks once again to everyone for their help. I may have to come back begging for more assistance if my supervisor points anything out!

    Zotero is a wonderful resource, and having trialled most of the available referencing softwares it is by far the best one I have found for humanities students.
  • Actually, now that I have been using it for a morning, the one other thing that would be fantastic- although not entirely necessary- would be if I could get it to use 'ibid.' for repetition of immediately preceding references.

    I know that that Chicago does this, but I thought I would check here for help before splicing in random bits of code...
Sign In or Register to comment.