jkitchin / org-ref

org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools to go with it.
GNU General Public License v3.0
1.35k stars 242 forks source link

page numbers ignored #1107

Open jonascant opened 5 months ago

jonascant commented 5 months ago

I am using org-ref 3.0 in emacs 30, with org-mode 9.6.15 in my org file i have something like [[cite:&kimChangjakGugakMusic2018][p10]]. The entry exists in my library.bib

When exporting to latex, the page number gets removed/ignored.

my org headers:

+LATEX_HEADER: \usepackage[ngerman]{babel}

+LATEX_HEADER: \usepackage[style=apa]{biblatex}

+LATEX_HEADER: \addbibresource{/home/jonas/Dokumente/zotero/library.bib}

+LATEX_HEADER: \addbibresource{/home/jonas/Dokumente/library/main.bib}

+LATEX_CLASS: article

jkitchin commented 5 months ago

The syntax is probably [[citep:&kimChangjakGugakMusic2018 p10]]. You have to use a cite command that supports pages, and \cite usually does not I think. citep or citet does.

jonascant commented 5 months ago

this also does not work. This is the result, taken from the log:

l.50 \citet [p20]{kimChangjakGugakMusic2018} ! Undefined control sequence. l.51 \citep [p20]{kimChangjakGugakMusic2018}

In my org file, i have [[citet:&kimChangjakGugakMusic2018 p20]] and [[citep:&kimChangjakGugakMusic2018 p20]] Even if it works, it is not convenient, to use the C-c C-l keybinding for the citing and then having to add the page number after the fact. Is it uncommon to use page numbers? I am not very experienced in scientific writing, and i find no documentation about page numbers in org-ref online. Thanks!

jkitchin commented 5 months ago

That means you have to add a package like natbib in your orgfile.

#+latex_header: \usepackage{natbib}

It is not that common in my writing to use page numbers, and there is hardly a reason IMO to put them in the citation. This works just as well:

See [[cite:&kimChangjakGugakMusic2018]] p10.