From e20666ffbf87d8d85a85b8d1e446ba55a66a7e36 Mon Sep 17 00:00:00 2001
From: Ian Jauslin <ian.jauslin@roma1.infn.it>
Date: Mon, 19 Oct 2015 14:01:35 +0000
Subject: Prevent labels from overwriting commands

---
 iansecs.sty | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'iansecs.sty')

diff --git a/iansecs.sty b/iansecs.sty
index 125659f..e5e4b00 100644
--- a/iansecs.sty
+++ b/iansecs.sty
@@ -74,15 +74,15 @@
 %% define a label for the latest tag
 %% label defines a command containing the string stored in \tag
 \AtBeginDocument{
-  \def\label#1{\expandafter\outdef{#1}{\safe\tag}}
+  \def\label#1{\expandafter\outdef{label@#1}{\safe\tag}}
 
 \def\ref#1{%
 % check whether the label is defined (hyperlink runs into errors if this check is ommitted)
-\ifcsname #1@hl\endcsname%
-\hyperlink{ln.\csname #1@hl\endcsname}{\safe\csname #1\endcsname}%
+\ifcsname label@#1@hl\endcsname%
+\hyperlink{ln.\csname label@#1@hl\endcsname}{\safe\csname label@#1\endcsname}%
 \else%
-\ifcsname #1\endcsname%
-\csname #1\endcsname%
+\ifcsname label@#1\endcsname%
+\csname label@#1\endcsname%
 \else%
 {\bf ??}%
 \fi%
-- 
cgit v1.2.3-54-g00ecf

