Harvard AuthorDate citations and Word AddIn
There are 2 citation styles in the Harvards style: (Author Date) and Author (Date). For example:
Work by Bloggs (2009) states that...
and
There has been a lot of work defining blogging (Bloggs 2009).
I need to mix these styles in a single document but can find no way of doing so other than deciding on one style then "manually" editing to the alternative style where relevant. The Word AddIn has only one button for inserting a citation so only one style can be used from it. The editor allows the author to be suppressed but that's no use in this case. I even thought of creating 2 style "variants" but the application of styles is on a per document basis not per citation inserted. Or even changing the Word AddIn to have 2 citation insert buttons and "fiddling" the text for the citation to the alternative form (but I couldn't find where the text was being returned in the time I had available to look at the AddIn code)
I can't find anyone else referring to this problem so either I've missed something obvious or I've not searched well enough or perhaps someone can help!!
Work by Bloggs (2009) states that...
and
There has been a lot of work defining blogging (Bloggs 2009).
I need to mix these styles in a single document but can find no way of doing so other than deciding on one style then "manually" editing to the alternative style where relevant. The Word AddIn has only one button for inserting a citation so only one style can be used from it. The editor allows the author to be suppressed but that's no use in this case. I even thought of creating 2 style "variants" but the application of styles is on a per document basis not per citation inserted. Or even changing the Word AddIn to have 2 citation insert buttons and "fiddling" the text for the citation to the alternative form (but I couldn't find where the text was being returned in the time I had available to look at the AddIn code)
I can't find anyone else referring to this problem so either I've missed something obvious or I've not searched well enough or perhaps someone can help!!
All I end up with if the author is suppressed is, in the case I quoted, (2009) i.e Work by (2009) states that... Surely then I would have to manually insert the author, in this case Bloggs to form the citation Bloggs (2009). As I said initially, perhaps I am being really stupid and missing the obvious (especially as I did see a post that said suppressing the author solved this problem). Can you explain in detail?
I.e. if your sentence doesn't make sense without the name of the author, you should type said name of the author and not have Zotero insert it.
There are a number of reasons for that, the most intuitive being that Zotero prides itself on being able to switch seamlessly between author-date and footnoted styles.
Now, if in your example above, the citation would be "Bloggs (2009)" and you were to convert that into a footnoted style you'd get "Work by (23) states that..." - clearly undesirable.
There is somewhere in the depth of the forum a lengthy discussion on if Zotero should follow bibtex in allowing for two different citation modes along the lines of what you suggest, but the added benefit of that seems minimal and the added complications (and likely limitations) vast. Certainly two citation styles in a document sound like a big mess, both in terms of the formatting and in terms of the dialogue needed to create them.
So, in short, you're stuck with typing your authors. That's what "solved" this for other people, too.
However my real scenario is it's my wife doing her university assignments and she wants to alternate citation styles. I'm just the IT man! To her Zotero is the means to an end (and a very good one in general)...how it works and the more esoteric concepts don't matter to her - she just wants it to do what she wants and my (tweaked for her assignments) get the exact style of Harvard referencing she needs!!
So, if I haven't missed anything obvious, it looks like I may be able to examine the Word .dot template and intercept the formation of the citation before it gets inserted and offer her a dialog box with the 2 options she needs. That's all I can think of doing to solve her problem - she'll never need to switch "fundamental" styles at least while on her present course.
I mean, obviously do what you want - but as a fellow academic (almost everyone here is) I can pretty much guarantee you that your wife does not want to use untested hacks (regardless of how good of a programmer you are) for any assignment, thesis, book etc.
One thing goes wrong, and she'll end up having to redo every citation in the document (e.g. how would you deal with refreshing references). These things tend to backfire at the worst possible moments. Trust me (and many others). I've seen it many times.
So I'd suggest you tell her that while you might be able to make things work like she wants to, the friendly folks at the Zotero forum strongly, strongly warned against doing that and suggested that instead she just slightly adapt her workflow to save both her and your time.
Having to type in the Author part of the citation is definitely the worst option - unfamiliar names, et al etc all have to be typed. If a suppress date option were available at least only a few keystrokes are required to add the date! It rather defeats one of the main reasons for using Zotero (no, I'm NOT knocking it as it has MANY other great qualities).
While "poking about" looking at the field codes generated by the citation editor (for Word) I've come across another problem. If the editor is used to generate a different format from the standard citation then the field that results is not updated when the relevant Zotero button in Word is clicked. In fact the resultant field is rather odd. I've given an example below:
Not edited resultant text and field code:
(Andersson and Bergman 1980)
ADDIN ZOTERO_ITEM {"citationItems":[{"itemID":5844}]}
Edited resultant text (moving first "(" to just before the date):
Andersson and Bergman (1980)
ADDIN ZOTERO_ITEM {"custom":"Andersson and Bergman (1980)","citationItems":[{"itemID":5844}]}
So this means that if the unknowing user edits the citation in the editor then they get a non-updatable citation - not the best behaviour!
Documentation on the ADDIN field code is almost non-existent (I can only find one explanation on the Web) so I don't know why this was chosen in preference to some other field code - even the author of the Word Zotero VBA code has some comments about its quirkyness in the code.
As a "footnote" to this post, Word's "F9" key doesn't update any citations - this is probably a good thing and is almost certainly a result of using ADDIN as it seems to have "properties" that make it locked against "F9" refreshing.
When I have more time I promise I will read the discussion in the link more thoroughly!!
Now you may say - "well, the edits could remain, just the citation would update" - but once you start thinking about that that's entirely unfeasible: While "orderly" edits - i.e. prefix and suffix - do indeed update, how would you deal with, say, a deleted colon between date and title as you switch between APA and Chicago Manual of Style? And that's essentially true for all the edits that require the editor - there would be no way to refresh those in a useful way, so the best default is to leave edited citations as they are.
Edit: In your critique of the "suppress author" option, you fail to note the - imho crucial - argument that words (in this case author names) that are part of the text should remain part of the text and not be dealt with by your bibliographic software. This both for practical (style switching) and systematic reasons.
In many ways, anything that _doesn't_ involve changing the content of the fields doesn't require use of the editor, but can and should be taken care of at the level of the style.
Using the editor function should be a last, last resort for exactly that reason.
As for "formatting" - that's a lot more complex that you make it out to be. For example, we've had one discussion where someone pointed out that a (foreign language) citation style required a period between title and subtitle, even if the original had a colon. Now - if someone changes that colon to a period in the editor, you would not want refreshing to revert that, right? But there is a technically indistinguishable situation, where someone may correct punctuation in a title in the database and then _would_ want refreshing to take account of that. Point being - there is no clean solution to this.
Maybe that needs to be better documented (though I don't think I've seen a single question on the forum that was based on a mis- or lack of understanding of this).
My second point however, comes from the viewpoint that Zotero is essentially a database coupled with a presentation manager. In the database are fields of information. As a user all I would like to do is to be able to present those field values in a format of my choice and that might include alternative formats. Your example of a period or colon between what are essentially field values is something that a change of style should solve. Further, if a particular field always/frequently had a colon in it and a period was what was wanted the facility to manipulate the field value before presentation could be solved by a style applied to the field. This is a normal facility when creating reports from databases. If Zotero was never designed with this kind of flexibility then my recommendation would be that its design should be extended to incorporate this.
That said, we'll continue using Zotero - I believe that the effort put in by its creators should be applauded but it shouldn't stop users from requesting what they need however technically difficult it is to achieve this so long at it is possible (and I believe it is possible).
All I'm trying to do is to highlight why particular design choices in Zotero have been made the way they are.
Which I would hope can both lead to you making custom-changes in a more informed way and seeing the types of issues that any suggestions for changes in the main Zotero code that you may have would have to grapple with in order to convince people.
While I don't speak in any capacity for the developers, I think I have some ideas of why these design choices were made. As you will discover, Zotero in general does not encourage customization. You can, for example, not create custom item types, nor add custom fields to items. (Though some of that may change as a result of the NSF collaboration). As I understand it, this is on purpose.
The biggest concern is the sharing of documents and data. With the examples above, as people add custom fields to items, sharing them gets a lot more complicated.
With respect to your specific concern, when you have to people co-authoring in Zotero and one uses suppress author while the other uses two citation styles... not sure if this could be solved, but it certainly sounds messy.
The second concern is simplicity and usability. Right now, you can change the citation style of a document with one click. When the document contains several styles, you need to change each one individually and then things might not work well depending on the nature of the styles... doesn't sound great either. So essentially implementing such features would load up (overload?) the plugin and decrease the general ease of usage.
I'm aware that this is a trade-off. But my point is that while allowing users to customize things as they like may sound like an unambiguously good idea at first, it has substantial costs in terms of interface and interoperability. And I'd much rather have a few grumpy users that than a deteriorating product. As such, I think any such case needs a _really_ good reason to be implemented.
What constitutes a good reason is obviously a judgment call. I think the specific usage example you point to doesn't warrant substantial changes - it warrants convincing end-users to slightly change their behavior (afaik they most likely wouldn't even have to _change_ behavior, because the only bibl. software that offers a solution here is bibtex, and I'd assume that LaTeX users are familiar and comfortable with the idea of software imposed constraints).
(Incidentally, there is a imho more compelling usage case, as some styles in the sciences require different citation styles for figure and graph labels. Still, these are rather rare and the question of trade-offs remains).
Now, obviously people may disagree with the approach taken by Zotero on these questions (and people do!), but I don't think you're likely to change developers' minds about the fundamental approach.
Edit: wow that turned out long. See it as more general Sunday afternoon ruminations on "The Zotero approach to bibliographic management" ;-).
As for allowing multiple citation styles and multiple bibliography styles in a single document, that's unlikely to feature in CSL or Zotero in the foreseeable future.
When producing citations, the CSL processor doesn't output literal field content, it composes the data according to the citation context. In the next version of the processor, factors will include available backreferences, backreference proximity, other cited authors with the same surname, and the presence of other cites to different sources elsewhere in the document that have the same string representation according to the formatting rules in force. Both the citation form as a whole, and the inclusion and composition of names can be affected by small changes in context.
The processor maintains internal state tables for the document which it references in order to make these choices. If multiple citation styles are allowed in the document, separate tables would need to be maintained (which is certainly doable), and a very large number of questions would need to be answered concerning the proper interaction between the state tables of separate styles (which is not).
It's more a matter of the complexity implicit in your suggestion than of an arbitrary design barrier in CSL or Zotero. That, plus the fact that there just does not appear to be a pressing requirement for arbitrary mixing of bibliography styles out in the field.
I have now had time to look at what's going on in the Word addin and have done enough "hacking" to convince myself that I can provide a solution which will work for my client (wife!) in her specific circumstances by changing the Addin code.
I still have to confirm that Word persists the relevant information into its document but, provided that it does, the problem seems to be solved,
So, I still have some way to go to prove the concept and to implement it. Should I be succesful in this (awful hacking) I'd be happy to collaborate with anyone else who has this specific problem.
If anyone wants further details I'm happy to provide them.
but this issue is driving my nuts, so if there were a VBA solution to add Author (Date) citations I would very much appreciate if you or someone shared a solution.
I somewhat understand the concerns, but then, e.g., in Lyx it works perfectly and I don't see exactly why in Word it should be different.
More importantly, I have a 100 page test or so with standard citations and it would take loooon to convert them all by hand and for the future an easy way to insert "Standard" Harvard citations would be awesome!!!
The logic needed to support such references is embedded in the citeproc-js citation processor, and the Zotero plugin code for Word is available. If anyone wants to take a crack at the necessary modifications, I'll be happy to make adjustments to the processor API to help get it working. But I think the core developers (understandably) have other priorities.