0

I am trying to cite an online journal which does not have a volume number:

 @article{Meusy2002,
 url = {https://doi.org/10.4000/1895.219},
 title = {Lorsque l’orgue s’invita au cinéma},
 author = {Jean-Jacques Meusy},
 journal = {1895. Mille huit cent quatre-vingt-quinze},
 number = {38},
 year = {2002},
 }

Per the style guide I need to follow, this should come out as:

Meusy, Jean-Jacques, 2002, « Lorsque l’orgue s’invita au cinéma », 1895. Mille huit cent quatre-vingt-quinze, no. 38, https://doi.org/10.4000/1895.219.

I have been able to achieve this using the simple solution provided here. However, the style guide I must follow requires that entries which do have a volume number prefix it with "vol." (both volume and number prefixes are defined in a custom .bst file, respectively, using

FUNCTION {bbl.volume}
{ "vol." }

and an equivalent for bbl.nr) ; so, hypothetical example:

Meusy, Jean-Jacques, 2002, « Lorsque l’orgue s’invita au cinéma », 1895. Mille huit cent quatre-vingt-quinze, vol. 1, no. 38, https://doi.org/10.4000/1895.219.

Taking the solution I linked to, this does not appear to work, as the output I get in such a hypothetical case is:

Meusy, Jean-Jacques, 2002, « Lorsque l’orgue s’invita au cinéma », 1895. Mille huit cent quatre-vingt-quinze, 1, no. 38, https://doi.org/10.4000/1895.219.

I've tried various adaptations/combinations of the linked solution with the default makebst code, but so far my best solution is

FUNCTION {format.vol.num.pages}
{ volume field.or.null
  duplicate$ empty$ 'skip$
    {
      bbl.volume swap$ tie.or.space.prefix
      "volume" bibinfo.check
      * *
    }
  if$
  number empty$
    'skip$
    { bbl.nr * number * }
  if$
}

Which gets me very nearly there; but I'm not able to figure out how to add the required comma and space between the two elements:

Meusy, Jean-Jacques, 2002, « Lorsque l’orgue s’invita au cinéma », 1895. Mille huit cent quatre-vingt-quinze, vol. 1no. 38, https://doi.org/10.4000/1895.219.

Thanks!

1 Answer 1

0

Found it! (works with all four possible variants: both volume and number present; only volume; only number; and of course if both absent)

In case anybody comes on something like this; the solution to fixing my issue is simple:

FUNCTION {format.vol.num.pages}
{ volume field.or.null
  duplicate$ empty$ 'skip$
    {
      bbl.volume swap$ tie.or.space.prefix
      "volume" bibinfo.check
      * *
    }
  if$
  volume empty$
  number empty$
  or
    'skip$
    { ", " *  }
  if$
  number empty$
    'skip$
    { bbl.nr * number * }
  if$
}

The key difference between this and my previous best solution is the little check in the middle, which required me to figure some basic understanding of the syntax of bst files. I recommend this and this in case you are like me unfamiliar with bst but have at least some basic coding knowledge.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .