我正在尝试对齐索引中的一个项目。具体来说,该项目是使用 imakeidx 创建的。我最相关的代码如下:
\documentclass[a4paper,12pt]{book}
\usepackage{geometry}
\usepackage[nottoc,notindex]{tocbibind}% must go before imakeidx
\usepackage{imakeidx}
\makeindex[title=\'Indice de t\'erminos,intoc]
\geometry{a4paper,total={170mm,257mm},left=20mm,top=20mm}
\usepackage{fancyhdr}
\usepackage[all]{xy}
\pagestyle{headings}
\fancyhf{}
\fancyhead[LO]{\leftmark} \fancyhead[RE]{\rightmark}
\fancyhead[RO,LE]{\thepage}
\fancypagestyle{alfabetico}{
\fancyhead{}
% \fancyhead[LE,RO]{\thepage}
\fancyhead[RE,LO]{Index}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\renewcommand{\contentsname}{\'Indice}
\renewcommand{\chaptername}{Cap\'itulo}
\renewcommand{\appendixname}{Anexo}
\renewcommand{\bibname}{Bibliograf\'ia}
\renewcommand{\indexname}{\'Indice de t\'erminos}
\renewcommand{\figurename}{Figura}
\renewcommand{\listfigurename}{\'Indice de figuras}
\renewcommand{\tablename}{Tabla}
\renewcommand{\listtablename}{\'Indice de tablas}
\newtheorem{teorema}{Teorema}[section]
\newtheorem{corolario}[teorema]{Corolario}
\newtheorem{lema}[teorema]{Lema}
\newtheorem{lem}[teorema]{Lema}
\newtheorem{prop}[teorema]{Proposici\'on}
\newtheorem{ex}[teorema]{Ejemplo}
\newtheorem{cor}[teorema]{Corolario}
\newtheorem{thm}[teorema]{Teorema}
\newtheorem{rem}[teorema]{Nota}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{titlepage}
\tableofcontents
\newpage
\thispagestyle{empty}
\include{Libro_intro}
\pagestyle{headings} \pagestyle{fancy} \fancyhf{} \fancyhead[LO]{\leftmark} \fancyhead[RE]{\rightmark} \fancyhead[RO,LE]{\thepage}
\newpage
\chapter{...}
%%%%%%%%%%%%%%%%%% ANEXO
\newpage
\thispagestyle{empty}
{\small
\include{Libro_anexo}
\cleardoublepage}
\pagestyle{headings} \pagestyle{fancy} \fancyhf{} \fancyhead[LO]{\leftmark} \fancyhead[RE]{\rightmark} \fancyhead[RO,LE]{\thepage}
%%%%%%%%%%%%%%%%%% BIBLIOGRAFIA
\newpage
\pagestyle{empty}
{\small
\include{Libro_bibliografia}
\cleardoublepage}
%%%%%%%%%%%%%%%%%% ÍNDICE DE TÉRMINOS
\clearpage
\pagestyle{empty}
%\addcontentsline{toc}{chapter}{\'Indice de t\'erminos}
\printindex % Que ponga el índice aquí
%\printindex[people] %Añade índice de palabras
%%%%%%%%%%%%%%%%%% NOTACIÓN
\newpage
\pagestyle{empty}
{\small
\include{Libro_simbolos}
\cleardoublepage}
\end{document}
我得到了这个:
如我们所见,出现了重复的项目,并且 Bibliografía 和 Notación 项目的对齐方式不正确。请告诉我如何修复它。
提前致谢。