
참고: 다음과 같은 인덱스 생성 패키지에 대한 답변이 도움이 될 것입니다.splitidx
또는 기본값makeidx
.
나는 색인 페이지에 설명 텍스트가 있는 일부 책을 본 적이 있습니다.색인제목이지만 실제 색인 목록 앞에 있습니다. .idx
또는 파일을 수동으로 수정하지 않고 이 작업을 수행할 수 있는 방법은 무엇입니까 .ind
? 명령이 printindex
비참하게도 불가능한 것 같습니다.
다음은 적절하지만 유감스럽게도 작은 예입니다.
다음은 패키지를 사용하는 MWE입니다 makeidx
.
\documentclass[12pt]{book}
\usepackage{makeidx}\makeindex
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\index{1@One makeidx entry!With a subentry}
%How to put text on the following index page?
\printindex
%Be sure to run: makeindex <filename>
\end{document}
다음은 패키지를 사용하고 두 개의 인덱스를 생성하는 MWE입니다 splitidx
.
\documentclass[12pt]{book}
\usepackage[split]{splitidx}\makeindex
\newindex{firstindex}
\newindex{secondindex}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\sindex[firstindex]{1@One splitindex entry!Using firstindex}
\sindex[secondindex]{Another splitindex entry!Using secondindex}
%How to put text on the following index pages?
\printindex[firstindex][A splitindex: firstindex]
\printindex[secondindex][A splitindex: secondindex]
%Be sure to run: makeindex <filename>-firstindex; makeindex <filename>-secondindex
\end{document}
답변1
패키지를 사용하세요imakeidx
대신에 makeidx
. 이 패키지는 더욱 강력하며 다음을 허용합니다.
여러 열의 색인
\makeindex[columns=n]
다음 날짜 이전의 텍스트색인그리고 그 이후제목와 함께
\indexprologue{Text ...}
. 이 명령은 정확히 of 앞에 와야 합니다\printindex
.자동으로 실행됩니다
makeindex
.splitindex
Markus Kohm의 스크립트를 지원합니다 .해당 항목에 설명된 기타 옵션선적 서류 비치.
예시 MWE
\documentclass[12pt]{book}
\usepackage{imakeidx}\makeindex
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\index{1@One entry!With a subentry}~\index{a@Other entry}
\indexprologue{\noindent How to put text on the following index page?}
\printindex
\end{document}
이 패키지를 사용하면 여러 인덱스를 생성할 수도 있습니다. 이 경우 옵션을 사용하여 패키지를 로드 하고 and ( 및 이 인덱스 이름인 경우) 에서 splitindex
실행 해야 합니다. 또는 자동으로 또는 옵션을 사용 하여 실행합니다 .makeindex
<filename>-firstindex
<filename>-secondindex
firstindex
secondindex
pdflatex
--enable-write18
-shell-escape
메모:에서와 같이 모든 인덱스에 이름을 지정할 필요는 없습니다 splitidx
. 간단히 "기본" 색인을 이름 없이 두고 다른 색인에는 이름을 지정하면 됩니다. 그리고 \makeindex
(인수 없이)를 사용하십시오.기본인덱스) 및 \makeindex[name=...,title=...]
기타 인덱스의 경우. 예시를 관찰하세요
\documentclass[12pt]{book}
\usepackage[splitindex]{imakeidx}
\makeindex
\makeindex[name=secondindex,title=Second Index]
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\index{1@One splitindex entry!Using firstindex}
\index[secondindex]{Another splitindex entry!Using secondindex}
\indexprologue{\noindent How to put text on the following index pages?}
\printindex
\indexprologue{\noindent How to put text on the following index pages in the second index?}
\printindex[secondindex]
%Be sure to run: makeindex <filename>-splitindex; makeindex <filename>-secondindex
%Only if you didn't run pdflatex with the `--enable-write18` option.
\end{document}
<filename>-splitindex.idx
따라서 다음을 위한 파일이 생성됩니다.기본색인과 <filename>-secondindex.idx
두 번째 색인입니다. 그만큼기본색인은 \indexname
색인 제목으로 사용됩니다.
달리다
pdflatex --enable-write18 <filename>
이 작업은 자동으로 수행됩니다.
\documentclass[12pt]{book}
\usepackage[splitindex]{imakeidx}
\makeindex[name=firstindex,title=First Index]
\makeindex[name=secondindex,title=Second Index]
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\index[firstindex]{1@One splitindex entry!Using firstindex}
\index[secondindex]{Another splitindex entry!Using secondindex}
\indexprologue{\noindent How to put text on the following index pages?}
\printindex[firstindex]
\indexprologue{\noindent How to put text on the following index pages in the second index?}
\printindex[secondindex]
%Be sure to run: makeindex <filename>-firstindex; makeindex <filename>-secondindex
\end{document}