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

"id." isn't capitalized when first word in citation sentence #230

Open
dmshapiro opened this issue Sep 26, 2023 · 5 comments
Open

"id." isn't capitalized when first word in citation sentence #230

dmshapiro opened this issue Sep 26, 2023 · 5 comments

Comments

@dmshapiro
Copy link

I'm not certain I've put this in the right place, but I think I have based on this Zotero forums post. When a citation has position="ibid.", but the "ibid." term has been changed to something else (such as "id." for the JM Indigo Book style), "id." does not correctly change to "Id." when it is the first word in a citation sentence. For example, "The court held that . X v. Y, 1 U.S. 2 (3456). The court further held that. Id." would be the correct Indigo/Bluebook formatting, but currently, the last "I" is lowercase. Is there a way for this to be fixed so users don't manually have to go back and fix this when finalizing a document? If I've placed this in the wrong place please let me know.

@larsgw
Copy link
Collaborator

larsgw commented Sep 27, 2023

It looks like the difference comes from the class of the style. For class="note" (such as in JM Indigo Book Law Review), the terms are capitalized. It looks like the capitalization depends on the context:

[...] the short form Id. (capitalized in a citation sentence after a text sentence) or id. (uncapitalized within a sentence as citation clause) [...]
R6.2.2

I am not sure how to give that context to citeproc-js, let alone from Juris-M/Zotero. You could try to change the class of JM Indigo Book, but I do not know what other consequences that would have.

(This is the relevant part of the code, by the way:)

// capitalize the first letter of a term, if it is the
// first thing rendered in a citation (or if it is
// being rendered immediately after terminal punctuation,
// I guess, actually).
if (!state.tmp.term_predecessor && !(state.opt["class"] === "in-text" && state.tmp.area === "citation")) {
myterm = CSL.Output.Formatters["capitalize-first"](state, term);
//CSL.debug("Capitalize");
} else {
myterm = term;
}

@dmshapiro
Copy link
Author

dmshapiro commented Sep 27, 2023 via email

@dmshapiro
Copy link
Author

dmshapiro commented Sep 27, 2023 via email

@fbennett
Copy link
Contributor

I looked hard at this when building citrproc-js. Unfortunately Zotero provides no hint of the context of a citation embedded in the main text of a word processor. Not great news, I know, but this can't be supported. That's probably the ultimate word, although I would love to be proven wrong: extending Zotero to provide such a hint would be extremely hard, give the complexity of the internal representation of word processor text and the variety of systems that would need to be covered (MS Word, Mac Word, LibreOffice, Google Docs, maybe others in the future).

@dmshapiro
Copy link
Author

dmshapiro commented Sep 27, 2023 via email

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

No branches or pull requests

3 participants