isbnsearch hyperrlinks on book titles with isbn entries
authorThomas Pietrzak <thomas.pietrzak@gmail.com>
Mon, 29 Nov 2021 16:55:51 +0000 (17:55 +0100)
committerThomas Pietrzak <thomas.pietrzak@gmail.com>
Mon, 29 Nov 2021 16:55:51 +0000 (17:55 +0100)
plain-withurls.bst

index f375ab3ffd1b10ca92b1ed19cade6cc08740c73d..74f56d961ad7f424c96804feddb41496cf4b66b2 100644 (file)
@@ -33,6 +33,7 @@ ENTRY
     year
     url %% NICOLAS
     doi %% TOM
+    isbn %% TOM
   }
   {}
   { label }
@@ -561,6 +562,17 @@ FUNCTION {doilink}
 if$
 }
 
+FUNCTION {isbnlink}
+{ duplicate$ empty$
+{ pop$ "" }
+{ isbn empty$
+    { skip$ }
+    { "\href{https://isbnsearch.org/isbn/" isbn * "}{" * swap$ * "}" * }
+  if$
+}
+if$
+}
+
 FUNCTION {article}
 { output.bibitem
   format.authors "author" output.check
@@ -628,15 +640,19 @@ FUNCTION {book}
   if$
   new.block
 
-  % NICOLAS
+  % NICOLAS TOM
   doi empty$
-    { url empty$
-        { format.btitle }
-        { "\href{" url * "}{" * format.btitle * "}" * }
+  { url empty$
+    { isbn empty$
+      { format.btitle}
+      { "\href{https://isbnsearch.org/isbn/" isbn * "}{" * format.btitle * "}" * }
       if$
     }
-    { "\href{http://doi.org/" doi * "}{" * format.btitle * "}" * }
+    { "\href{" url * "}{" * format.btitle * "}" * }
     if$
+  }
+  { "\href{http://doi.org/" doi * "}{" * format.btitle * "}" * }
+  if$
   "title" output.check
   %format.btitle "title" output.check