Regex (or: how to cut a string from a particular field)

I've been trying to rewrite the ACM SIGCHI citation style to match the *real* practice of CHI reference formatting (i.e., short conference names). However, for particular reasons I don't want to simply replace all conference names in Zotero with short names (submissions without page limit such as proposals or theses).

What I did before, for LaTeX, was to add the shortname as part of the conference series, so my entry in Zotero would look like this: "Proc. CHI 2014: Proceedings of the SIGCHI Conference on Human Factors in Computing Systems".

I would prefix this with "In ", and either strip the part after the colon (for conference submissions) or strip the part before the colon (although it could even be potentially left in, as the long version of CHI doesn't even give away the way more popular abbreviation that people are more familiar with).

=> How can I achieve this for the XML file? I tried to change the ACM SIGCHI .csl template, but have no clue how to do regex in XML; I didn't find anything using forum search and regex+xml search on Stackoverflow kinda only gave me results that weren't really helpful.

Would be grateful for any hint! Thanks!
  • Okay, as a way out I could use the field "series", which is already pre-filled by ACM with "CHI '14" (or "CHI EA '14") - but it doesn't work, for some strange reason; when I try to change the macro to use the field "series" it just doesn't do anything.

    Any help?
  • we'd have to see the adjusted Macro. (As to the original question, you can't do regex replace in CSL styles).
  • Well, there's basically no adjustment yet because it doesn't work ;-)

    All I'm trying to do is to change this style sheet:
    http://www.zotero.org/styles/acm-sigchi-proceedings/dev

    For example, in line 73 from "container-title" to "series". It seems that the value of the "series" field isn't even transferred to the macro - other fields such as publisher show up, but series doesn't, no matter where I try to include it.
  • Woah, sweet! It works!

    That's all I need to know. I'll tweak that a bit and post a final, 100% CHI-compatible and up-to-date style later tonight. Know a few mailing lists who'll be happy about this...

    Thank you!

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.