4

I will loose my nerves here... Please help me with this crazzy bibtex style code. I want to change my bibtex style file in order to change the dot after the authors and the title with the comma:

H. H. McAdams in A. Arkin. Stochastic mechanisms in gene expression. Proceedings of the National Academy of Sciences, 94 (3) 814-819 (1997).

with

H. H. McAdams in A. Arkin, Stochastic mechanisms in gene expression, Proceedings of the National Academy of Sciences, 94 (3) 814-819 (1997).

How can I do that on this file https://www.dropbox.com/s/hog42r9fa669uzt/physicsFNM.bst ?

Also I would need to make a Misc or Electronic source which looks like that:

N. FAMILYNAME, TITLE. Pridobljeno DATE iz LINK.

How can I manage to do that?

Thank you very much! Vito

5
  • 2
    Can you please provide the .bib entry corresponding to the mentioned work? Mar 1, 2014 at 0:17
  • 1
    Do you have a special reason for using this style instead of biblatex? Mar 1, 2014 at 7:54
  • @ Gonzalo: Examples are quoted, .bst file is on the dropbox link provided. @ Marvo: Yes, we have specific rules on my faculty so I need specific bib style. And they are very very stricts with the periods and commas.
    – Vito
    Mar 1, 2014 at 9:00
  • When I typeset your example with your .bst file using an @inproceedings entry I do not get the output you quote. Could you provide your .bib entry? Mar 1, 2014 at 11:47
  • Sorry guys for late respond, you have everything in my answer down below.
    – Vito
    Mar 2, 2014 at 10:07

2 Answers 2

7

The separator is defined under FUNCTION {output.nonnull} in the bst file. Specifically, in your file physicsFNM, locate these lines:

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

The last line (which corresponds to line 83 on your file) should be changed to:

        { ", " * write$

which yields:

output

Hope it helps!

1

Thanks Alvaro. Additionally I have figured out how to do this code (to get commas everywhere, except at the end): ARTICLE: Change function output.nonnull with:

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

Also change the function format.journal.pages with (to get comma before pages):

FUNCTION {format.journal.pages}
{ pages duplicate$ empty$ 'pop$
    { swap$ duplicate$ empty$
        { pop$ pop$ format.pages }
        {
          ", " *
          swap$
          n.dashify
          "pages" bibinfo.check
          *
        }
      if$
    }
  if$
}

MISC (electronic source): Change the function misc with this (in order to get"Pridobljeno" in front of note and "iz" in front of howpublished):

FUNCTION {misc}
{ output.bibitem
  format.authors output
  title howpublished new.block.checkb
  format.title output
  ". Pridobljeno " * write$
  format.note output
  " iz " * write$
  format.url output
  new.block
  howpublished new.block.checka
  howpublished "howpublished" bibinfo.check output
  new.block
  format.date output
  fin.entry
  empty.misc.check
}

EXAMPLE BIB:

@article{primer_clanek,
  title={Anomalous Paramagnetism of Copper Acetate},
  author={Bleaney, B. and Bowers, K. D.},
  journal={Proc. R. Soc. Lond. A},
  volume={214},
  number={},
  pages={451-465},
  year={1952}
}

@book{primer_knjige,
  title={Magnetism in Condensed Matter},
  author={Blundell, S.},
  publisher={Oxford University Press, New York, 2001}
}

@misc{primer_elektronski_vir,
   author = {Wikipedia},
   title = {Magnetic Moment},
   howpublished = {\url{http://en.wikipedia.org/wiki/File:Magnetic_moment.svg}},
   note = {13.7.2013}
}

EXAMPLE TEX:

\documentclass[12pt]{article}
\usepackage{url}

\begin{document}
\section*{Primer citatov}
Knjiga \cite{primer_knjige} \\
\v{C}lanek \cite{primer_clanek} \\
Elektronski vir \

cite{primer_elektronski_vir}.


\bibliography{mybib}
\bibliographystyle{physicsFNM}

\end{document}

RESULT:

Bibliography with LaTeX

BST

https://www.dropbox.com/s/hog42r9fa669uzt/physicsFNM.bst

BIB:

https://www.dropbox.com/s/ce0gqlsth4s1nlz/mybib.bib

TEX:

https://www.dropbox.com/s/o561jovpp051nxh/test.tex

PDF:

https://www.dropbox.com/s/ylss73a22rr19os/test.pdf

1
  • Please accept or edit my answer, instead of posting a new answer as a comment of mine.
    – han-tyumi
    Feb 26, 2016 at 16:26

You must log in to answer this question.

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