Show first initial rather than first name - is this possible?

Hello, can anyone help answer whether it is possible to amend CSL to show a first initial only, no full stop, then last name. Rather than full first name and last name?
My style is here: https://raw.githubusercontent.com/annie-berry/ofstedhousestyle/main/v1

It seems to be around line 37 but I can't work out if this can be amended.
Thanks in advance
  • (if you have multiple questions about the same style, easier to put them, numbered, in a single post)

    initialize-with="" set on name
  • edited December 11, 2023
    Thank you, so would it look like this, adding it in to line 40?

    39 names variable="author"
    40 initialise-with=""
    41 name and="text" name-as-sort-order="first"/
    42 label form="short" suffix="." prefix=", "/

    Apologies - good to know. I did put them both in a single post last week (though didn't number them) and assumed maybe that was why I had no response, so decided to try them separately
  • 40, yes

    (if you link to the standard view on github rather than the raw one, we can see the line numbers by default)
  • Great, thanks.
    Does this work?
    https://github.com/annie-berry/ofstedhousestyle/blob/main/v1

    I'm sure that hasn't worked previously and I was advised to link to the raw one
  • Yes that works (just to be clear, I answered your question above, though) You want the raw link to provide the style for download, the regular link -- the one you just posted -- for people to look at the code.
  • Yes, thank you - I am just going to try the line 40 amendment.

    Thank you that clarifies the link sharing - I now remember that was why I was advised to share the raw file as that was what I was trying to work around at the time. Sorry for the confusion. Very novice user here!
  • edited December 11, 2023
    I have tried amending line 40 and have a white space error "need whitespace between attributes". Again not sure what to do. I tried adding the '/' which appears in the lines beneath to see if that works but it doesn't. What am I missing for it to work?
  • is it updated on github?
  • Sorry, I hadn't seen that you added code to your exsample above.
    initialize-with (American spelling) goes as an attribute into the name line so

    <name and="text" name-as-sort-order="first" initialize-with=""/>
    Delete the line you added, that's not valid
  • I hadn't even spotted my spelling. I've tried on a journal and a webpage reference and that isn't working, it still shows the full name.
    Should there be a space between the " "?
    Maybe there is a further line interfering elsewhere
  • If you're looking at the footnotes, you also need to add this in contributors-note (l. 71)
  • Awesome - yes it was the footnotes and that has now worked. Thanks again
Sign In or Register to comment.