Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!primerd!bcat1!kjg From: kjg@bcat1.prime.com (Ken Gartner) Newsgroups: comp.text.tex Subject: Redefining a macro in terms of itself Message-ID: <1991Jan15.061451@bcat1.prime.com> Date: 15 Jan 91 11:14:51 GMT Reply-To: kjg@s49.prime.com Organization: Prime Computer Lines: 43 Nntp-Posting-Host: bcat1.prime.com While trying to create a private LaTeX style file, I stumbled while attempting to redefine \tableofcontents and \marginpar in terms of themselves. This is what my intention is: PSEUDOCODE \renewcommand{\tableofcontents}{\parskip 0in \tableofcontents} \renewcommand{\marginpar}{#1}{\scriptsize \marginpar{#1}} Unfortunately (for me) is that renewcommand seems to do the assignment such that the first use of the newly defined command endlessly loops when used. I think the \let is what I want since there is an indication that it copies the current definition -- unfortunately (again for me) the following generate some noise about % Try to get table of contents tighter for article: \let\k1\tableofcontents \renewcommand{\tableofcontents}{\parskip 0in \k1} ! Missing \begin{document}. \@latexerr ...for immediate help.}\errmessage {#1} ... l.53 \let\k1\tableofcontents ? ^D I would be most appreciative if someone could give pointers on profitable use of \let including use with macros that take arguments. I am not any kind of [*]TeXpert at this point so try to be gentle ... kjg -- Kenneth J. Gartner | kjg@s49.prime.com Prime Computer (CPU Group) | 1-508-620-2800 x3287 500 Old Connecticut Path, MS 10A-04 Framingham Mass, 01701 "Cursedbehewho thinks my opinions reflect Prime Official policy"