Moved from cite/bibtex to biblatex/biber
authorThomas Pietrzak <thomas.pietrzak@gmail.com>
Wed, 9 Feb 2022 10:58:06 +0000 (11:58 +0100)
committerThomas Pietrzak <thomas.pietrzak@gmail.com>
Wed, 9 Feb 2022 10:58:06 +0000 (11:58 +0100)
hdrmain.tex
mystyle.sty

index e1bafe9959230c6fe0e8dfe1114150a3ded86cc5..3cc05baaa55942e315996f3c9efeca8a5fb49198 100644 (file)
@@ -31,8 +31,9 @@
 \r
   \printindex\r
 \r
-  \bibliographystyle{plain-withurls}%alpha-fr}\r
+  %\bibliographystyle{plain-withurls}%alpha-fr}\r
   \interlinepenalty=10000\r
-  \bibliography{biblio}\r
+  \printbibliography\r
+  %\bibliography{biblio}\r
 \r
 \end{document}
\ No newline at end of file
index feec63e59e6b27816bca1eb49616f935910a1d13..4fd1d36b0eeb94dd4c7153aff6c85004cf98d089 100644 (file)
@@ -72,7 +72,7 @@
 %\usepackage[french]{babel}
 %\usepackage{icomma}
 %\usepackage{pdfpages}
-\usepackage[nocompress]{cite}
+%\usepackage[nocompress]{cite}
 
 \usepackage{xcolor}
 \definecolor{bulletcolor}{HTML}{992222}
 % 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}}