
이전에 미주를 참조하기 위해 패키지 \footref
의 명령을 사용한 적이 있습니다 . footmisc
이것은 패키지와 함께 잘 작동했습니다 endnotes
.
\documentclass{article}
\usepackage{footmisc,endnotes}
\renewcommand{\footnote}{\endnote}
\begin{document}
\noindent Here is some text.\footnote{And here is an endnote.\label{foot.first}}\\
Here is more text.\footnote{And here is another endnote.\label{foot.second}}\\
Here is my final sentence.\footref{foot.first}\textsuperscript{,}\footref{foot.second}
\theendnotes
\end{document}
하지만 이제 패키지로 전환했는데 enotez
더 이상 제대로 작동하지 않습니다. 아래 MWE에서는 첫 번째 미주에 대한 참조가 대신 두 번째 미주를 나타냅니다.
\documentclass{article}
\usepackage{footmisc,enotez}
\renewcommand{\footnote}{\endnote}
\begin{document}
\noindent Here is some text.\footnote{And here is an endnote.\label{foot.first}}\\
Here is more text.\footnote{And here is another endnote.\label{foot.second}}\\
Here is my final sentence.\footref{foot.first}\textsuperscript{,}\footref{foot.second}
\printendnotes
\end{document}
enotez
올바른 미주를 참조하려면 어떻게 해야 합니까 ?
답변1
enotez
명령 은 \label
미주 텍스트 외부에 있어야 합니다. 섹션 3.1의 마지막 예를 참조하세요.
기능이 포함된 명령 footmisc
을 정의할 수 있으므로 필요하지 않습니다 .\footref
enotez
\documentclass{article}
\usepackage{enotez}
\renewcommand{\footnote}{\endnote}
\newcommand{\footref}[1]{%
\enotezwritemark{\enmarkstyle\ref{#1}}%
}
\begin{document}
\noindent Here is some text.\footnote{And here is an endnote.}\label{foot.first}\\
Here is more text.\footnote{And here is another endnote.}\label{foot.second}\\
Here is my final sentence.\footref{foot.first}\textsuperscript{,}\footref{foot.second}
\printendnotes
\end{document}
multiple 인스턴스가 여러 개인 경우 \footref
축약된 구문을 고려해 볼 수 있습니다.
\documentclass{article}
\usepackage{enotez}
\renewcommand{\footnote}{\endnote}
\ExplSyntaxOn
\NewDocumentCommand{\footref}{m}
{
\sverre_footref:n { #1 }
}
\seq_new:N \l_sverre_footrefs_seq
\cs_new_protected:Npn \sverre_footref:n #1
{
\seq_clear:N \l_sverre_footrefs_seq
\clist_map_inline:nn { #1 }
{
\seq_put_right:Nn \l_sverre_footrefs_seq
{ \enotezwritemark{\enmarkstyle\ref{##1}} }
}
\seq_use:Nn \l_sverre_footrefs_seq { \textsuperscript{,} }
}
\ExplSyntaxOff
\begin{document}
\noindent Here is some text.\footnote{And here is an endnote.}\label{foot.first}\\
Here is more text.\footnote{And here is another endnote.}\label{foot.second}\\
Here is my final sentence.\footref{foot.first,foot.second}
\printendnotes
\end{document}
답변2
또는 (2022년부터) 대신 일반적인/논리적 방식으로 작동하므로 패키지에 원하는 추가 상호 참조 기능이 있으므로 postnotes
대신 사용하세요. \label{...}
매뉴얼에서 인용 :
포스트노트를 사용한 상호 참조는 매우 표준적인 방식으로 작동합니다. 즉, 레이블을 설정하고 참조합니다. 그러나 메모에 라벨을 설정하는 방법에는 두 가지가 있습니다.
label
옵션을 사용하여 라벨을 설정하거나 메모 내용의 일부로\postnote
표준을 사용하여 직접 설정할 수 있습니다 .\label
둘 다 유효하지만 동일하지 않으며 의미가 다르므로 다르게 동작합니다. [¶] 옵션으로 설정된 라벨이label
있는 곳에 설정됩니다\postnote
.\label
노트 내용에 설정된 라벨은 저장되고 이 내용이 에서 조판될 때만 확장됩니다\printpostnotes
. 간단히 말해서label
옵션은 "마크"에 속하고\label
콘텐츠의 세트는 "텍스트"에 속합니다.
\documentclass{article}
\usepackage{footmisc,postnotes}
\renewcommand{\footnote}{\postnote}
\begin{document}
\noindent Here is some text.\footnote{And here is an endnote.\label{foot.first}}\\
Here is more text.\footnote{And here is another endnote.\label{foot.second}}\\
Here is my final sentence.\footref{foot.first}\textsuperscript{,}\footref{foot.second}
\printpostnotes
\end{document}