How do I replace hyphens with en dashes?

Zotero seems to use hyphens instead of en dashes in hyphenated (sorry!) names and between dates. I believe this is not what publishers want. In MS word you create an en dash by typing control + - (the - on the number pad) It is longer than a hyphen and CMOS and my copy editor tell me this is correct.

1. can Zotero change this in its csl files?
2. if not, how do I edit the csl file to make the change?
I'm using CMOS full note.
  • Zotero should be using en-dashes. Definitely for dates, I think for names, though not quite as sure. Do you have an example?
  • Hyphenated names are called hyphenated names because they use hyphens. If you have some evidence that a style guide wants an en dash, please provide it, but that would certainly be at odds with mainstream convention.

    En dashes are correct for date ranges, but as adamsmith says, that should already be the case in Zotero.
  • well, except that it occurs to me we can't really do date ranges in Zotero, so I'm wondering where those would come from data-wise?
  • (CMoS confirms hyphens for hyphenated names in CMoS 8.6)
  • well, except that it occurs to me we can't really do date ranges in Zotero, so I'm wondering where those would come from data-wise?
    I thought we had some mechanism for passing through literal dates and that fbennett had some sort of substitution for hyphens in date ranges passed as literals, but I might have made both of those things up.

    doyledh, where in relation to dates are you seeing hyphens?
  • I may have it wrong on the hyphenated names, or my copy editor does. I cannot find the CMOS rule on this. On en dashes between dates in titles, here is an example of the hyphen being used:
    Jonathan Sperber, The European Revolutions, 1848-1851, 2nd ed. (Cambridge: Cambridge University Press, 2005).
    I can't change it in the Zotero information window.
  • Why can't you change it in Zotero?
  • I assume that's because MS Word specific key-combinations (like ctrl+hyphen on the numpad) won't work in Zotero. You can either copy and paste the en-dash, e.g. this is one you can use: –
    Or you can hold the alt key and type 0150 on the number pad
    https://en.wikipedia.org/wiki/Dash#Rendering_dashes_on_computers
  • OK, so this is in a title field. Just to clarify, this isn't really Zotero-specific. That's just a text field like any other, and it's up to you to make sure it's correct. How you enter an en dash depends on your OS. (It's much easier on Macs.)

    Unlike, say, capitalization, which some CSL styles do adjust for you, the use of en dashes isn't really a style issue—as far as I know, en dashes are pretty much just universally considered the typographically correct way to render date ranges—so this isn't something a style would fix automatically.
  • OK, so I need to work though my citations and correct in the "info" window whatever needs changing. There is no way to enter an en dash without copying and pasting you are telling me. Is that not something that can be fixed/changed on Zotero?
    Thanks for your help.
  • See my link to Wikipedia above on various options for en-dashes. I don't think Zotero will implement MS Word specific shortcuts for special characters, no, but there are various options via character maps, there are some dedicated tools for special characters, etc.
    Note that hyphens in page ranges are automatically replaced by en-dashes by Zotero, so no need to change those.


    (@Dan - we actually did find out that some European styles - Italy I believe - are emphatic about using hyphens for page ranges, so we made that delimiter changeable in CSL, though it defaults to an en-dash. The date-range delimiter for actual dates (rather than dates in titles such as the example by doyledh) has always been configurable in CSL).
  • @ adamsmith

    could you please provide an example of how to change the delimiter in CSL for page ranges? My copy-editor insists (and I have double checked as well) that AMA style requires hyphens for page ranges and not en-dashes. I tried to use the visual CSL editor at http://editor.citationstyles.org/visualEditor/ but I don't see a configurable delimiter for page ranges. I'm sure I'm missing something simple here...
    Or should I not be using the visual editor at all? should I edit the csl file directly?
  • Do you use plain AMA otherwise? AMA 3.11.3 indeed specifies hyphens (god knows why), so I can change that in the style globally.
  • ugh- I wish I used plain AMA all the time. In fact, I use it for about 50% of the things I do, but sometimes specific projects have weird and picky things like "no issue numbers" and so on. I usually start with AMA style in the CSL editor and make changes where needed. If the global style format for AMA is changed, will that cause Zotero to render the en-dashes as hyphens only in "pure" AMA style?
  • If the global style format for AMA is changed, will that cause Zotero to render the en-dashes as hyphens only in "pure" AMA style?
    right, it's on a style-by-style basis. You can change this to hyphen by adding page-range-delimiter="-" to the line starting with < style.... You're correct that the option isn't available in the visual editor.
  • When I do that, I get the error

    Citeproc initialisation exception: TypeError: Cannot call method 'call' of undefined

    I'm sure I've messed up the syntax somehow but I am not familiar with the correct usage. I tried to maintain spacing the same as the other variables. The <stlye> line now looks like this:

    <style page-range-delimiter="-" xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
  • oops sorry, I misremembered where this was set.
    <locale xml:lang="en">
    <terms>
    <term name="page-range-delimiter">-</term>
    </terms>
    </locale>


    right after </info>
  • that did it, thanks!
  • all AMA variants on the repository now use hyphens for page ranges. Four typographers lose their wings...
  • edited March 12, 2022
    @adamsmith

    You wrote "Note that hyphens in page ranges are automatically replaced by en-dashes by Zotero, so no need to change those."

    I am writing in MLA and apparently I NEED Zotero to write a hyphen for page ranges. How can I get Zotero NOT to convert my page ranges to en-dashes in MS words?
  • You'd have to modify the style, but are you sure? MLA uses an en dash, as do most American styles.
    If you want to change it, that's a change in the locale section. You can look at the AMA style as a template
  • Thank you very much for your quick answer. I have just double checked and you are right.

    Here it says "In the MLA Handbook and examples of student writing on The MLA Style Center, hyphens are used in page ranges since hyphens may be easier for students to use. Publishers, however, use en dashes."
    https://style.mla.org/hyphen-or-dash-page-ranges/

    ... so I will use en-dashes.
Sign In or Register to comment.