\autocite prenote 내부의 \index가 작동하지 않습니다.

\autocite prenote 내부의 \index가 작동하지 않습니다.
  1. 패키지 biblatex-chicagomakeidx.
  2. 모든 각주를 Notes 섹션에 푸시하기 위해 endnotes 패키지를 사용하고 있습니다.
  3. 모든 인용은 참고문헌 섹션에 표시됩니다. 이는 을 사용하여 달성됩니다 \autocite.
  4. 프로젝트에서 \autocite. 즉, 색인 섹션의 용어는 참고 섹션의 관련 페이지에 해당합니다. 예를 들어, 다음 예에서는 in이 나타나는 Notes 섹션의 페이지 번호와 함께 "clah"가 색인에 나타나야 합니다.

제가 직면하고 있는 문제는 \index사전 노트를 넣을 때 컴파일에 실패한다는 것입니다. 하지만 \index내부 포스트노트는 잘 작동합니다. 누군가 이 문제를 해결하는 방법을 명확히 해 주시겠습니까?

예를 들어 내가 할 때

\autocite[blah blah][clah clah\index{clah}]{a-citekey}

효과가있다! 하지만,

\autocite[blah blah\index{blah}][clah clah]{a-citekey}

컴파일에 실패합니다.

MWE는 다음과 같습니다.

\def\DevnagVersion{2.16}
\documentclass[11pt]{book}
\usepackage[a4paper,bindingoffset=0.2in,%
        left=1in,right=1in,top=1.2in,bottom=1.2in,%
        footskip=.5in]{geometry}

\usepackage{makeidx}
\usepackage{endnotes}
\let\footnote=\endnote

\usepackage[notes]{biblatex-chicago}
\renewcommand\nameyeardelim{, }
\addbibresource{question.bib}

\usepackage{float}
\usepackage{tabls}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage{cleveref}
\usepackage{parskip}
\usepackage{devanagari}
\usepackage{epigraph}

\usepackage{fancyhdr, blindtext}
\newcommand{\changefont}{%
\fontsize{8}{10}\selectfont
}
\fancyhf{}
\fancyhead[LE,RO]{\changefont \slshape \rightmark} %section
\fancyhead[RE,LO]{\changefont \slshape \leftmark} %chapter
\fancyfoot[C]{\changefont \thepage} %footer
\pagestyle{fancy}

\newcounter{ExCount}
\newcommand{\ex}[1]{
\stepcounter{ExCount}
\addcontentsline{toc}{section}{~~ \textit{Example \arabic{ExCount}: #1}}
\subsubsection*{~~ \textit{Example \arabic{ExCount}: #1}}
}
\newcommand{\he}[1]{
\addcontentsline{toc}{section}{#1}
\subsubsection*{#1}
}


\DeclareAutoCiteCommand{endfull}[f]{\footfullcite}{\footfullcites}
\ExecuteBibliographyOptions{autocite=endfull}


\sloppy

\title{A catchy title}
\author{Author One \and Author Two}

\makeindex

\begin{document}
\maketitle\newpage
\tableofcontents\newpage

\frontmatter

\chapter{Intro}

Testing the Wendy Doniger example from Penguin.\footcite[][p. 65]{doniger1999splitting}

This line is just to test index.\autocite[please refer to][for a detailed analysis{\index{analysis}}]{a-citekey}

% but this does not work
% This line is just to test index.\autocite[please   refer\index{refer} to][for a detailed analysis]{a-citekey}

\newpage
\def\enotesize{\footnotesize}  
\cleardoublepage 
\addcontentsline{toc}{chapter}{Notes}
\theendnotes


\addcontentsline{toc}{chapter}{Bibliography}
\renewcommand*{\bibfont}{\footnotesize}
\printbibliography

\cleardoublepage
\addcontentsline{toc}{chapter}{Index}    % adds Index to TOC
\printindex

\end{document}

bibfile 질문의 내용은 다음과 같습니다.bib

@book{doniger1999splitting,
  title =        {Splitting the difference: Gender and myth in ancient
              Greece and India},
  author =       {Doniger, Wendy},
  year =         {1999},
  publisher =    {University of Chicago Press},
  location =     {Chicago}
}


@InCollection{a-citekey,
  author =       {Author One},
  title =        {A long title: this is a really long title},
  booktitle =    {This is my book: proud to have written this},
  publisher =    {Elite Publishing House},
  year =         2006,
  editor =       {A bigshot editor},
  chapter =      7,
  url =          {http://www.example.com/a-link.html}
}

답변1

사용

\protect\index{<term>}

\index{<term>}사전 및 사후 노트 대신 .

스타일과 설정에 따라 biblatex사전 및 사후 메모 필드에 추가 서식이나 기타 매크로가 적용될 수 있습니다. 확장할 수 없는 매크로로 인해 문제가 발생하는 방식으로 필드 내용이 확장될 수 있습니다. 그렇기 때문에 언뜻 보기에 필요하지 않은 것처럼 보이더라도 \index사전 및 사후 메모에서 의 사용을 보호하는 것이 안전합니다.\protect

\documentclass{article}
\usepackage{makeidx}
\usepackage{biblatex-chicago}
\usepackage[colorlinks]{hyperref}

\makeindex

\addbibresource{biblatex-examples.bib}


\begin{document}
Testing the Wendy Doniger example from Penguin.\autocite[65]{sigfridsson}

This line is just to test index.\autocite[refer][analysis\protect\index{analysis}]{sigfridsson}

This line is just to test index.\autocite[refer\protect\index{refer}][analysis]{sigfridsson}

\printbibliography

\printindex
\end{document}

프리노트 의 경우 in biblatex-chicago으로 인해 문제가 발생합니다 .\MakeCapital

\DeclareFieldFormat{prenote}{\ifcapital{\MakeCapital{#1}}{#1}\isdot}

biblatex \index포스트노트에 표준을 적용하는 것은 문제가 있기 \mkpageprefix때문에\mknormrange

\DeclareFieldFormat{postnote}{\mkpageprefix[pagination][\mknormrange]{#1}}

MWE의 전체 색인

관련 정보