From d0f422dd73c40de3cd4fe132b1d1b5480966d09c Mon Sep 17 00:00:00 2001 From: "Sebastian J. Mielke" Date: Fri, 15 Aug 2014 23:12:53 +0200 Subject: [PATCH] =?UTF-8?q?Linkverwaltungssystem=20erkennt=20und=20vermeid?= =?UTF-8?q?et=20Dopplungen.=20Ich=20bin=20immernoch=20voll=20geflasht=20un?= =?UTF-8?q?d=20ehrlich=20=C3=BCberrascht,=20wie=20einfach=20das=20nun=20do?= =?UTF-8?q?ch=20tats=C3=A4chlich=20ging,=20sobald=20mir=20klar=20wurde,=20?= =?UTF-8?q?dass=20ich=20einfach=20Tokens=20als=20Makros=20speichern=20und?= =?UTF-8?q?=20dann=20ihre=20Existenz=20pr=C3=BCfen=20kann...=20Dieses=20Te?= =?UTF-8?q?X/eTeX/LaTeX,=20von=20dem=20immer=20alle=20reden,=20ist=20eine?= =?UTF-8?q?=20sehr,=20sehr=20lustige=20Sache!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nopanic.tex | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nopanic.tex b/nopanic.tex index 17e81d6..ef8f740 100644 --- a/nopanic.tex +++ b/nopanic.tex @@ -24,10 +24,16 @@ \newcommand\linklist{} \makeatletter \newcommand{\link}[1]{% - \protected@edef\@tmpkey{{\fontsize{13pt}{0}\selectfont\keys{\arabic{linkcounter}}}}% + \edef\tmptoken{\detokenize{#1}}% + \@ifundefined{nopanic@link@\tmptoken}{% + \protected@edef\@tmpkey{{\fontsize{13pt}{0}\selectfont\keys{\arabic{linkcounter}}}}% + \expandafter\global\expandafter\edef\csname nopanic@link@\tmptoken\endcsname{\arabic{linkcounter}}% + \expandafter\g@addto@macro\expandafter\linklist\expandafter{\@tmpkey & \url{#1}\\}% + \stepcounter{linkcounter}% + }{% + \protected@edef\@tmpkey{{\fontsize{13pt}{0}\selectfont\keys{\csname nopanic@link@\tmptoken\endcsname}}}% + }% \href{#1}{\@tmpkey}% - \expandafter\g@addto@macro\expandafter\linklist\expandafter{\@tmpkey & \url{#1}\\}% - \stepcounter{linkcounter}% } \makeatother