diff --git a/src/quiver.mjs b/src/quiver.mjs
index 4c303d9a4a..59fc5c637c 100644
--- a/src/quiver.mjs
+++ b/src/quiver.mjs
@@ -610,7 +610,9 @@
             // `tikzcd` environment.
             let tikzcd = `\\begin{tikzcd}${
                 diagram_options.length > 0 ? `[${diagram_options.join(",")}]` : ""
-            }\n${
+            }\n% ${
+	      QuiverImportExport.base64.export(quiver, settings, options, definitions).data
+	    }\n${
                 output.length > 0 ? `${
                     output.split("\n").map(line => `\t${line}`).join("\n")
                 }\n` : ""
@@ -622,9 +624,7 @@
                 tikzcd = `\\documentclass[tikz]{standalone}\n\\usepackage{quiver}\n\\begin{document}\n${tikzcd}\n\\end{document}`;
             }
             // URL.
-            return `% ${
-                QuiverImportExport.base64.export(quiver, settings, options, definitions).data
-            }\n${tikzcd}`;
+            return tikzcd;
         };
 
         // Early exit for empty quivers.
