ENTRY
  { author title journal year volume pages doi eprint url booktitle publisher address }
  {}
  { label }

FUNCTION {output.bibitem}
{
  newline$
  "\bibitem{} " write$
}

FUNCTION {fin.entry}
{
  "." write$
  newline$
}

FUNCTION {format.names}
{
  's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=

  numnames #3 >
    { s #1 "{vv~}{ll}, {f.}" format.name$ " et al." * }
    {
      ""
      numnames 'namesleft :=
      { namesleft #0 > }
      {
        s nameptr "{vv~}{ll}, {f.}" format.name$ *
        nameptr #1 >
          { ", " * }
          'skip$
        if$
        nameptr #1 + 'nameptr :=
        namesleft #1 - 'namesleft :=
      }
      while$
    }
  if$
}

FUNCTION {format.authors}
{ author format.names }

FUNCTION {format.doi}
{
  doi empty$
    { "" }
    { ", DOI: \href{https://doi.org/" doi * "}{" doi * "}" * }
  if$
}

FUNCTION {format.arxiv}
{
  eprint empty$
    { "" }
    { ", arXiv: \href{https://arxiv.org/abs/" eprint * "}{" eprint * "}" * }
  if$
}

FUNCTION {format.url}
{
  url empty$
    { "" }
    { ", \url{" url * "}" * }
  if$
}

FUNCTION {article}
{
  output.bibitem
  format.authors write$
  ", " write$
  year write$
  ", " write$
  title write$
  ", " write$
  "\textit{" journal * "}" * write$
  ", " write$
  "\textbf{" volume * "}" * write$
  ", " write$
  pages write$

  format.doi write$
  format.arxiv write$
  format.url write$

  fin.entry
}

FUNCTION {book}
{
  output.bibitem
  format.authors write$
  ", " write$
  year write$
  ", " write$
  title write$
  ", " write$
  publisher write$
  ", " write$
  address write$

  format.url write$

  fin.entry
}

FUNCTION {inproceedings}
{
  output.bibitem
  format.authors write$
  ", " write$
  year write$
  ", " write$
  title write$
  ", in " write$
  "\textit{" booktitle * "}" * write$
  ", " write$
  address write$
  ", " write$
  pages write$

  format.url write$

  fin.entry
}

FUNCTION {misc}
{
  output.bibitem
  format.authors write$
  ", " write$
  year write$
  ", " write$
  title write$

  format.url write$

  fin.entry
}

READ

FUNCTION {begin.bib}
{ }

EXECUTE {begin.bib}

ITERATE {call.type$}

FUNCTION {end.bib}
{ }

EXECUTE {end.bib}