2

I need to correct a paper for a Japanese Journal, that was used for a conference. In the guidelines for Journal, it is stated that references should be:

Name of author(s): "Title", Name of Pubblication, Volume, Number, Page (Year and Month)

Journal provides a document class, but no bst file. I'm trying to get parentheses in the end, without adding any new package to my source. I'm using bibtex, and I've modified the bst file as follow:

FUNCTION {format.date}
{ year empty$
    { month empty$
        { "" }
        { "there's a month but no year in " cite$ * warning$
          month
        }
      if$
    }
     { month empty$
         'year
        { " (" * year * ")" * }
      if$
    }
  if$
}

that does not work. Also I cannot understand what I've to modify to add : after authors name.

Trying to use the solution listed here (Put year in parentheses...) generates an error.

On this answer I have acknowledged the existence of Bibulous format, that I'll try tomorrow (it is really late here...)

5
  • 1
    Hi, if the journl provides the guidelines and a bst-file, you should just leave it. It is the work of the journal editors to conform it to the final state. If the bst file is faulty, this should not come down to you.
    – Johannes_B
    Mar 18, 2015 at 20:07
  • The solution you link to cannot work for the way you are generating your bibliography, because that question concerns biblatex-chicago, which uses the Biblatex back-end, while BST files are only for systems based on the older Bibtex engine. Can you link to the BST file you are changing? Mar 18, 2015 at 20:17
  • Joannes_B: no bst file is provided. They suggest to use bibitems. Charles Stewart: it is the common plain.bst file that I'm trying to modify (thanks barbara beeton for corrections) Mar 18, 2015 at 20:52
  • Little hint, put an @ sign in front of a user name, this way they get a little message: @Matteoragni.
    – Johannes_B
    Mar 18, 2015 at 22:35
  • Please add/edit the information from the comments to the original question. This makes sure it gets more attention from users.
    – Johannes_B
    Mar 18, 2015 at 22:35

1 Answer 1

1

The solution uses Bibulous project script.

Style file is declared as follows:

OPTIONS:
allow_scripts = True

VARIABLES:
formatdate = format_date_style(entry, options)
formatpages = format_pages_style(entry, options)
formatvolume = format_volumes_style(entry, options)

DEFINITIONS:
def format_date_style(entry, options):
  """
  Return correct year for ieej-jia -> (month if present, year) in parentheses
  """

  if ('year' not in entry):
    return(options['undefstring'])
  else:
    if ('month' not in entry):
      return('(' + str(entry['year']) + ')')
    else:
      return('(' + entry['month'].title() + ', ' + str(entry['year'])+ ')')

def format_pages_style(entry, options):
    """
    Returns pages if present
    """

    if ('pages' in entry):
        return(str(entry['pages']) + ', ')
    else:
        return('')

def format_volumes_style(entry, options):
    """
    Return Volume, Number
    """

    ret = ''
    if ('volume' in entry):
        ret = ret + str(entry['volume']) + ', '

    if ('number' in entry):
        ret = ret + str(entry['number']) + ', '

    return(ret)

TEMPLATES:
article       = <au>: ``<title>'', <journal>, <formatvolume> <formatpages> <formatdate>
book          = <au>: ``<title>'', <publisher>, <formatpages> (<year>)
electronic    = <au>: ``\href{<url>}{<title>}'',  (<year>)
inproceedings = <au>: ``<title>'', <booktitle>, <formatpages> (<year>)
incollection  = <au>: ``<title>'', <booktitle>, <publisher>, <formatpages> (<year>)
sortkey       = <citekey>

and reference to this file is inserted in main tex file

\bibliographystyle{previous_file}

Compilation requires three commands (example with pdflatex):

pdflatex main.tex     # to generate aux file
bibulous.py main.aux  # to generate bbl
pdflatex main.tex     # to generate final pdf

Hope it helps.

You must log in to answer this question.

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