20

I'm using a simple bibliography like this

...
\nocite{*}
\bibliographystyle{acm}
\bibliography{refs}
...

and I would like to either replace the numbers ([1], [2], ...) in front of each reference with some other symbol (e.g. dots) or just remove them altogether.

Any ideas?

Edit: I am using the article class.

25

To change the label, you can redefine \@biblabel; for example, to use a bullet you can say in the preamble:

\makeatletter
\renewcommand\@biblabel[1]{\textbullet}
\makeatother

to suppress the label, use:

\makeatletter
\renewcommand\@biblabel[1]{}
\makeatother

this, however, will preserve indentation. To remove this indentation you can redefine the thebibliography environment (which is basically a list); this redefinition depends on the document class used (and you didn't mention this in your question).

Here's an example of such a redefinition for the article document class:

\documentclass{article}

\makeatletter
\renewcommand\@biblabel[1]{}
\renewenvironment{thebibliography}[1]
     {\section*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{}%
           {\leftmargin0pt
            \@openbib@code
            \usecounter{enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

\begin{document}

\nocite{*}
\bibliographystyle{acm}
\bibliography{biblio}

\end{document}
  • Both work like a charm! Thanks a lot! (I was indeed using article.) – 3lectrologos Nov 19 '11 at 3:12
  • I am having the same issue but I am using a book document class. Could you help me by providing a working example of how to remove this indentation in this class? I am LATEX enthusiast but not very good at code writing. Regards Rod – Rodrigo Esteves Jun 12 '12 at 23:11
  • @RodrigoEsteves Welcome to TeX.sx! Your question won't be seen by many people here, so it would be best to repost it as a fresh question. Follow-up questions like this are more than welcome! Please use the "Ask Question" link for your new question; there you can link to this question to provide the background. – Caramdir Jun 12 '12 at 23:13
  • @GonzaloMedina I noticed that the top two code blocks actually don't preserve indentation, I don't know why... – warship Aug 7 '17 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.