3

Is there a way to easily modify the bibliography style to look just like the siggraph template?

The ACM SIGGRAPH template is awesome, and I am really used to the SIGGRAPH citation style. When I write a normal latex document however, I cannot use: \bibliographystyle{acmsiggraph} because this would not work with a standard \documentclass{article}, and I am forced to use \documentclass{acmsiggraph}.

For example, this entry from the bib file:

@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"}

When accessed through \cite{fedkiw:2001:VSO} would produce [Fedkiw et al. 2001] in the PDF and the following on the typeset references page:

FEDKIW, R., STAM, J., AND JENSEN, H. W. 2001. Visual simulation of smoke. In Proceedings of SIGGRAPH 2001, ACM Press / ACM SIGGRAPH, E. Fiume, Ed., Computer Graphics Proceedings, Annual Conference Series, ACM, 15–22.

2 Answers 2

2

In you document preamble (after \documentclass{article} but before \begin{document}) add:

\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

Here's a working example:

\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}

Produces:

acm siggraph style references and citations

Edit: removed extra .cls file and placed command in preamble.

2
  • I would love to hear if anyone knows how to move the contents of the .cls file into the .tex file under a straight \documentclass{article} (avoid the separate file). Commented Jun 16, 2016 at 1:05
  • 1
    I removed the \makeat... tokens, that are wrong in a .cls file. For avoiding one, just copy the code in the document preamble, omitting the first three lines, surrounded by \makeatletter and \makeatother
    – egreg
    Commented Jun 16, 2016 at 6:12
2

I used cutom-bib to generate a bst that resembles SIGGRAPH style. You can delete lines 490-491, 500-501 to get rid of ISSN, ISBN from references. It also produces [authorA and authorB 1999] for two authors instead of et al.

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

enter image description here

Latex code:

\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}

You must log in to answer this question.

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