TransWikia.com

Biblatex order of fields, e. g. remark before field URL

TeX - LaTeX Asked by ubuntuuser on March 17, 2021

How can I put an annotation directly in front of the field URL?
With

@book{Feynman2007_1_en,
  author       = {Feynman, R. P. and Leighton, R. B. and Sands, M.},
  title        = {Feynman Lectures on Physics},
  volume       = {1},
  publisher    = {Basic Books},
  year         = {2011},
  address      = {New York},
  note         = {All volumes available on the web},
  url          = {https://www.feynmanlectures.caltech.edu},
  urldate      = {2021-02-14}
}

I get

enter image description here

In the biblatex documentation I did not find an appropriate field.
Maybe it’s better not to use @book?
My MWE is

documentclass{book}

usepackage[utf8]{inputenc}

usepackage[autostyle]{csquotes}
usepackage[backend=biber, citestyle=numeric]{biblatex}

addbibresource{Bibliographie_Test.bib}

begin{document}
This is from~cite{Feynman2007_1_en}.

printbibliography

end{document}

One Answer

A possible solution using the usera field and renewing the doi+eprint+url bibmacro:

begin{filecontents}[overwrite]{jobname.bib}
 @book{Feynman2007_1_en,
  author       = {Feynman, R. P. and Leighton, R. B. and Sands, M.},
  title        = {Feynman Lectures on Physics},
  volume       = {1},
  publisher    = {Basic Books},
  year         = {2011},
  address      = {New York},
  usera         = {All volumes available on the web},
  url          = {https://www.feynmanlectures.caltech.edu},
  urldate      = {2021-02-14}
 }
end{filecontents}

documentclass{book}
usepackage[utf8]{inputenc}
usepackage[autostyle]{csquotes}
usepackage[backend=biber, citestyle=numeric]{biblatex}
  addbibresource{jobname.bib}

usepackage{xpatch}
xpretobibmacro{doi+eprint+url}
  {printfield{usera}newunitnewblock}
  {}
  {}

begin{document}
 This is from~cite{Feynman2007_1_en}.
  printbibliography
end{document}

enter image description here

Correct answer by Ivan on March 17, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP