Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to change the format of citations for my bibliography items to look like:

"See Reference (a)" instead of "See Reference (1)"

I have used code like: \renewcommand\@cite[1]{Reference~(#1)} in my style file.

Then, in my actual document I would have: "See \cite{somebibitem}" which results in "See Reference (1)".

But how do I get my bibliography list to use alpha characters instead of numeric (which I assume would change the citation to use alpha as well)?

share|improve this question
    
Welcome to TeX.SX! May you tell what method you're using for the bibliography? –  egreg Dec 24 '11 at 18:10
    
Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. A tip: You can use backticks ` to mark your inline code as I did in my edit. –  egreg Dec 24 '11 at 18:12

2 Answers 2

The article document class and most other document classes I'm familiar with use the counter enumiv to number the items in the thebibliography environment. To "format" this counter for bibliographic labels, LaTeX by default employs the instruction \@arabic\c@enumiv in two instances in the definition of the thebibliography environment.

Hence, to change the numbering style of the labels from arabic (1, 2, 3, ...) to alph (a, b, c, ...), you could do a redefinition of the thebibliography environment in your document's preamble. Both instances of \@arabic have to be changed to \@alph. In addition, it's necessary to redefine two further macros, \@bibitem (because in its default definition it is hard-coded to use arabic-style numbers) and \biblabel (to change the delimiters around the bib labels from square brackets to round parentheses in the bibliography section).

\makeatletter
\renewcommand\@bibitem[1]{\item\if@filesw \immediate\write\@auxout
   {\string\bibcite{#1}{\theenumiv}}\fi\ignorespaces}
     %% to replace "\the\value{\@listctr}" with "\theenumiv"
\renewcommand\@biblabel[1]{(#1)}
     %% to replace "[#1]" with "(#1)"

\renewenvironment{thebibliography}[1]
     {\section*{\refname}%  %% use \bibname instead of \refname if using the 
                            %% report or book document classes
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{\@biblabel{\@alph\c@enumiv}}% %% instead of "\@arabic\c@enumiv"
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@alph\c@enumiv}}% 
                                    %% instead of "\@arabic\c@enumiv"
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
    {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

Finally, to change the delimiters of the citation "numbers" (now: letters!) in the text of the document from square brackets to round parentheses, I recommend you employ the cite package and issue the following commands (still in the preamble, naturally):

\usepackage{cite}
\renewcommand{\citeleft}{(}
\renewcommand{\citeright}{)}

Happy LaTeXing!

share|improve this answer
    
+1 for a solution for "standard LaTeX". –  lockstep Dec 24 '11 at 19:04
    
Thanks! I tried the very first solution (put the code in my style file), but ended up with two unexpected results: First, the references in the bibliography had [a] (or [b], etc.) instead of (a), (b), etc. Second, the citations appeared as (1), (2) instead of (a) and (b). Is there more that I need to do? –  John Dec 25 '11 at 0:01
    
John, it turns out that it's also necessary to redefine two additional macros, \@bibitem (to make the citation "numbers" show up as letters in the text) and \@biblabel (to use parentheses around the bib labels in the bibliography. I've added the required code in the example code, immediately after the makeatletter instruction. –  Mico Dec 25 '11 at 4:05
    
My apologies. I thought I had made that change. Everything seems to be working now. Thanks for all the suggestions. –  John Dec 25 '11 at 15:06
    
You're welcome. If you feel your question's been answered fully, don't hesitate to accept (by clicking on the check-mark) the answer officially. ;-) –  Mico Dec 25 '11 at 16:45

Here's a solution using biblatex. Note that the 27th reference will be labeled as "aa" and the 702th reference (the highest possible number) as "zz".

EDIT: I added some code to change the brackets to parentheses for the bibliography and the most common citation commands. A full solution would involve additional redefinitions.

\documentclass{article}

\usepackage{biblatex}

\DeclareFieldFormat{labelnumber}{\mknumalph{#1}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}}

\DeclareCiteCommand{\cite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Some text \autocite{A01,B02,C03}.

\printbibliography

\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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