I want to implement the nested footnotes appearing in a single sequence as in Nested footnotes with the memoir class. While the solution given by Werner as an answer to that question does work at first glance, but because it is based on the definitions in the article class it eliminates the multiple footnote feature in memoir (similar to \usepackage[multiple]{footmisc}). The mwe below shows the problem. The correct formatting of the footnote marks can be seen by commenting out the redefinitions of \footnotemark and \footnotetext.
\documentclass{memoir}
\usepackage{letltxmacro}
\newcounter{fnmarkcntr}
\newcounter{fntextcntr}
\makeatletter
\renewcommand{\footnotemark}{%
@ifnextchar[@xfootnotemark
{\stepcounter{fnmarkcntr}%
\refstepcounter{footnote}\label{footnotemark\thefnmarkcntr}%
\protected@xdef@thefnmark{\thefootnote}%
@footnotemark}}
\makeatother
\LetLtxMacro{\oldfootnotetext}{\footnotetext}
\renewcommand{\footnotetext}[1]{%
\refstepcounter{fntextcntr}
\oldfootnotetext[\ref{footnotemark\thefntextcntr}]{#1}
}
\begin{document}
This text has footnotes%
\footnote{Which contains sub-footnotes\footnotemark% \multfootsep
\footnotemark that should be marked clearly as separate}%
\footnotetext{This footnote should be labeled 2'}% \footnotetext{This footnote should be labeled3'}%
\footnote{Another footnote}%
\end{document}
The output has badly formatted footnote marks, both in the main text and in the first footnote:

Without the two \renewcommands we get the default output which numbers the footnotes wrong:

I think \m@makefootnotemark (and maybe other macros) from memoir needs to be modified but its definition (and usage) is too complicated for me to figure out the necessary change by analogy.


\documentclassfrommemoirtoarticle. The result looked bad to me. Are you sure about what you want to happen? But perhaps I am completely confused. – Peter Wilson May 14 '22 at 18:29memoirtoarticle. But removing/commenting out the two\renewcommandsshows what I want it to look like (except for the incorrect numbering). – ronno May 15 '22 at 14:14memoirtoarticleboth produce output that's like the first screenshot (ignoring the difference in margins and page number placement), whereas I want the appearance to be more like the second screenshot except for the incorrect numbering. – ronno May 16 '22 at 20:51\renew...commands there was no difference betweenmemoirandarticleoutput. Without the\renew...commands thememoiroutput put a comma between between multiple footnote markers (like1,4or2,3) but thearticleoutput just strung multiple footnote markers together (like14or23). Good luck. – Peter Wilson May 18 '22 at 17:37