TeX - LaTeX Asked by Minghao on September 7, 2020
I built a .bst file using makebst
and I want to add a comma before el al.
. I chose the correct option but it doesn’t work. The option in .dbj is as followed
%--------------------
%COMMA BEFORE `ET AL':
%: (def) Comma before `et al'
% etal-xc,%: No comma before `et al'
%--------------------
So I modified the generated .bst directly by change
FUNCTION {bbl.etal}
{ "et~al." }
to
FUNCTION {bbl.etal}
{ ",~et~al." }
However, a unexpected space appeared between last author and comma like
Mosser B, Michel E, Appourchaux T , et al. A&A, 2009. 506: 33
and what I want is
Mosser B, Michel E, Appourchaux T, et al. A&A, 2009. 506: 33
So, how can I modified the .bst file to fit the request.
Your .bst
file contains three instances of
" " * bbl.etal
which will print a space followed by "et al."
If you want a comma before the "et al.", replace all three occurences of " " * bbl.etal
with
", " * bbl.etal
With the file thus modified (you can get it at https://gist.github.com/moewew/22e8046e747cb39fca28935630ea50c7, there is also a diff so you can see the changes more easily)
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
begin{filecontents}{jobname.bib}
@book{appleby,
author = {Humphrey Appleby and Mosser, B. and Michel, E. and Appourchaux, T.},
title = {On the Importance of the Civil Service},
year = {1980},
}
end{filecontents}
begin{document}
cite{appleby}
bibliographystyle{twxb}
bibliography{jobname}
end{document}
produces
as desired.
Since you have generated your .bst
file with the option and-xcom
(which suppresses the comma before "and") it is understandable that you don't get a comma before the "et al." (after all, "et" means "and").
As far as I can see the option etal-xc
only does something when and-xcom
, and-com
and xand
are not selected.
Answered by moewe on September 7, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP