I am modifying a .bst file to be inline with my universities citation style. Most of the elements of the reference are required to be separated by a '.'. This is not for the case between the year and volume, which should be separated by a ';'.

I am editing a copy of unsrtnat.

I have already modified the output.nonnull function to output '.' instead of ',' as the separator.

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ". " * write$ }
    { output.state after.block =
        { add.period$ write$
          "\newblock " write$
        { output.state before.all =
            { add.period$ " " * write$ }
      mid.sentence 'output.state :=

I am very new to TeX. I have been able to make some simple modification to the .bst, but I feel this is beyond my current skills. How would I do this?

  • For entries of type @article, the unsrtnat bibliography style uses the following formatting and punctuation convention: "author. title. journal, volume(number):pages, year." Notice that year comes at the very end, rather than before volume. In short, it's not clear to me how you can achieve your desired format starting from the unsrtnat style. You may be better off using a different bibliography style as the starting point. – Mico May 21 '15 at 5:49
  • @Mico I started with the unsrtnat.bst file, and have somewhat modified it to make the references conform to my universities style, such that it has become myunsrrtnat.bst. I mentioned unsrtnat.bst as a point of reference. I have already moved the year to be next to the name of the journal. – David Poxon May 21 '15 at 5:54
  • @Mico I started with unsrtnat as it provided the references in the order in which the appeared in the document, something which plainnat did not, and which was based on advice provided in answers to other questions here. – David Poxon May 21 '15 at 5:56
  • 2
    Your formatting requirements (rather: your university's formatting requirements...) may be sufficiently unique as to make it desirable to start from scratch, specifically, by running the makebst utility that's part of the custom-bib package to create a bespoke bibliography style that contains all formatting requirements from the get-go. In contrast, if one attempts to modify an existing bibliography style, it's very easy to introduce bugs that are very hard to ferret out subsequently. – Mico May 21 '15 at 6:18
  • @Mico I've gone and done this; it seems like the most reasonable route. I seem to have some issues with author lists for in-text citations but hopefully I can work it out! – David Poxon May 21 '15 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.