考虑一下代码
\documentclass{book}
\usepackage{imakeidx}
\let\cleardoublepage\clearpage
\makeindex
%\usepackage[font=normalsize]{idxlayout}
\usepackage{idxlayout}
\usepackage{xcolor}
\begin{document}
\Large
This sentence is to be indexed.\index{FAMOUS QUOTES@\textbf{FAMOUS QUOTES}!01@ \textbf{\textit{\color{red}{Ich bin ein Berliner}}} \textit{See also}, \textbf{DOUGHNUT}}
Another to be indexed.
\index{FAMOUS QUOTES@\textbf{FAMOUS QUOTES}!02@ \textbf{\textit{\color{red}{Denkansto{\ss}}}}}
\idxlayout{columns=1}
\printindex
\end{document}
生成索引:
我想放置“另请参阅油炸圈饼“在页码右侧稍微靠右的位置添加评论,与“Ich bin ein Berliner”在同一行。我该如何实现这一点?
谢谢。
答案1
|see
您想要一个不丢弃页码的版本:
\documentclass{book}
\usepackage{imakeidx}
\let\cleardoublepage\clearpage% hmmm
\makeindex
%\usepackage[font=normalsize]{idxlayout}
\usepackage{idxlayout}
\usepackage{xcolor}
\newcommand\seezz[2]{#2\quad\textit{see also} #1}
\begin{document}
\Large
This sentence is to be indexed.\index{FAMOUS QUOTES@\textbf{FAMOUS QUOTES}!01@ \textbf{\textit{\color{red}{Ich bin ein Berliner}}}|seezz{\textbf{DOUGHNUT}}}
Another to be indexed.
\index{FAMOUS QUOTES@\textbf{FAMOUS QUOTES}!02@ \textbf{\textit{\color{red}{Denkansto{\ss}}}}}
\idxlayout{columns=1}
\printindex
\end{document}