From: Thomas Pietrzak Date: Wed, 9 Feb 2022 10:58:06 +0000 (+0100) Subject: Moved from cite/bibtex to biblatex/biber X-Git-Tag: first-full-draft~67 X-Git-Url: https://git.thomaspietrzak.com/?a=commitdiff_plain;h=cbfdd567241a2b1182b55e8b3832c8cb0ce20f04;p=hdr.git Moved from cite/bibtex to biblatex/biber --- diff --git a/hdrmain.tex b/hdrmain.tex index e1bafe9..3cc05ba 100644 --- a/hdrmain.tex +++ b/hdrmain.tex @@ -31,8 +31,9 @@ \printindex - \bibliographystyle{plain-withurls}%alpha-fr} + %\bibliographystyle{plain-withurls}%alpha-fr} \interlinepenalty=10000 - \bibliography{biblio} + \printbibliography + %\bibliography{biblio} \end{document} \ No newline at end of file diff --git a/mystyle.sty b/mystyle.sty index feec63e..4fd1d36 100644 --- a/mystyle.sty +++ b/mystyle.sty @@ -72,7 +72,7 @@ %\usepackage[french]{babel} %\usepackage{icomma} %\usepackage{pdfpages} -\usepackage[nocompress]{cite} +%\usepackage[nocompress]{cite} \usepackage{xcolor} \definecolor{bulletcolor}{HTML}{992222} @@ -526,3 +526,33 @@ % Inverse search in pdf - use shift+cmd+click in Skim \synctex=1 + +% ---------------------------------------------------------------------- +% Bibliography with URLs + +\usepackage[style=numeric,sortcites,maxbibnames=6,url=false, doi=false, isbn=false,block=none,mincrossrefs=100]{biblatex} +\addbibresource{biblio.bib} + +\newbibmacro{string+doiurlisbn}[1]{% + \iffieldundef{doi}{% + \iffieldundef{url}{% + \iffieldundef{isbn}{% + \iffieldundef{issn}{% + #1% + }{% + \href{http://books.google.com/books?vid=ISSN\thefield{issn}}{#1}% + }% + }{% + \href{https://isbnsearch.org/isbn/\thefield{isbn}}{#1}% + }% + }{% + \href{\thefield{url}}{#1}% + }% + }{% + \href{http://dx.doi.org/\thefield{doi}}{#1}% + }% +} + +\DeclareFieldFormat{title}{\usebibmacro{string+doiurlisbn}{#1}} +\DeclareFieldFormat*{title}% + {\usebibmacro{string+doiurlisbn}{#1}}