1

I am using \documentclass{amsart}.

I want to cite the references in Bibliography with only initials of authors surnames. For example if the authors are Jaule Calo and Micke Kikdi then then I want to cite them in the text as [CK].

I have tried \bibliographystyle{apalike}, \bibliographystyle{plain}, \bibliographystyle{alpha} but none of these do what I want. \bibliographystyle{alpha} gives also the year which I do not want.

moewe
  • 175,683
gopal
  • 305
  • 1
    There is alphanum (https://www.ctan.org/pkg/alphanum-bst, https://www.ctan.org/pkg/alphanumb) – moewe Jul 23 '17 at 10:08
  • When I do that, I receive the error message "I couldn't open style file alphanum.bst" – gopal Jul 23 '17 at 10:11
  • 1
    I don't think the file is pre-installed in TeX live or MikTeX due to its (unclear?) license, you have to download it from https://www.ctan.org/tex-archive/biblio/bibtex/contrib/misc/alphanum.bst – moewe Jul 23 '17 at 10:12
  • Yes now it works, but for articles with only one author it cites the first three letters of the surname (instead of only the first letter). Example: for the author Jaoule Calo, it cites as [Cal] instead of [C] – gopal Jul 23 '17 at 10:18
  • 1
    are you using amsart simply because you prefer the style to that of article, or do you intend to submit the article to an ams journal? if the latter, the suggestion to use biblatex rather than bibtex won't work. i don't believe the bibitem labels you want would be found objectionable, but they won't work "out of the box", and some investigation and experimentation would be needed. i assume that you don't refer to multiple items by the same author(s), in which case some "tie-breaker" would be needed. – barbara beeton Jul 23 '17 at 17:56

1 Answers1

2

The alphanum style (https://www.ctan.org/pkg/alphanum-bst, https://www.ctan.org/pkg/alphanumb) comes close to what you want. Due to its (unclear?) license it is not available in MikTeX or TeX live, you have to download it from CTAN directly https://www.ctan.org/tex-archive/biblio/bibtex/contrib/misc/alphanum.bst

\documentclass{amsart}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{elk,
  author    = {Anne Elk},
  title     = {Towards a Unified Theory on Brontosauruses},
  year      = {1977},
  publisher = {Monthy Press},
  address   = {London},
}
@book{elkuthor,
  author    = {Anne Elk and Anne Uthor},
  title     = {Towards a Unified Theory on Emela-ntoukas},
  year      = {1980},
  publisher = {Monthy Press},
  address   = {London},
}
\end{filecontents}

\begin{document}
\cite{elk,elkuthor}
\bibliographystyle{alphanum}
\bibliography{\jobname}
\end{document}

I suggest you use biblatex and Biber: What to do to switch to biblatex?, biblatex in a nutshell (for beginners), bibtex vs. biber and biblatex vs. natbib as well as Biblatex with Biber: Configuring my editor to avoid undefined citations

There you can modify the label as you please

\documentclass{article}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage[british]{babel}
\usepackage[style=alphabetic, backend=biber]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{elk,
  author    = {Anne Elk},
  title     = {Towards a Unified Theory on Brontosauruses},
  year      = {1977},
  publisher = {Monthy Press},
  address   = {London},
}
@book{elkuthor,
  author    = {Anne Elk and Anne Uthor},
  title     = {Towards a Unified Theory on Emela-ntoukas},
  year      = {1980},
  publisher = {Monthy Press},
  address   = {London},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=1,strside=left]{labelname}
  }
}

\DeclareFieldFormat{extraalpha}{#1}%

\begin{document}
\cite{elk,elkuthor}

\printbibliography
\end{document}

example output [E; EU]

With \DeclareFieldFormat{extraalpha}{#1}% you get disambiguation numbers, i.e. 'E1' and 'E2' if you have two works by 'Elk'. If you leave the line out, you get letters, i.e. 'Ea', 'Eb'.

moewe
  • 175,683
  • Does your second code works if documentclass article is replaced by documentclass amsart? – gopal Jul 23 '17 at 10:51
  • @gopal Of course it does. But you will have to run Biber and not BibTeX, see the links. – moewe Jul 23 '17 at 10:53
  • I just download the bst file for the alphanum, but I don't know where to copy the file in TEXlive directory. – XIII Jan 23 '21 at 18:23
  • 1
    @XIE For a one-off or for testing it would be enough to just put the .bst file into the same directory as your main .tex file. If you want to install it in order to use it more often, you should not install it into a directory controlled by your TeX system, you should install it into TEXMFHOME or TEXMFLOCAL (cf https://www.texfaq.org/FAQ-inst-wlcf, https://www.texfaq.org/FAQ-privinst, https://www.texfaq.org/FAQ-what-TDS, https://www.texfaq.org/FAQ-install-where) – moewe Jan 23 '21 at 21:46
  • @moewe Thank you so much. This really solved my problem. – XIII Jan 24 '21 at 16:29