Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-@citkey syntax encloses citations in extended footnotes in parentheses #10173

Open
dstark opened this issue Sep 11, 2024 · 9 comments
Open

-@citkey syntax encloses citations in extended footnotes in parentheses #10173

dstark opened this issue Sep 11, 2024 · 9 comments
Labels

Comments

@dstark
Copy link

dstark commented Sep 11, 2024

Explain the problem.
When using [-@citekey] or [-@citekey locator] in a footnote style, Pandoc properly omits the author name and renders the balance of the citation. However, when footnotes include multiple citations, perhaps with other discussion as well, Pandoc adds parentheses around the whole citation, while still omitting the author's name. Per common conventions (e.g., Chicago), these outside parentheses shouldn't be included in this scenario.

For more discussion, see this issue and this discussion on a prior commit intended to address this behavior.

If I can provide any further details, please feel free to ask. Thanks so much for your help with this issue!

Pandoc version?
Pandoc 3.4, Windows 10 and 11

@dstark dstark added the bug label Sep 11, 2024
@jgm
Copy link
Owner

jgm commented Sep 12, 2024

Can you give a small example with everything needed to reproduce this?

@dstark
Copy link
Author

dstark commented Sep 18, 2024

Can you give a small example with everything needed to reproduce this?

Sure. I think the example below should do the trick. If you need anything further, please feel free to ask. Thanks so much!

---
csl: https://www.zotero.org/styles/chicago-fullnote-bibliography
title: Test Document
---

<!-- Here's the JSON for the sample citation:

[
  {"id":"Thiseltonhermeneuticsdoctrine2007","author":[{"family":"Thiselton","given":"Anthony C."}],"citation-key":"Thiseltonhermeneuticsdoctrine2007","event-place":"Grand Rapids","ISBN":"978-0-8028-7422-1","issued":{"date-parts":[["2007"]]},"publisher":"Eerdmans","publisher-place":"Grand Rapids","source":"Open WorldCat","title":"The hermeneutics of doctrine","title-short":"Hermeneutics of doctrine","type":"book"}
]

-->

This is a test document.^[This is a test citation that mentions Anthony Thiselton and tries to create a citation that omits his name. -@Thiseltonhermeneuticsdoctrine2007. Here's another sentence that mentions Thiselton with a locator. -@Thiseltonhermeneuticsdoctrine2007 [p. 39]. In both cases, parentheses are added, contrary to the style's preference. This footnote, however, follows up with another sentence citing the same author where his name isn't mentioned but included in the citation. @Thiseltonhermeneuticsdoctrine2007]

image

@jgm
Copy link
Owner

jgm commented Sep 19, 2024

OK, I see the issue. We have

           , Cite
                [ Citation
                    { citationId = "Thiseltonhermeneuticsdoctrine2007"
                    , citationPrefix = []
                    , citationSuffix = []
                    , citationMode = SuppressAuthor
                    , citationNoteNum = 1
                    , citationHash = 0
                    }
                ]
                [ Space
                , Str "("
                , Emph
                    [ Str "The"
                    , Space
                    , Str "Hermeneutics"
                    , Space
                    , Str "of"
                    , Space
                    , Str "Doctrine"
                    ]

and because citation mode is SuppressAuthor, not AuthorInText, the parentheses are added. Note that both the [-@foo] and the -@foo form will be parsed as SuppressAuthor, so they can't be distinguished.

@jgm
Copy link
Owner

jgm commented Sep 19, 2024

We also can't modify the Markdown reader to treat -@foo as AuthorInText, because then citeproc will add the author instead of suppressing it.

So I don't really see a good solution at the moment. Long term, we could maybe consider adding something like SuppressAuthorInText, though that is inelegant.

@dstark
Copy link
Author

dstark commented Sep 19, 2024

We also can't modify the Markdown reader to treat -@foo as AuthorInText, because then citeproc will add the author instead of suppressing it.

So I don't really see a good solution at the moment. Long term, we could maybe consider adding something like SuppressAuthorInText, though that is inelegant.

Got it. Just as a thought—Is the lack of added parentheses perhaps something that could be triggered by reading from the CSL for whenever it has <category citation-format="note"/>?

@jgm
Copy link
Owner

jgm commented Sep 20, 2024

The parentheses are added only when you're using a note style. (Because in a note style, citations turn into notes, and we need to avoid having notes inside other notes...)

@dstark
Copy link
Author

dstark commented Sep 25, 2024

Because in a note style, citations turn into notes, and we need to avoid having notes inside other notes...

Duly noted and appreciated. :-) Would syntax like [-]@foo be worth considering, perhaps not unlike the use of square brackets to associate locators with citations in this context (e.g., the [p. 39] in the example above)?

@jgm
Copy link
Owner

jgm commented Sep 25, 2024

It's not a question of syntax. We'd need some deeper underlying changes in the types.

@dstark
Copy link
Author

dstark commented Sep 25, 2024

It's not a question of syntax. We'd need some deeper underlying changes in the types.

Got it. Thanks so much for giving it some thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants