From 1d71c7432fa83c68e5066bcade53cce011aaf57e Mon Sep 17 00:00:00 2001 From: flukx Date: Tue, 7 Nov 2023 17:29:25 +0100 Subject: [PATCH] hide (redundant) urls --- tex/header/stdmath.sty | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tex/header/stdmath.sty b/tex/header/stdmath.sty index 064db00..bf7b711 100644 --- a/tex/header/stdmath.sty +++ b/tex/header/stdmath.sty @@ -110,6 +110,17 @@ exponent-product=\cdot]{siunitx} % provides nice typesetting for units and numb sorting=nty]{biblatex} \addbibresource{\bibfile} \AtEndDocument{\printbibliography[heading=bibintoc]} +% from https://tex.stackexchange.com/a/154875: +% hides URLs if DOI exists because often the url is just the DOI-URL +% just longer without extra information +\DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[fieldsource=doi,final] + \step[fieldset=url,null] + } + } +} % to allow links to break over lines at hyphens % must be loaded before hyperref because hyperref loads package url