andras-simonyi / citeproc-org

Renders Org-mode citations in CSL styles using citeproc-el.
GNU General Public License v3.0
68 stars 2 forks source link

Cannot create numeric citations no matter what #5

Closed averter closed 5 years ago

averter commented 5 years ago

Don't know if this is citeproc-org normal behaviour, but I cannot export an org file and get the citations in a numeric format, [1], [2-3] (say). I am using org-ref and tried several numerical CSL styles without any success. Instead, the citations are always of the type Author(s) Year format. As an example I have used these numeric CSL styles:

transactions-on-mathematical-software.csl transactions-on-design-automation-of-electronic-systems.csl transactions-of-the-materials-research-society-of-japan.csl

andras-simonyi commented 5 years ago

Hello, it is definitely not the intended behavior, you should be able to use numeric styles as well. Most probably the processor uses the default Chicago style instead of your intended one. Could you post a minimal example containing your citeproc-org related settings and some references, perhaps with the rendered version?

averter commented 5 years ago

Hi, I agree that it must be using the Chicago style. While doing the MWE I landed on a new problem. If I export the whole org file and not a subtree, I end up get this error OpenDocument export failed: Wrong type argument: listp, "[NO BIBLIOGRAPHY LAYOUT IN CSL STYLE]"

Even if not necessary, the MWE is as follows test.org file

#+CSL_STYLE: transactions-on-mathematical-software.csl
#+BIBLIOGRAPHY: test.bib

Work paradox - we work long hard hours, on jobs we hate, to buy things
we don't need, to impress people we don't like cite:ZHANG20184

bibliographystyle:unsrt
bibliography:test.bib

test.bib file is

@article{ZHANG20184,
title = "A Quasi Quantum Treatment of the spin orbit state changing and conserving rotationally inelastic NO(X)-He collisions",
journal = "Chemical Physics",
volume = "514",
pages = "4 - 19",
year = "2018",
note = "Energy and Entropy of Change: From Elementary Processes to Biology",
issn = "0301-0104",
doi = "https://doi.org/10.1016/j.chemphys.2018.04.002",
url = "http://www.sciencedirect.com/science/article/pii/S0301010417309965",
author = "Xia Zhang and Steven Stolte",
abstract = "A Quasi Quantum Treatment (QQT) of the rotational inelastic NO(X)-He collisions in the pure Hund’s case (a) spin orbit state conserving transitions is extended to the mixed Hund’s case (a) spin orbit state conserving and changing transitions. To enable this extension a polar and azimuthal angle dependent intermolecular hard-shell PES, VS(RS,γR,χR)=ES, has been developed. The DCSs and ICSs calculated by QQT are compared with those obtained from QM exact calculations onto a full R-range ab initio PES. The rotationally inelastic scattering of NO(X) from He presents a paradigm for the rotationally inelastic scattering at a thermal collision energy of molecules residing in a Π electronic rotational eigenstate."
}
andras-simonyi commented 5 years ago

Thanks for the details! I've checked the style you are trying to use and turned out to be one of the so called dependent CSL styles, which are not (yet) supported. These don't contain formatting instructions but are simply links/aliases to independent styles. Concretely, the transactions-on-mathematical-software style is an alias for the independent association-for-computing-machinery style. Could you try using that one and report the results? Also, unfortunately, citeproc-org was not tested at all for the case when only a subtree is exported, so it is a distinct possibility that the settings not in the subtree are ignored -- I'll need to look into this.

averter commented 5 years ago

Thanks @andras-simonyi. With the style you recommended the MWE works perfectly. I can also confirm that when doing it from within a subtree it does not work, and reverts back to the Chicago style. However, that is just a minor detail. Thanks for the help and for creating this great package.