
Considere el MWE:
\documentclass[12pt]{article}
\usepackage{imakeidx}
\makeindex
\newcommand\pagedot[1]{#1.}
\usepackage{idxlayout}
\begin{document}
This is a sentence.\index{\textbf{Corresponds to the first sentence}|pagedot}
This is another sentence.\index{\textbf{Corresponds to the second sentence}}
This is another sentence.\index{\textbf{Corresponds to the third sentence}}
\idxlayout{columns=1}
\printindex
\end{document}
que produce el Índice:
Como puede ver, agregué un punto después del número de página en la primera entrada invocando el comando recién definido pagedot
. Sin embargo, me gustaría hacer lo mismo con cada entrada de índice que pueda tener.
PREGUNTA: ¿Cómo puedo agregar automáticamente un punto después del último número de página de cada entrada del índice?
Gracias.
Respuesta1
Creo que la pregunta ya fue respondida en el otro post mediante comentarios. Hice un ejemplo práctico del uso del archivo de estilo ( *.ist
) para configurar la delim_t
clave "."
para generar un punto después de cada entrada después del último número de página.
\begin{filecontents*}{style.ist}
delim_t "."
\end{filecontents*}
\documentclass[12pt]{article}
\usepackage{imakeidx}
\makeindex[options=-s style.ist]
\usepackage{idxlayout}
\idxlayout{columns=1}
\begin{document}
This is a sentence.\index{\textbf{Corresponds to the first sentence}}
This is another sentence.\index{\textbf{Corresponds to the second sentence}}
This is another sentence.\index{\textbf{Corresponds to the third sentence}}
\clearpage
This is a sentence.\index{\textbf{Corresponds to the first sentence}}
This is another sentence.\index{\textbf{Corresponds to the second sentence}}
\clearpage
This is a sentence.\index{\textbf{Corresponds to the first sentence}}
\printindex
\end{document}