Bibtex style with url and titles of references in bold
up vote
2
down vote
favorite
I'm looking for a bibliography style (in bibtex) that displays the web url of the references AND also writes the names of the authors of each reference in bold, e.g.
Smith, Nick and John Zeigler, "How to become rich", Journal of Dreams, 2007, 74 (2), 391-415. URL https://blurp.org/a/dreams/issue/16-340.html
I have used bibliographystyle{plainnat}
which gets the url right but doesn't display the authors in bold, and bibliographystyle{aer}
which displays the authors in bold but doesn't write the url.
Remark: I know it can probably be done with biblatex but I would like to know specifically if there is a way to do it with bibtex. Is there a bibliography style that gets it done right?
I attach below a sample document
documentclass[a4paper,12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
usepackage{amsmath}
%usepackage{floats}
setcounter{MaxMatrixCols}{10}
thispagestyle{empty}
setcounter{secnumdepth}{0}
setlength{topmargin}{-1.0in}
setlength{textheight}{9.25in}
setlength{oddsidemargin}{0.0in}
setlength{evensidemargin}{0.0in}
setlength{textwidth}{6.5in}
usepackage[authoryear]{natbib}
usepackage[plainpages=false,breaklinks=true,colorlinks=true,urlcolor=magenta,
citecolor=blue,linkcolor=blue,bookmarks=true,bookmarksopen=true,
bookmarksopenlevel=1,pdfstartview=FitH,pdfview=FitH]{hyperref}
begin{document}
Bla bla citet{CK_jme2006}
bibliography{macro_firstyear_biblio}
%bibliographystyle{aer} % OK but only bold
bibliographystyle{plainnat} % OK but only url
end{document}
bibtex natbib urls
add a comment |
up vote
2
down vote
favorite
I'm looking for a bibliography style (in bibtex) that displays the web url of the references AND also writes the names of the authors of each reference in bold, e.g.
Smith, Nick and John Zeigler, "How to become rich", Journal of Dreams, 2007, 74 (2), 391-415. URL https://blurp.org/a/dreams/issue/16-340.html
I have used bibliographystyle{plainnat}
which gets the url right but doesn't display the authors in bold, and bibliographystyle{aer}
which displays the authors in bold but doesn't write the url.
Remark: I know it can probably be done with biblatex but I would like to know specifically if there is a way to do it with bibtex. Is there a bibliography style that gets it done right?
I attach below a sample document
documentclass[a4paper,12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
usepackage{amsmath}
%usepackage{floats}
setcounter{MaxMatrixCols}{10}
thispagestyle{empty}
setcounter{secnumdepth}{0}
setlength{topmargin}{-1.0in}
setlength{textheight}{9.25in}
setlength{oddsidemargin}{0.0in}
setlength{evensidemargin}{0.0in}
setlength{textwidth}{6.5in}
usepackage[authoryear]{natbib}
usepackage[plainpages=false,breaklinks=true,colorlinks=true,urlcolor=magenta,
citecolor=blue,linkcolor=blue,bookmarks=true,bookmarksopen=true,
bookmarksopenlevel=1,pdfstartview=FitH,pdfview=FitH]{hyperref}
begin{document}
Bla bla citet{CK_jme2006}
bibliography{macro_firstyear_biblio}
%bibliographystyle{aer} % OK but only bold
bibliographystyle{plainnat} % OK but only url
end{document}
bibtex natbib urls
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm looking for a bibliography style (in bibtex) that displays the web url of the references AND also writes the names of the authors of each reference in bold, e.g.
Smith, Nick and John Zeigler, "How to become rich", Journal of Dreams, 2007, 74 (2), 391-415. URL https://blurp.org/a/dreams/issue/16-340.html
I have used bibliographystyle{plainnat}
which gets the url right but doesn't display the authors in bold, and bibliographystyle{aer}
which displays the authors in bold but doesn't write the url.
Remark: I know it can probably be done with biblatex but I would like to know specifically if there is a way to do it with bibtex. Is there a bibliography style that gets it done right?
I attach below a sample document
documentclass[a4paper,12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
usepackage{amsmath}
%usepackage{floats}
setcounter{MaxMatrixCols}{10}
thispagestyle{empty}
setcounter{secnumdepth}{0}
setlength{topmargin}{-1.0in}
setlength{textheight}{9.25in}
setlength{oddsidemargin}{0.0in}
setlength{evensidemargin}{0.0in}
setlength{textwidth}{6.5in}
usepackage[authoryear]{natbib}
usepackage[plainpages=false,breaklinks=true,colorlinks=true,urlcolor=magenta,
citecolor=blue,linkcolor=blue,bookmarks=true,bookmarksopen=true,
bookmarksopenlevel=1,pdfstartview=FitH,pdfview=FitH]{hyperref}
begin{document}
Bla bla citet{CK_jme2006}
bibliography{macro_firstyear_biblio}
%bibliographystyle{aer} % OK but only bold
bibliographystyle{plainnat} % OK but only url
end{document}
bibtex natbib urls
I'm looking for a bibliography style (in bibtex) that displays the web url of the references AND also writes the names of the authors of each reference in bold, e.g.
Smith, Nick and John Zeigler, "How to become rich", Journal of Dreams, 2007, 74 (2), 391-415. URL https://blurp.org/a/dreams/issue/16-340.html
I have used bibliographystyle{plainnat}
which gets the url right but doesn't display the authors in bold, and bibliographystyle{aer}
which displays the authors in bold but doesn't write the url.
Remark: I know it can probably be done with biblatex but I would like to know specifically if there is a way to do it with bibtex. Is there a bibliography style that gets it done right?
I attach below a sample document
documentclass[a4paper,12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
usepackage{amsmath}
%usepackage{floats}
setcounter{MaxMatrixCols}{10}
thispagestyle{empty}
setcounter{secnumdepth}{0}
setlength{topmargin}{-1.0in}
setlength{textheight}{9.25in}
setlength{oddsidemargin}{0.0in}
setlength{evensidemargin}{0.0in}
setlength{textwidth}{6.5in}
usepackage[authoryear]{natbib}
usepackage[plainpages=false,breaklinks=true,colorlinks=true,urlcolor=magenta,
citecolor=blue,linkcolor=blue,bookmarks=true,bookmarksopen=true,
bookmarksopenlevel=1,pdfstartview=FitH,pdfview=FitH]{hyperref}
begin{document}
Bla bla citet{CK_jme2006}
bibliography{macro_firstyear_biblio}
%bibliographystyle{aer} % OK but only bold
bibliographystyle{plainnat} % OK but only url
end{document}
bibtex natbib urls
bibtex natbib urls
asked Nov 29 at 14:58
Alessandro
203
203
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You can modify plainnat.bst
so that it prints the author/editor list in bold.
- Locate
plainnat.bst
on your machine (withkpsewhich plainnat.bst
) or download it from CTAN at http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
- Copy the file to a location where LaTeX can find it (https://texfaq.org/FAQ-inst-wlcf), the directory of your current document will do just fine.
- Rename the copied file to
plainnat-boldauthors.bst
. This is strongly recommended. Using the old name will only lead to confusion. - Open the new file and add a short header with the current date, your name and a short explanation of the changes.
Add a new function
FUNCTION {bold}
{ duplicate$ empty$
{ pop$ "" }
{ "textbf{" swap$ * "}" * }
if$
}
after the definition of
FUNCTION {emphasize}
.
For each entry type
<type>
addbold
after the call toformat.authors
/format.editors
in initial position so that, e.g. inFUNCTION {article}
format.authors "author" output.check
becomes
format.authors bold "author" output.check
etc.
You can find a ready-made copy of the modified file at https://gist.github.com/moewew/b5b57513bbe6e4ec51ca70d098b72913, the diff to plainnat.bst
is
--- plainnat.bst 2010-09-14 11:10:56.000000000 +0200
+++ plainnat-boldauthors.bst 2018-11-29 18:05:20.659087400 +0100
@@ -1,3 +1,15 @@
+%%%% plainnat-boldauthors.bst
+%%%% plainnat with bold author/editor lists
+%%%% for https://tex.stackexchange.com/q/462393/35864
+%%%% 2018-11-29 MW
+%%%% this version can be distributed under the LPPL version 1.3c or
+%%%% (at your option) any later version
+%%%% the license should be part of your LaTeX installation and is also
+%%%% available at
+%%%% https://www.latex-project.org/lppl.txt
+%%%% the original plainnat.bst can be obtained from CTAN at
+%%%% http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
+%%%% original header follows
%% File: `plainnat.bst'
%% A modification of `plain.bst' for use with natbib package
%%
@@ -211,6 +223,14 @@
if$
}
+% new function for bold text
+FUNCTION {bold}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "textbf{" swap$ * "}" * }
+ if$
+}
+
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
@@ -696,9 +716,11 @@
" citet{" * crossref * "}" *
}
+% 2018-11-29 MW: in the following FUNCTIONs 'bold' was added after all
+% format.authors/format.editors in initial position to obtain bold name lists
FUNCTION {article}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -729,10 +751,10 @@
FUNCTION {book}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -765,7 +787,7 @@
FUNCTION {booklet}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.title "title" output.check
@@ -784,10 +806,10 @@
FUNCTION {inbook}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -822,7 +844,7 @@
FUNCTION {incollection}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -852,7 +874,7 @@
FUNCTION {inproceedings}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -892,7 +914,7 @@
FUNCTION {manual}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.btitle "title" output.check
@@ -909,7 +931,7 @@
FUNCTION {mastersthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -926,7 +948,7 @@
FUNCTION {misc}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
title howpublished new.block.checkb
format.title output
@@ -943,7 +965,7 @@
FUNCTION {phdthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.btitle "title" output.check
@@ -960,7 +982,7 @@
FUNCTION {proceedings}
{ output.bibitem
- format.editors output
+ format.editors bold output
editor format.key output
new.block
format.btitle "title" output.check
@@ -981,7 +1003,7 @@
FUNCTION {techreport}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -998,7 +1020,7 @@
FUNCTION {unpublished}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
Then you just use plainnat-boldauthors
instead of plainnat
in your documents
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[authoryear]{natbib}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journal = {Journal of Computational Chemistry},
year = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
@misc{elk,
author = {Anne Elk},
title = {A Theory on Brontosauruses},
url = {http://www.example.edu/~elk/bronto.pdf},
year = {2016},
}
end{filecontents}
begin{document}
Bla bla citet{sigfridsson,elk}
bibliography{jobname}
bibliographystyle{plainnat-boldauthors}
end{document}
Since you mention biblatex
, version 3.12 makes it very easy to get bold name lists
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=authoryear, backend=biber]{biblatex}
DeclareNameWrapperFormat{sortname}{mkbibbold{#1}}
addbibresource{biblatex-examples.bib}
begin{document}
cite{sigfridsson,worman,geer}
printbibliography
end{document}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You can modify plainnat.bst
so that it prints the author/editor list in bold.
- Locate
plainnat.bst
on your machine (withkpsewhich plainnat.bst
) or download it from CTAN at http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
- Copy the file to a location where LaTeX can find it (https://texfaq.org/FAQ-inst-wlcf), the directory of your current document will do just fine.
- Rename the copied file to
plainnat-boldauthors.bst
. This is strongly recommended. Using the old name will only lead to confusion. - Open the new file and add a short header with the current date, your name and a short explanation of the changes.
Add a new function
FUNCTION {bold}
{ duplicate$ empty$
{ pop$ "" }
{ "textbf{" swap$ * "}" * }
if$
}
after the definition of
FUNCTION {emphasize}
.
For each entry type
<type>
addbold
after the call toformat.authors
/format.editors
in initial position so that, e.g. inFUNCTION {article}
format.authors "author" output.check
becomes
format.authors bold "author" output.check
etc.
You can find a ready-made copy of the modified file at https://gist.github.com/moewew/b5b57513bbe6e4ec51ca70d098b72913, the diff to plainnat.bst
is
--- plainnat.bst 2010-09-14 11:10:56.000000000 +0200
+++ plainnat-boldauthors.bst 2018-11-29 18:05:20.659087400 +0100
@@ -1,3 +1,15 @@
+%%%% plainnat-boldauthors.bst
+%%%% plainnat with bold author/editor lists
+%%%% for https://tex.stackexchange.com/q/462393/35864
+%%%% 2018-11-29 MW
+%%%% this version can be distributed under the LPPL version 1.3c or
+%%%% (at your option) any later version
+%%%% the license should be part of your LaTeX installation and is also
+%%%% available at
+%%%% https://www.latex-project.org/lppl.txt
+%%%% the original plainnat.bst can be obtained from CTAN at
+%%%% http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
+%%%% original header follows
%% File: `plainnat.bst'
%% A modification of `plain.bst' for use with natbib package
%%
@@ -211,6 +223,14 @@
if$
}
+% new function for bold text
+FUNCTION {bold}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "textbf{" swap$ * "}" * }
+ if$
+}
+
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
@@ -696,9 +716,11 @@
" citet{" * crossref * "}" *
}
+% 2018-11-29 MW: in the following FUNCTIONs 'bold' was added after all
+% format.authors/format.editors in initial position to obtain bold name lists
FUNCTION {article}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -729,10 +751,10 @@
FUNCTION {book}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -765,7 +787,7 @@
FUNCTION {booklet}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.title "title" output.check
@@ -784,10 +806,10 @@
FUNCTION {inbook}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -822,7 +844,7 @@
FUNCTION {incollection}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -852,7 +874,7 @@
FUNCTION {inproceedings}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -892,7 +914,7 @@
FUNCTION {manual}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.btitle "title" output.check
@@ -909,7 +931,7 @@
FUNCTION {mastersthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -926,7 +948,7 @@
FUNCTION {misc}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
title howpublished new.block.checkb
format.title output
@@ -943,7 +965,7 @@
FUNCTION {phdthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.btitle "title" output.check
@@ -960,7 +982,7 @@
FUNCTION {proceedings}
{ output.bibitem
- format.editors output
+ format.editors bold output
editor format.key output
new.block
format.btitle "title" output.check
@@ -981,7 +1003,7 @@
FUNCTION {techreport}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -998,7 +1020,7 @@
FUNCTION {unpublished}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
Then you just use plainnat-boldauthors
instead of plainnat
in your documents
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[authoryear]{natbib}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journal = {Journal of Computational Chemistry},
year = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
@misc{elk,
author = {Anne Elk},
title = {A Theory on Brontosauruses},
url = {http://www.example.edu/~elk/bronto.pdf},
year = {2016},
}
end{filecontents}
begin{document}
Bla bla citet{sigfridsson,elk}
bibliography{jobname}
bibliographystyle{plainnat-boldauthors}
end{document}
Since you mention biblatex
, version 3.12 makes it very easy to get bold name lists
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=authoryear, backend=biber]{biblatex}
DeclareNameWrapperFormat{sortname}{mkbibbold{#1}}
addbibresource{biblatex-examples.bib}
begin{document}
cite{sigfridsson,worman,geer}
printbibliography
end{document}
add a comment |
up vote
2
down vote
accepted
You can modify plainnat.bst
so that it prints the author/editor list in bold.
- Locate
plainnat.bst
on your machine (withkpsewhich plainnat.bst
) or download it from CTAN at http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
- Copy the file to a location where LaTeX can find it (https://texfaq.org/FAQ-inst-wlcf), the directory of your current document will do just fine.
- Rename the copied file to
plainnat-boldauthors.bst
. This is strongly recommended. Using the old name will only lead to confusion. - Open the new file and add a short header with the current date, your name and a short explanation of the changes.
Add a new function
FUNCTION {bold}
{ duplicate$ empty$
{ pop$ "" }
{ "textbf{" swap$ * "}" * }
if$
}
after the definition of
FUNCTION {emphasize}
.
For each entry type
<type>
addbold
after the call toformat.authors
/format.editors
in initial position so that, e.g. inFUNCTION {article}
format.authors "author" output.check
becomes
format.authors bold "author" output.check
etc.
You can find a ready-made copy of the modified file at https://gist.github.com/moewew/b5b57513bbe6e4ec51ca70d098b72913, the diff to plainnat.bst
is
--- plainnat.bst 2010-09-14 11:10:56.000000000 +0200
+++ plainnat-boldauthors.bst 2018-11-29 18:05:20.659087400 +0100
@@ -1,3 +1,15 @@
+%%%% plainnat-boldauthors.bst
+%%%% plainnat with bold author/editor lists
+%%%% for https://tex.stackexchange.com/q/462393/35864
+%%%% 2018-11-29 MW
+%%%% this version can be distributed under the LPPL version 1.3c or
+%%%% (at your option) any later version
+%%%% the license should be part of your LaTeX installation and is also
+%%%% available at
+%%%% https://www.latex-project.org/lppl.txt
+%%%% the original plainnat.bst can be obtained from CTAN at
+%%%% http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
+%%%% original header follows
%% File: `plainnat.bst'
%% A modification of `plain.bst' for use with natbib package
%%
@@ -211,6 +223,14 @@
if$
}
+% new function for bold text
+FUNCTION {bold}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "textbf{" swap$ * "}" * }
+ if$
+}
+
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
@@ -696,9 +716,11 @@
" citet{" * crossref * "}" *
}
+% 2018-11-29 MW: in the following FUNCTIONs 'bold' was added after all
+% format.authors/format.editors in initial position to obtain bold name lists
FUNCTION {article}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -729,10 +751,10 @@
FUNCTION {book}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -765,7 +787,7 @@
FUNCTION {booklet}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.title "title" output.check
@@ -784,10 +806,10 @@
FUNCTION {inbook}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -822,7 +844,7 @@
FUNCTION {incollection}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -852,7 +874,7 @@
FUNCTION {inproceedings}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -892,7 +914,7 @@
FUNCTION {manual}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.btitle "title" output.check
@@ -909,7 +931,7 @@
FUNCTION {mastersthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -926,7 +948,7 @@
FUNCTION {misc}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
title howpublished new.block.checkb
format.title output
@@ -943,7 +965,7 @@
FUNCTION {phdthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.btitle "title" output.check
@@ -960,7 +982,7 @@
FUNCTION {proceedings}
{ output.bibitem
- format.editors output
+ format.editors bold output
editor format.key output
new.block
format.btitle "title" output.check
@@ -981,7 +1003,7 @@
FUNCTION {techreport}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -998,7 +1020,7 @@
FUNCTION {unpublished}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
Then you just use plainnat-boldauthors
instead of plainnat
in your documents
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[authoryear]{natbib}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journal = {Journal of Computational Chemistry},
year = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
@misc{elk,
author = {Anne Elk},
title = {A Theory on Brontosauruses},
url = {http://www.example.edu/~elk/bronto.pdf},
year = {2016},
}
end{filecontents}
begin{document}
Bla bla citet{sigfridsson,elk}
bibliography{jobname}
bibliographystyle{plainnat-boldauthors}
end{document}
Since you mention biblatex
, version 3.12 makes it very easy to get bold name lists
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=authoryear, backend=biber]{biblatex}
DeclareNameWrapperFormat{sortname}{mkbibbold{#1}}
addbibresource{biblatex-examples.bib}
begin{document}
cite{sigfridsson,worman,geer}
printbibliography
end{document}
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You can modify plainnat.bst
so that it prints the author/editor list in bold.
- Locate
plainnat.bst
on your machine (withkpsewhich plainnat.bst
) or download it from CTAN at http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
- Copy the file to a location where LaTeX can find it (https://texfaq.org/FAQ-inst-wlcf), the directory of your current document will do just fine.
- Rename the copied file to
plainnat-boldauthors.bst
. This is strongly recommended. Using the old name will only lead to confusion. - Open the new file and add a short header with the current date, your name and a short explanation of the changes.
Add a new function
FUNCTION {bold}
{ duplicate$ empty$
{ pop$ "" }
{ "textbf{" swap$ * "}" * }
if$
}
after the definition of
FUNCTION {emphasize}
.
For each entry type
<type>
addbold
after the call toformat.authors
/format.editors
in initial position so that, e.g. inFUNCTION {article}
format.authors "author" output.check
becomes
format.authors bold "author" output.check
etc.
You can find a ready-made copy of the modified file at https://gist.github.com/moewew/b5b57513bbe6e4ec51ca70d098b72913, the diff to plainnat.bst
is
--- plainnat.bst 2010-09-14 11:10:56.000000000 +0200
+++ plainnat-boldauthors.bst 2018-11-29 18:05:20.659087400 +0100
@@ -1,3 +1,15 @@
+%%%% plainnat-boldauthors.bst
+%%%% plainnat with bold author/editor lists
+%%%% for https://tex.stackexchange.com/q/462393/35864
+%%%% 2018-11-29 MW
+%%%% this version can be distributed under the LPPL version 1.3c or
+%%%% (at your option) any later version
+%%%% the license should be part of your LaTeX installation and is also
+%%%% available at
+%%%% https://www.latex-project.org/lppl.txt
+%%%% the original plainnat.bst can be obtained from CTAN at
+%%%% http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
+%%%% original header follows
%% File: `plainnat.bst'
%% A modification of `plain.bst' for use with natbib package
%%
@@ -211,6 +223,14 @@
if$
}
+% new function for bold text
+FUNCTION {bold}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "textbf{" swap$ * "}" * }
+ if$
+}
+
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
@@ -696,9 +716,11 @@
" citet{" * crossref * "}" *
}
+% 2018-11-29 MW: in the following FUNCTIONs 'bold' was added after all
+% format.authors/format.editors in initial position to obtain bold name lists
FUNCTION {article}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -729,10 +751,10 @@
FUNCTION {book}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -765,7 +787,7 @@
FUNCTION {booklet}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.title "title" output.check
@@ -784,10 +806,10 @@
FUNCTION {inbook}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -822,7 +844,7 @@
FUNCTION {incollection}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -852,7 +874,7 @@
FUNCTION {inproceedings}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -892,7 +914,7 @@
FUNCTION {manual}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.btitle "title" output.check
@@ -909,7 +931,7 @@
FUNCTION {mastersthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -926,7 +948,7 @@
FUNCTION {misc}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
title howpublished new.block.checkb
format.title output
@@ -943,7 +965,7 @@
FUNCTION {phdthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.btitle "title" output.check
@@ -960,7 +982,7 @@
FUNCTION {proceedings}
{ output.bibitem
- format.editors output
+ format.editors bold output
editor format.key output
new.block
format.btitle "title" output.check
@@ -981,7 +1003,7 @@
FUNCTION {techreport}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -998,7 +1020,7 @@
FUNCTION {unpublished}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
Then you just use plainnat-boldauthors
instead of plainnat
in your documents
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[authoryear]{natbib}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journal = {Journal of Computational Chemistry},
year = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
@misc{elk,
author = {Anne Elk},
title = {A Theory on Brontosauruses},
url = {http://www.example.edu/~elk/bronto.pdf},
year = {2016},
}
end{filecontents}
begin{document}
Bla bla citet{sigfridsson,elk}
bibliography{jobname}
bibliographystyle{plainnat-boldauthors}
end{document}
Since you mention biblatex
, version 3.12 makes it very easy to get bold name lists
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=authoryear, backend=biber]{biblatex}
DeclareNameWrapperFormat{sortname}{mkbibbold{#1}}
addbibresource{biblatex-examples.bib}
begin{document}
cite{sigfridsson,worman,geer}
printbibliography
end{document}
You can modify plainnat.bst
so that it prints the author/editor list in bold.
- Locate
plainnat.bst
on your machine (withkpsewhich plainnat.bst
) or download it from CTAN at http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
- Copy the file to a location where LaTeX can find it (https://texfaq.org/FAQ-inst-wlcf), the directory of your current document will do just fine.
- Rename the copied file to
plainnat-boldauthors.bst
. This is strongly recommended. Using the old name will only lead to confusion. - Open the new file and add a short header with the current date, your name and a short explanation of the changes.
Add a new function
FUNCTION {bold}
{ duplicate$ empty$
{ pop$ "" }
{ "textbf{" swap$ * "}" * }
if$
}
after the definition of
FUNCTION {emphasize}
.
For each entry type
<type>
addbold
after the call toformat.authors
/format.editors
in initial position so that, e.g. inFUNCTION {article}
format.authors "author" output.check
becomes
format.authors bold "author" output.check
etc.
You can find a ready-made copy of the modified file at https://gist.github.com/moewew/b5b57513bbe6e4ec51ca70d098b72913, the diff to plainnat.bst
is
--- plainnat.bst 2010-09-14 11:10:56.000000000 +0200
+++ plainnat-boldauthors.bst 2018-11-29 18:05:20.659087400 +0100
@@ -1,3 +1,15 @@
+%%%% plainnat-boldauthors.bst
+%%%% plainnat with bold author/editor lists
+%%%% for https://tex.stackexchange.com/q/462393/35864
+%%%% 2018-11-29 MW
+%%%% this version can be distributed under the LPPL version 1.3c or
+%%%% (at your option) any later version
+%%%% the license should be part of your LaTeX installation and is also
+%%%% available at
+%%%% https://www.latex-project.org/lppl.txt
+%%%% the original plainnat.bst can be obtained from CTAN at
+%%%% http://mirrors.ctan.org/macros/latex/contrib/natbib/plainnat.bst
+%%%% original header follows
%% File: `plainnat.bst'
%% A modification of `plain.bst' for use with natbib package
%%
@@ -211,6 +223,14 @@
if$
}
+% new function for bold text
+FUNCTION {bold}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "textbf{" swap$ * "}" * }
+ if$
+}
+
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
@@ -696,9 +716,11 @@
" citet{" * crossref * "}" *
}
+% 2018-11-29 MW: in the following FUNCTIONs 'bold' was added after all
+% format.authors/format.editors in initial position to obtain bold name lists
FUNCTION {article}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -729,10 +751,10 @@
FUNCTION {book}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -765,7 +787,7 @@
FUNCTION {booklet}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.title "title" output.check
@@ -784,10 +806,10 @@
FUNCTION {inbook}
{ output.bibitem
author empty$
- { format.editors "author and editor" output.check
+ { format.editors bold "author and editor" output.check
editor format.key output
}
- { format.authors output.nonnull
+ { format.authors bold output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
@@ -822,7 +844,7 @@
FUNCTION {incollection}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -852,7 +874,7 @@
FUNCTION {inproceedings}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -892,7 +914,7 @@
FUNCTION {manual}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
new.block
format.btitle "title" output.check
@@ -909,7 +931,7 @@
FUNCTION {mastersthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -926,7 +948,7 @@
FUNCTION {misc}
{ output.bibitem
- format.authors output
+ format.authors bold output
author format.key output
title howpublished new.block.checkb
format.title output
@@ -943,7 +965,7 @@
FUNCTION {phdthesis}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.btitle "title" output.check
@@ -960,7 +982,7 @@
FUNCTION {proceedings}
{ output.bibitem
- format.editors output
+ format.editors bold output
editor format.key output
new.block
format.btitle "title" output.check
@@ -981,7 +1003,7 @@
FUNCTION {techreport}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
@@ -998,7 +1020,7 @@
FUNCTION {unpublished}
{ output.bibitem
- format.authors "author" output.check
+ format.authors bold "author" output.check
author format.key output
new.block
format.title "title" output.check
Then you just use plainnat-boldauthors
instead of plainnat
in your documents
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[authoryear]{natbib}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journal = {Journal of Computational Chemistry},
year = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
@misc{elk,
author = {Anne Elk},
title = {A Theory on Brontosauruses},
url = {http://www.example.edu/~elk/bronto.pdf},
year = {2016},
}
end{filecontents}
begin{document}
Bla bla citet{sigfridsson,elk}
bibliography{jobname}
bibliographystyle{plainnat-boldauthors}
end{document}
Since you mention biblatex
, version 3.12 makes it very easy to get bold name lists
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=authoryear, backend=biber]{biblatex}
DeclareNameWrapperFormat{sortname}{mkbibbold{#1}}
addbibresource{biblatex-examples.bib}
begin{document}
cite{sigfridsson,worman,geer}
printbibliography
end{document}
answered Nov 29 at 17:12
moewe
84k8107322
84k8107322
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462393%2fbibtex-style-with-url-and-titles-of-references-in-bold%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown