citation-style-language / styles

Official repository for Citation Style Language (CSL) citation styles.
https://citationstyles.org/
3.3k stars 3.77k forks source link

SBL page number #3795

Closed rudolfbyker closed 5 years ago

rudolfbyker commented 5 years ago

It should be possible to include a specific page number in the SBL "bibliography". For example, on p.46 of the SBL handbook:

img_1535

Currently the page number only appears in "citation".

stale[bot] commented 5 years ago

This issue hasn't seen any activity in the past 30 days. It will be automatically closed if no further activity occurs in the next two weeks.

adam3smith commented 5 years ago

This is a misunderstanding: All the examples with individual page numbers are not for the bibliography, but only for notes, and those can be specified via your reference managers word processor integration.

rudolfbyker commented 5 years ago

OK, what do you mean by "notes"? I'm not using this through a reference manager. I'm writing an app using a PHP implementation of CiteProc.

adam3smith commented 5 years ago

Notes is what you put in a footnote in SBL style. Page numbers for individual citations can be added to those notes using the locator variable in CSL styles (and they are included in the SBL style). In your app, you'd need to find a way to allow for authors to specify these and pass them on to the citeproc. I would recommend looking at some of the existing reference managers and their word integration

rudolfbyker commented 5 years ago

Thanks for the tip. I was not aware of the locator variable. I'll try it soon.

On Wed, 15 May 2019 at 19:47, Sebastian Karcher notifications@github.com wrote:

Notes is what you put in a footnote in SBL style. Page numbers for individual citations can be added to those notes using the locator variable in CSL styles (and they are included in the SBL style). In your app, you'd need to find a way to allow for authors to specify these and pass them on to the citeproc. I would recommend looking at some of the existing reference managers and their word integration

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/citation-style-language/styles/issues/3795?email_source=notifications&email_token=ACMPS7RCS25EMHRT4EEIYLDPVRED3A5CNFSM4GFU4OZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVPNSCA#issuecomment-492755208, or mute the thread https://github.com/notifications/unsubscribe-auth/ACMPS7VIQBJSKWDMOAZZELTPVRED3ANCNFSM4GFU4OZA .

rudolfbyker commented 4 years ago

I read the entire CSL 1.0.1 Specification, and it says very little about locators and how to use them. I still did not manage to get them working.

As I already said, I'm using PHP CiteProc. Looking at their examples, they only use "page", and never "locator". See https://github.com/seboettg/citeproc-php/tree/master/example

Their example is for a journal article, using elsevier style:

  {
    "DOI": "10.1016/j.jhydrol.2008.05.025",
    "ISSN": "0022-1694",
    "author": [
      {
        "family": "Cole",
        "given": "Steven J.",
        "id": "steven.j"
      },
      {
        "family": "Moore",
        "given": "Robert",
        "id": "moore.r"
      }
    ],
    "container-title": "Journal of Hydrology",
    "id": "ITEM-3",
    "issue": "3-4",
    "issued": {
      "date-parts": [
        [
          2008
        ]
      ]
    },
    "page": "159-181",
    "title": "Hydrological modelling using raingauge- and radar-based estimators of areal rainfall",
    "type": "article-journal",
    "url": "http://www.sciencedirect.com/science/article/pii/S0022169408002394",
    "volume": "358"
  }

Using the following code ...

$dataString = file_get_contents("data.json");
$style = StyleSheet::loadStyleSheet("elsevier-vancouver");
$citeProc = new CiteProc($style, "en-US");
$data = json_decode($dataString);
$bibliography = $citeProc->render($data, "bibliography");

... results in this:

Cole SJ, Moore R. Hydrological modelling using raingauge- and radar-based estimators of areal rainfall. Journal of Hydrology 2008;358:159-81. https://doi.org/10.1016/j.jhydrol.2008.05.025.

Page numbers 159-81 are there as expected.

Changing from elsevier-vancouver to society-of-biblical-literature-fullnote-bibliography results in this:

Cole, Steven J., and Robert Moore. “Hydrological Modelling Using Raingauge- and Radar-Based Estimators of Areal Rainfall”. Journal of Hydrology 358.3-4 (2008): 159-81.

The page numbers are still there as expected.

If I now change the type to "book", which is what my users will use most of the time, the page number disappears:

Cole, Steven J., and Robert Moore. Hydrological Modelling Using Raingauge- and Radar-Based Estimators of Areal Rainfall. Journal of Hydrology. Vol. 358, 2008.

Using "locator" instead of "page" also does nothing.

rudolfbyker commented 4 years ago

To be clear, the same happens with

$bibliography = $citeProc->render($data, "citation");

Since CiteProc only has options for "citation" and "bibliography", while SBL speaks of "notes" and "bibliography", I'm assuming "citation" === "notes".

adam3smith commented 4 years ago

Right, so locators are only relevant for "citation" you'd only see them working there. How (and whether) citeproc-php expects to receive locator information is a question for that project -- it's not something that the CSL specifications prescribe, so you'd want to ask there.