중첩된 각주를 회고록과 결합하는 방법은 무엇입니까?

중첩된 각주를 회고록과 결합하는 방법은 무엇입니까?

다음과 같이 단일 순서로 나타나는 중첩된 각주를 구현하고 싶습니다.중첩된 각주회고록 수업과 함께. 해당 질문에 대한 답변으로 Werner가 제공한 솔루션은 언뜻 보기에는 효과가 있지만 기사 클래스의 정의를 기반으로 하기 때문에 회고록의 여러 각주 기능이 제거됩니다( 와 유사 \usepackage[multiple]{footmisc}). 아래 mwe는 문제를 보여줍니다. 각주 표시의 올바른 형식은 \footnotemark및 의 재정의를 주석 처리하여 확인할 수 있습니다 \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 labeled `3'}%
\footnote{Another footnote}%

\end{document}

출력의 본문과 첫 번째 각주 모두에 잘못된 형식의 각주 표시가 있습니다. mwe 출력

두 개의 \renewcommands가 없으면 각주에 번호를 잘못 매기는 기본 출력을 얻습니다. 여기에 이미지 설명을 입력하세요

회고록에 있는 다른 매크로도 수정해야 한다고 생각 \m@makefootnotemark하지만 그 정의(및 사용법)가 너무 복잡해서 유추를 통해 필요한 변경 사항을 파악할 수 없습니다.

답변1

이것이 이유인지 확실하지 않습니다. 나는 \label명령이 여러 각주 입력을 엉망으로 만들기 위해 공간을 도입한다고 생각합니다 . 이것은 실제 예입니다:

\documentclass{memoir}
\newcounter{myfn}
\newcounter{tpmyfn}
\makeatletter
\def\footnotemark{\@ifnextchar [\@xfootnotemark%
{\advance\c@myfn1\c@tpmyfn\numexpr\value{myfn}+\value{footnote}%
\protected@xdef\@thefnmark{\thetpmyfn}%
\@footnotemark}}
      
\def\footnotetext{%
     \@ifnextchar [\@xfootnotenext%
     {\stepcounter{footnote}\c@myfn0\protected@xdef\@thefnmark{\thempfn}%
    \@footnotetext}}
\makeatother
\begin{document}

This text has footnotes%
\footnote{Which contains sub-footnotes\footnotemark\footnotemark that should be marked clearly as separate}%
\footnotetext{This footnote should be labeled `2'}%
\footnotetext{This footnote should be labeled `3'}%
\footnote{Another footnote}%
\end{document}

여기에 이미지 설명을 입력하세요 여기에 이미지 설명을 입력하세요

관련 정보