TeX - LaTeX Asked by Ben25 on July 29, 2021
I build my own .bib file and I use the IEEEtran
document class. For bibliography style I’m using:
bibliographystyle{IEEEtran}
bibliography{IEEEabrv,mybibfile}
The IEEEtran
bibliography style generates numeric citation call-outs — [1]
, [2]
, etc.
However, I want to cite some references using the “FirstAuthor et al.” format. For example,
In [20] Jones et al. studied …
Or
some phrases Jones et al.[20] studied … “
How can I do that?
If you can switch from the IEEEtran
to the IEEEtranN
bibliography style (the N
in IEEEtranN
stands for natbib
), you can make use of natbib's citeauthor
and citet
macros to generate citation call-outs in the desired format.
Addendum to address the OP's requirement that the string "et al." must be typeset in italics:
I suggest you proceed as follows to achieve this objective:
Find the file IEEEtranN.bst
in your TeX distribution. Make a copy of this file and call the copy, say, IEEEtranN-ital.bst
. (Do not edit an original file of the TeX distribution directly.)
Open the file IEEEtranN-ital.bst
in a text editor. The program you use to edit your tex files will do fine.
In the file IEEEtranN-ital.bst
, find the following line (l. 201 in my copy of the file):
FUNCTION {bbl.etal}{ "et~al." }
Change it to
FUNCTION {bbl.etal}{ "textit{et~al.}" }
Save the file IEEEtranN-ital.bst
, either in the directory that contains your main tex file or in a directory that's searched by BibTeX. If you select the latter option, be sure to update the filename database of your TeX distribution suitably.
In your main tex file, change the instruction
bibliographystyle{IEEEtran}
to
bibliographystyle{IEEEtranN-ital}
and run a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more. Then, start using the citeauthor
and citet
instruction as and where needed. (I assume that, so far, your document contains only cite
instructions. Please advise if this is not the case.)
The following MWE (minimum working example) loads the hyperref
package purely to highlight what's generated by cite
, citeauthor
, and citet
.
documentclass{IEEEtran}
begin{filecontents}[overwrite]{mybibfile.bib}
@misc{jones,
author = "Dorothy Jones and Daniela Smith and Dinah Webster",
title = "Thoughts",
year = 3001,
}
end{filecontents}
usepackage[numbers]{natbib} % 'natbib' is a citation management package
bibliographystyle{IEEEtranN-ital}
usepackage[colorlinks,allcolors=blue]{hyperref} % optional
begin{document}
cite{jones} % standard numeric-style citation call-out
In cite{jones}, citeauthor{jones} studied dots
dots some phrases citet{jones} studied dots % author-number citation call-out
bibliography{mybibfile}
end{document}
Correct answer by Mico on July 29, 2021
I had the similar issue with citet
and I have followed the approach suggested by you but, unfortunately et. al is still not in italics. Could you please help me with it.
Answered by Subhani on July 29, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP