[texhax] how to reset the footnote counter within subfootnotes and change the number style to \Alph for subfootnotes only

George Colpitts george.colpitts at gmail.com
Sat May 1 17:32:22 CEST 2010


Thanks Paul! That did it.

Thanks again
George


On Sat, May 1, 2010 at 10:57 AM, Paul Isambert <zappathustra at free.fr> wrote:
> Replace
>
> \renewcommand{\thefootnote}{\Alph{footnote}}%
>
> by
>
> \gdef\thefootnote{\Alph{footnote}}%
>
> The problem is you make your redefinition in a group, and so outside the old
> definition still holds.
> Strange, I thought LaTeX's \newcommand and friends were global.
>
> Paul
>
>
>
> George Colpitts a écrit :
>>
>> Here is my attempt to reset the footnote counter within subfootnotes
>> with number style \Alph, i.e I want footnote numbers to proceed
>> consecutively in the body of the text and subfootnotes to be indicated
>> by upper case letters starting from A for each footnote:
>>
>> \documentclass[12pt]{book}
>>
>>
>> %added to handle footnotes within footnotes and renumber
>> %starting with 0 in the subfootnote
>> \newcounter{myfootnotecounter}
>>
>> \newcommand{\saveFootnoteCounterStartWithAlph}{%
>> \setcounter{myfootnotecounter}{\value{footnote}}%
>> \setcounter{footnote}{0}%
>> \renewcommand{\thefootnote}{\Alph{footnote}}%
>> }
>>
>> \newcommand{\restoreFootnoteCounter}{%
>> \renewcommand{\thefootnote}{\arabic{footnote}}%
>> \setcounter{footnote}{\value{myfootnotecounter}}%
>> }
>>
>> \begin{document}
>>
>>
>> before the war\footnote{outer
>> footnote\saveFootnoteCounterStartWithAlph\footnotemark
>> here}\footnotetext{nested footnote}
>> after more\restoreFootnoteCounter{}\footnote{resume normal} stuff
>>
>> \end{document}
>>
>> This almost works but I get (using ^m to indicate footnote marker m):
>>
>>
>> before the war^1 after more^2 stuff
>>
>>
>>
>>
>> ------------------------------------------------------------------------------------
>> ^1outer footnote^Ahere
>> ^1nested footnote
>> ^2resume normal
>>
>>
>> but what I want is:
>>
>> before the war^1 after more^2 stuff
>>
>>
>>
>>
>> ------------------------------------------------------------------------------------
>> ^1outer footnote^Ahere
>> ^Anested footnote
>> ^2resume normal
>>
>>
>> i.e. the subnote footmarker should be A both where a footnote is
>> indicated and preceding the text of the subfootnote
>>
>> What am I doing wrong?
>>
>> Regards
>> George
>> _______________________________________________
>> TeX FAQ: http://www.tex.ac.uk/faq
>> Mailing list archives: http://tug.org/pipermail/texhax/
>> More links: http://tug.org/begin.html
>>
>> Automated subscription management: http://tug.org/mailman/listinfo/texhax
>> Human mailing list managers: postmaster at tug.org
>>
>
>



More information about the texhax mailing list