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

Best practices for spaces and punctuation in prefix, suffix, etc. #50

Open
jkitchin opened this issue Aug 25, 2021 · 0 comments
Open

Best practices for spaces and punctuation in prefix, suffix, etc. #50

jkitchin opened this issue Aug 25, 2021 · 0 comments

Comments

@jkitchin
Copy link

Suppose (using org-cite syntax) I have [cite:See @key on page 1, for example]

I guess this would look like this. My question is, should there be a space in the prefix at the end or should it be trimmed (it doesn't seem to matter, but...), similarly if there is space in the suffix at the beginning, should it be trimmed or not (likewise, it seems like it doesn't matter, in these?

I gather that the label must be trimmed because " page " does not match somewhere, and the p. is lost if there are spaces before or after the label.

#+BEGIN_SRC emacs-lisp :var tangled=(org-babel-tangle)
(let* ((proc (citeproc-create "apa-5th-edition.csl"
			      (citeproc-itemgetter-from-bibtex "test.bib")
			      (citeproc-locale-getter-from-dir ".")
			      "en-US"))
       (cites (list (citeproc-citation-create :cites '(((id . "kitchin-2015-examp-effec")
							(prefix . "See ")
							(suffix . ", for example")
							(locator . "1")
							(label . "page")
							(suppress-author)))
					      :mode 'nil
					      :capitalize-first nil
					      :suppress-affixes nil)))
       (rendered-citations (progn (citeproc-append-citations cites proc)
				  (citeproc-render-citations proc 'plain nil))))
  (car rendered-citations))
#+END_SRC

#+RESULTS:
: (See Kitchin, 2015, p. 1 , for example)

Also , You can see there is an extra space after the locator, and before the , that I put in the suffix. Is that a bug? It disappears if I take out the comma.

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

1 participant