[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 16:21:21 CEST 2010


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


More information about the texhax mailing list