如何控制bibtex中字段的顺序?

如何控制bibtex中字段的顺序?

我有一个像这样的 bibtex 条目:

@inproceedings{x1,
  author    = {Dave Madengly and Johny Depp},
  title     = "{Using new Context}",
  booktitle = {Proceedings of 1st Conference of the XXX (XXX' 01)},
  year      = {2001},
  crossref  = {2},
  pages     ="12 -- 20",
}

@proceedings{x2,
  editor    = {John Doe},
  title     = {XXX 2001, Proceedings},
  booktitle = {Proceedings of 1st Conference of the XXX},
  publisher = {The XXXX},
  address =  {USA},
  year      = {2001}
}

并使用普通书目样式。问题是出版商出现在最后。我想要的是出版商名称出现在页码之前。我该怎么做?

答案1

请随时发帖完全的文档中显示了这个问题。您需要修改 bst 文件的副本。

在此处输入图片描述

\begin{filecontents}{xx.bib}
@inproceedings{x1,
  author    = {Dave Madengly and Johny Depp},
  title     = "{Using new Context}",
  booktitle = {Proceedings of 1st Conference of the XXX (XXX' 01)},
  year      = {2001},
  crossref  = {x2},
  pages     ="12 -- 20",
}

@proceedings{x2,
  editor    = {John Doe},
  title     = {XXX 2001, Proceedings},
  booktitle = {Proceedings of 1st Conference of the XXX},
  publisher = {The XXXX},
  address =  {USA},
  year      = {2001}
}
\end{filecontents}

\documentclass{article}
\begin{document}
\cite{x1}
\bibliographystyle{myplain}
\bibliography{xx}
\end{document}

其中,将“inproceedings”myplain.bst的副本plain.bst更改为:

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      address empty$
        { organization publisher new.sentence.checkb
          organization output
          publisher output
          format.date "year" output.check
        }
        { address output.nonnull
          format.date "year" output.check
          new.sentence
          organization output
          publisher output
        }
      if$
      format.pages output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  fin.entry
}

即的位置format.pages output被移动了。

答案2

发布答案以供将来参考(我真正想要的方式):

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.pages output
      new.sentence
      publisher output
      address empty$
        { organization publisher new.sentence.checkb
          organization output
          format.date "year" output.check
        }
        { address output.nonnull
          format.date "year" output.check
          new.sentence
        }
      if$
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  fin.entry
}

相关内容