I'm trying to write my references as [Harp], instead of [1]. I've read the Bibliography Styles section on Wikibooks, but It's not clear what I should do.
- 37,338
- 263
1 Answers
If you're using biblatex with bibtex, something like:
usepackage[backend=bibtex,sorting=anyt,style=alphabetic]{biblatex}
in the preamble (i.e. before \begin{document}, where you already have \usepackage[...]{biblatex}
If you're using bibtex, you should have somewhere in your document (i.e. after \begin{document})
\bibliography{<somefilename>}
specify the citation style just before:
\bibliographystyle{alpha}
\bibliography{dabib}
EDIT:
(cutting the original entry from the document server to get rid of greek letters, which are a matter on their own) mybib.bib:
@article{Aaij:2015tga,
author = "Aaij, Roel and others",
title = "{Observation of Letters}",
collaboration = "LHCb",
journal = "Phys. Rev. Lett.",
volume = "115",
year = "2015",
pages = "072001",
doi = "10.1103/PhysRevLett.115.072001",
eprint = "1507.03414",
archivePrefix = "arXiv",
primaryClass = "hep-ex",
reportNumber = "CERN-PH-EP-2015-153, LHCB-PAPER-2015-029",
SLACcitation = "%%CITATION = ARXIV:1507.03414;%%"
}
version 1: main.tex:
\documentclass{article}
\usepackage[sorting=anyt,style=alphabetic,backend=bibtex]{biblatex}
\bibliography{mybib}
\begin{document}
Here I cite \cite{Aaij:2015tga}.
\printbibliography
\end{document}
run with e.g. pdflatex main; bibtex main; pdflatex main; pdflatex main
version 2: main.tex
\documentclass{article}
\usepackage[sorting=anyt,style=alphabetic,backend=biber]{biblatex}
\bibliography{mybib}
\begin{document}
Here I cite \cite{Aaij:2015tga}.
\printbibliography
\end{document}
run with e.g. pdflatex main; biber main; pdflatex main; pdflatex main
version 3: main.tex
\documentclass{article}
\begin{document}
Here I cite \cite{Aaij:2015tga}.
\bibliographystyle{alpha}
\bibliography{mybib}
\end{document}
run with e.g. pdflatex main; bibtex main; pdflatex main; pdflatex main
I agree with the others that you should prefer the biblatex package over not using it (i.e. not version 3). As obvious from the initial version, I haven't migrated to biber myself, so cannot comment on its advantages.
I provided version 3 in case your document is not using biblatex so far and is too involved to migrate now.
- 237
-
1Hi and welcome to TeX.sx. This answer kind of mixes up two systems since Bibtex is both a
.bibfile format and a program, andbiblatexis a package. See bibtex vs. biber and biblatex vs. natbib. Also, so perhaps you want to specify minimal documents for each type, which would make the answer much clearer. Also, sincebiblatexincreasingly relies on Biber as the backend, I would not recommend usingbibtexas the backend for new users especially. – Alan Munn Jan 07 '16 at 20:00 -
+1 just one minor point: The
\bibliographycommand inbiblatexis deprecated (although still works) and should be replaced by\addbibresource{mybib.bib}(.bibextension required.) – Alan Munn Jan 07 '16 at 20:55
\documentclass{article} \begin{document} \cite{IEEEexample:article_typical} \bibliographystyle{plain} \bibliography{IEEEexample} \end{document}change\bibliographystyle{plain}by\bibliographystyle{alpha}. That is all. – Fran Jan 07 '16 at 19:16bibtexspecifically: http://www.math.utah.edu/faq/bibtex/bibtex.html. You may also want to consider starting withbiblatex. On this see: biblatex for idiots – Alan Munn Jan 07 '16 at 19:25biblatexbecause it's so versatile and customizable. – Alenanno Jan 07 '16 at 19:44biblatexcan be really overwhelming, for a beginner – Jan 07 '16 at 19:50biblatexonly appears overwhelming because there is so much older information online. Basic use ofbiblatexreally just involves gettingbiberto run in your IDE and choosing an appropriate style. And then if you do need changes, there are quite a few of us here who can help quite quickly with customization. – Alan Munn Jan 07 '16 at 19:54natbibonly for a short time, until it felt insufficient and switched tobiblatex. Whatever I don't know, I search on here or the internet. :P – Alenanno Jan 07 '16 at 20:00