Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!mintaka!nuhub!nic!chaos.cs.brandeis.edu!SOMMER@BINAH.CC.BRANDEIS.EDU From: sommer@BINAH.CC.BRANDEIS.EDU Newsgroups: comp.text.tex Subject: Help with \thecounter (\the#1) please Message-ID: <00942636.865E6600@BINAH.CC.BRANDEIS.EDU> Date: 8 Jan 91 11:00:17 GMT Sender: @chaos.cs.brandeis.edu Reply-To: sommer@BINAH.CC.BRANDEIS.EDU Organization: Brandeis University Lines: 26 In reply to my \citem question, someone (sorry, lost his name) gave a really good suggestion that I tried to put into the macro below. Except: How do you get a parameter to be read as a string or token to become part of a command? In particular, I want to use \the#1 in the definition below, but even with \expandafter, \string, and all sorts of other things I don't really know about, I get the error that ! You can't use `the ' after \the. Actually, all I really need is the value of #1's counter whether using \the#1 or some other trick. So what's the trick? ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: \newcommand{\setfoot}[1]{\newcounter{#1}\setcounter{#1}{\value{footnote}}} \newcommand{\refoot}[1]{$^{\the#1}$} This is supposed to be a macro to let me save a footnote number and re-use it later.\footnote{text}\setfoot{label_name} [...] Later on, I can re-use it here,\refoot{label_name} but only if the def'n of refoot works! ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Eventually, I'd like to have something like: \renewcommand{\footnote}[2]{\footnote{#1}%\setfoot{#2} or %% a better version of \setfoot{#2} that won't crash or %% generate too many false counters if there is no {#2} } Per usual, THANK YOU VERY MUCH!