Abbreviated month in citation style within notes ("janvier" = "jan.", etc.)

Hello everyone,
I created a custom citation style and had it corrected and validated thanks to the help of participants of this forum :
Nevertheless, I see that one thing is still missing for this style to fit the citation standards of my research group: in the notes (but not in the bibliography), the month should appear abbreviated. ex. janvier = jan., février = fév., mars = mars, avril = avr. mai = mai, juin = juin, juillet = juil., août = août, septembre = sept., octobre = oct., novembre = nov., décembre = déc.). In fact, for every name longer than 4 letters, we should have the three first letter + “.”
Does someone have an idea on how to do it?
Kind regards
  • These are the default French abbreviations:
    <term name="month-01" form="short">janv.</term>
    <term name="month-02" form="short">févr.</term>
    <term name="month-03" form="short">mars</term>
    <term name="month-04" form="short">avr.</term>
    <term name="month-05" form="short">mai</term>
    <term name="month-06" form="short">juin</term>
    <term name="month-07" form="short">juill.</term>
    <term name="month-08" form="short">août</term>
    <term name="month-09" form="short">sept.</term>
    <term name="month-10" form="short">oct.</term>
    <term name="month-11" form="short">nov.</term>
    <term name="month-12" form="short">déc.</term>

    Anything that needs to be different you need to redefine in the terms section of the style (where you now define the editors). To call for the abbreviated version of months, include form="short" in the date-part name="month" element
  • thank you so much! I didn't suspect it was so easy. But I have one more challenge. Indeed, if there is no day number, the first letter of the month should be capitalized, but it should not if there is a day. eg.
    24 jan. 1995
    Jan. 1995
    I tried the following:
    <date variable="issued">
    <if variable="day" match="none">
    <date-part name="month" form="short" suffix=", " text-case="capitalize-first"/>
    <date-part name="year"/>
    <date-part name="day" suffix=" "/>
    <date-part name="month" form="short" suffix=" "/>
    <date-part name="year"/>
    But it seems that it doesn't recognize when I have a day and I always get the <else> case. I guess the error is in variable="day"... has someone got an idea? Thanks in advance
  • I can't test this right now, but try adding sentence case to the entire date term, i.e.
    <date variable"issued" text-case="sentence">
    might not work, though.

    I don't think you can test for day the way you try - "day" is not a variable". (If you could, though, you'd still be missing <choose> .... </choose> around the conditionals.)
  • I tried <date variable"issued" text-case="sentence">, and <date variable"issued" text-case="capitalize-first">, but it doesn't work. sorry.
  • Yes, we don't yet have a means of testing for the presence/absence of the day element in a date.
  • OK. By any chance, would there be a way to "capitalize first" at the "issued" level, as adamsmith was suggesting? So it would put a capital letter to the first letter of the group (meaning it is a month) or it wouldn't change a thing if it is a number (eg. "Jan.1995" => "j" is capitalized, and "24 jan. 1995"=>"2" is capitalized). If not, nevermind, I will procede manually. Thanks again for your help.
  • Not currently.
  • There is a ticket for this in the CSL schema tracker.
  • Hello and thank you for your input. From what you wrote in the linked page, I understand how to modify the locale part, but I don't understand how I should modify my issued-note macro to take it into account... Could you develop a little bit what you mean with:

    Then in the body of the style, you would just use dates as per current specification:
    <date variable="issued" form="text"/>

    Thanks in advance
  • edited June 20, 2011
    The link is to a development ticket. Nothing in the discussion has been implemented yet; we're still trying to figure out a graceful way to address this use case. But you can see that we're actually thinking about it and working on it. :)

    (Edit: To answer your question, CSL 1.0 has localized date forms, so a date can be included with a single line of code. The idea in the locale-based approach -- just one of several options being tossed around -- is to embed the conditionality in the date definition set in the locale. No other changes would be required, so long as dates were written in macros etc in the one-line (strictly speaking single-node) form.
  • Oh, sorry I didn't get the difference between the forum and development ticket. Thanks to all you developpers for such reactivity.
Sign In or Register to comment.