BibTeX, biblatex and biber ⇒ Add DOI support to .bst file
Add DOI support to .bst file
http://waugh.cchem.berkeley.edu/thesis/prsty.bst
Which styles natively support doi links? Perhaps one has a similar look and I won't need to write any low level TeX.
Thanks
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Add DOI support to .bst file
Alternatively you could try to mimic the style by means of the biblatex package. I'm not very familiar with that but its said to allow customizations in many ways.
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Add DOI support to .bst file
I'll outline what I have done so hopefully others can modify their own bst files.
Firstly, at the top of the bst file there is
Code: Select all
ENTRY
{ address
...
volume
year
}
{}
{ label }
Code: Select all
ENTRY
{ address
...
volume
year
doi
}
{}
{ label }
Code: Select all
FUNCTION {article}
{ output.bibitem
"author" format.authors #1 push.string.check
"journal" journal #0 add.string.check " " *
output
%%%%%%%%%%
format.vol.page #0 push.string
%%%%%%%%%%
" " *
"date" format.date paren #0 add.string.check
note empty$
'skip$
{ ", " * note lc.first.letter * }
if$
fin.entry
crossref empty$
'skip$
{ "See Ref.\ \cite{" crossref "}." * * write$ newline$ }
if$
}
Code: Select all
FUNCTION {article}
{ output.bibitem
"author" format.authors #1 push.string.check
"journal" journal #0 add.string.check " " *
output
%%%%%%%%%%%
doi empty$
{format.vol.page #0 push.string}
{"\href{http://dx.doi.org/" doi "}{" format.vol.page "}" #0 push.string * * * *}
if$
%%%%%%%%%%%
" " *
"date" format.date paren #0 add.string.check
note empty$
'skip$
{ ", " * note lc.first.letter * }
if$
fin.entry
crossref empty$
'skip$
{ "See Ref.\ \cite{" crossref "}." * * write$ newline$ }
if$
}
I don't understand the bibtex language well enough to fully explain, but the asterisks(*) at the end of the line concatenate the literal strings and variables. I had to use trial and error to get the correct number.
That's it, simple!

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Add DOI support to .bst file
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10