This patch should be ok, it adds the filename as a prefix, similar to
reftex. Of course the code is sort of primitive

Regards

Uwe 

-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
# HG changeset patch
# User Uwe Brauer <o...@mat.ucm.es>
# Date 1663259953 -7200
#      Thu Sep 15 18:39:13 2022 +0200
# Node ID 9e2d13e702d5ba0cff2cc593c44a0a04ee8f3bde
# Parent  4cf7e677f4a88a308e63da6af6812e708bfa88c3
Add filename as a prefix to the counter catchfilebetweentags

* style/catchfilebetweentags.el (LaTeX-env-catchfilebetweentags): Add
filename as a prefix to the counter.

diff --git a/style/catchfilebetweentags.el b/style/catchfilebetweentags.el
--- a/style/catchfilebetweentags.el
+++ b/style/catchfilebetweentags.el
@@ -56,17 +56,22 @@
         (let ((fn (string-to-number (match-string 1))))
           (when (> fn LaTeX-catchfilebetweentags-counter)
             (setq LaTeX-catchfilebetweentags-counter fn))))))
-  (setq LaTeX-catchfilebetweentags-counter
+  (setq LaTeX-catchfilebetweentags-counter 
         (1+ LaTeX-catchfilebetweentags-counter)))
 
 (defun LaTeX-env-catchfilebetweentags (_environment)
   "Insert a tag-skeleton defined by `LaTeX-catchfilebetweentags'.
 ENVIRONMENT is ignored."
-  (let* ((fn (when LaTeX-catchfilebetweentags-use-numeric-label
+(message "test with let")
+  (let* ((myfile (file-name-sans-extension (file-name-nondirectory (buffer-file-name (current-buffer)))))
+         (fn (when LaTeX-catchfilebetweentags-use-numeric-label
                (LaTeX-catchfilebetweentags-counter-inc)))
-         (tag  (TeX-read-string
+         (tag
+         (concat myfile ":"
+          (TeX-read-string
                 (if fn (format "Tag (default %s): " fn) "Tag: ")
                 nil nil (when fn (number-to-string fn)))))
+         (number-to-string fn))
     (unless (bolp)
       (newline)
       (delete-horizontal-space))

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to