[Solved] Keeping (author, date) and author (date) format in one document

Hi everyone,

I couldn't find a sensible way to google for this question, so I just ask it here (i.e. forgive me for a possible repost).

I would like a document to keep both formattings, the '(author, date)' as well as the 'author (date)' format. Sometimes I write things like 'As we can see in author(date), this is...' while in the same document ending sentences just with an (author, date) to reference statements. However, unless I missed something, Zotero only offers one of the two (in my case '(author, date)' since I am using APA style) and I have to change it manually and keep rearranging it manually every time I update the document.

Is there a way around that? Maybe let Zotero know not to update that formatting? Or changing styles for one field but not for others?

Thanks for any answer.
  • The way to do this is to use the "suppress author" function in the Word/LO plugin:
    http://www.zotero.org/support/word_processor_plugin_usage#suppress_authorsusing_authors_in_the_text
    and type the author(s) manually in the text.
    (Note that for APA, multiple authors _in_ parentheses should have ampersands (&) as Zotero's APA style does, authors outside of parentheses should have the word "and").
  • Thanks, that's exactly what I needed. :-D
  • Hello,

    I am only now starting to see the point about the issue with a latex \citet equivalent, given that within the same document, to comply with the guidelines, you would require a \citep equivalent as well (as highlighted in the first comment).

    My question is whether it is trivial to modify any given style sheet such that your citations everywhere in the document are displayed as \citet equivalents, i.e. a field

    Author (date), or Author et al. (date)

    I'd be happy to introduce all other parentheses manually in my text editor, even if this produces some stylistic misfits such as double closing parentheses or 'incorrect' style of multiple citations when not using the specific feature to do so in the plugin, e.g.

    ... end of sentence (Author (date))
    ... end of sentence (Author1 (date1), Author1 (date2), Author3 (date3))

    I see how you should proceed, with the 'Suppress Author' checkbox, and would do so, if I were to start a new piece, but I have just finished a long document written in the expectation that I could easily replace all '(Author date)' fields by 'Author (date)' fields, and adapting all references a posteriori seems like an incredibly unfruitful task.

    Many thanks in advance
  • relatively trivial, yes.
    Take APA - the current citation section is
    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=", ">
    <text macro="author-short"/>
    <text macro="issued-year"/>
    <text macro="citation-locator"/>
    </group>
    </layout>

    You would change this to

    <layout delimiter="; ">
    <text macro="author-short"/>
    <group delimiter=", " prefix=" (" suffix=")">
    <text macro="issued-year"/>
    <text macro="citation-locator"/>
    </group>
    </layout>

    see here for general instructions
    http://www.zotero.org/support/dev/citation_styles/style_editing_step-by-step
    Note that you cannot just copy the modified code into other styles - the logic is very similar for every author-date style, but you'll have to individually adjust the style you're using.
  • Exactly what I needed!

    I applied it to the Chicago manual of style.

    Thanks a lot again.
  • Why is this marked "solved"?

    This -- "type the author(s) manually in the text." -- is not a solution.
  • please don't double post.
    And the [solved] was added by the original poster, for whom this solved the issue. It's nothing anyone from Zotero ever adds to a thread.
  • edited September 24, 2017
    I am using the Chicago style, and I edited the style code. Originally it has these lines:


    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=", ">
    <choose>
    <if variable="issued accessed" match="any">
    <group delimiter=" ">
    <text macro="contributors-short"/>
    <text macro="date-in-text"/>
    </group>
    </if>


    Then I just changed where the brackets go, and now the codes look like this


    <layout delimiter="; ">
    <group delimiter=", ">
    <choose>
    <if variable="issued accessed" match="any">
    <group delimiter=" ">
    <text macro="contributors-short"/>
    <text prefix="(" suffix=")" macro="date-in-text"/>
    </group>
    </if>


    This gives me the correct format of single citation, e.g. Smith (2000), instead of (Smith 2000).

  • @hdongdc, you need to put XML code between <code> and </code> tags to display correctly on these forums. (e.g. <code><text macro="author-short"/></code> produces <text macro="author-short"/>)
  • @Rintze Thank you! I have just added the tags.
  • @hdongdc, It works! I also changed the cite code. Thanks alot!!
Sign In or Register to comment.