如何定制 bibtex 来匹配 SIGGRAPH 风格?

如何定制 bibtex 来匹配 SIGGRAPH 风格?

有没有办法可以轻松修改参考书目样式,使其看起来就像 siggraph 模板一样?

ACM SIGGRAPH 模板非常棒,而且我非常习惯 SIGGRAPH 引用格式。但是,当我编写普通的 latex 文档时,我无法使用: \bibliographystyle{acmsiggraph}因为这不适用于标准\documentclass{article},因此我被迫使用\documentclass{acmsiggraph}

例如,bib 文件中的以下条目:

@inproceedings{fedkiw:2001:VSO,
  author = "Ronald Fedkiw and Jos Stam and Henrik Wann Jensen",
  title = "Visual Simulation of Smoke",
  editor = "Eugene Fiume",
  booktitle = "Proceedings of SIGGRAPH 2001",
  publisher = "ACM Press / ACM SIGGRAPH",
  pages = "15--22",
  year = 2001,
  organization = "ACM",
  series = "Computer Graphics Proceedings, Annual Conference Series"}

当通过访问时,\cite{fedkiw:2001:VSO}[Fedkiw et al. 2001]在 PDF 中生成以下内容,并在排版参考页面上生成以下内容:

FEDKIW, R.、STAM, J. 和 JENSEN, HW 2001。烟雾的视觉模拟。SIGGRAPH 2001 论文集,ACM Press / ACM SIGGRAPH,E. Fiume 编辑,计算机图形学论文集,年度会议系列,ACM,15-22。

答案1

在您的文档序言中(之后\documentclass{article}但之前\begin{document})添加:

\makeatletter
\let\@internalcite\cite
\def\cite{\def\citename##1{##1}\@internalcite}
\def\shortcite{\def\citename##1{}\@internalcite}
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\def\@biblabel#1{}
\def\thebibliography#1{%
  \section*{%
    \refname\@mkboth{\sl\uppercase{\refname}}{\sl\uppercase{\refname}}}
  \list{\relax}{\setlength{\labelsep}{0em}
                \setlength{\itemindent}{-\bibhang}
                \setlength{\leftmargin}{\bibhang}}
  \def\newblock{\hskip .11em plus .33em minus .07em}
  \sloppy\clubpenalty4000\widowpenalty4000
  \sfcode`\.=1000\relax}
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{; }\@ifundefined
      {b@\@citeb}{{\bf ?}\@warning
      {Citation '\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}
\makeatother

这是一个有效的例子:

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Tagliasacchi:2012:MCS,
  title={Mean Curvature Skeletons},
  author={Andrea Tagliasacchi and Ibraheem Alhashim and Matt Olson and Hao Zhang},
  journal= {Comput.\ Graph.\ Forum},
  volume={31},
  number={5},
  year={2012},
}
\end{filecontents}
\immediate\write18{bibtex \jobname}

\makeatletter
\let\@internalcite\cite
\def\cite{\def\citename##1{##1}\@internalcite}
\def\shortcite{\def\citename##1{}\@internalcite}
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\def\@biblabel#1{}
\def\thebibliography#1{%
  \section*{%
    \refname\@mkboth{\sl\uppercase{\refname}}{\sl\uppercase{\refname}}}
  \list{\relax}{\setlength{\labelsep}{0em}
                \setlength{\itemindent}{-\bibhang}
                \setlength{\leftmargin}{\bibhang}}
  \def\newblock{\hskip .11em plus .33em minus .07em}
  \sloppy\clubpenalty4000\widowpenalty4000
  \sfcode`\.=1000\relax}
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{; }\@ifundefined
      {b@\@citeb}{{\bf ?}\@warning
      {Citation '\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}
\makeatother    

\begin{document}

Why didn't you cite \cite{Tagliasacchi:2012:MCS}.
\bibliographystyle{acmsiggraph}
\bibliography{\jobname} 
\end{document}

生成:

acm siggraph 样式参考和引文

编辑:删除了多余的.cls 文件并将命令放在序言中。

答案2

我使用 cutom-bib 生成了类似于 SIGGRAPH 风格的 bst。您可以删除第 490-491 行、第 500-501 行,以从参考文献中删除 ISSN、ISBN。它还会为两位作者生成 [authorA and authorB 1999],而不是 et al。

https://raw.githubusercontent.com/gchauras/docthesis/master/Bibliography/bib_style.bst

在此处输入图片描述

乳胶代码:

\documentclass{article}

\usepackage[square]{natbib}
\let\citeORIG\cite
\renewcommand{\cite}{\citep}
\newcommand{\shortcite}[1]{\citeORIG{#1}}

\usepackage{filecontents}
\begin{filecontents}{refer.bib}
@inproceedings{Furukawa:2009:interiors,
    author    = {Furukawa, Yasutaka and Curless, Brian and Seitz, Steven M. and Szeliski, Richard},
    booktitle = {ICCV},
    title     = {Reconstructing building interiors from images},
    year      = {2009},
    month     = {oct},
    pages     = {80 -87},
    doi       = {10.1109/ICCV.2009.5459145},
    url       = {http://grail.cs.washington.edu/projects/interior/},
    issn      = {1550-5499},
}
@inproceedings{Goesele:2006,
    author    = {Michael Goesele and Brian Curless and Steven M. Seitz},
    title     = {Multi-View Stereo Revisited},
    booktitle = {CVPR},
    year      = {2006},
    pages     = {2402--2409},
    doi       = {10.1109/CVPR.2006.199},
    isbn      = {0-7695-2597-0},
}   
\end{filecontents}
\immediate\write18{bibtex refer}

\begin{document}

Using \texttt{custom-bib} to create bibliography style, and \texttt{natbib} to customize citation style, includes a better \texttt{shortcite}: Multi-view stereo has been revisited \cite{Goesele:2006} and brought indoors \cite{Furukawa:2009:interiors}. \shortcite{Goesele:2006} revisited multi-view stereo, and \shortcite{Furukawa:2009:interiors} brought it indoors.

\bibliographystyle{bib_style}
\bibliography{refer}
\end{document}

相关内容