imakeidx 包 - 如何在两列文档中插入索引?

imakeidx 包 - 如何在两列文档中插入索引?
\documentclass[10pt, a4paper, twocolumn]{article}

当索引插入到文档末尾时,它会破坏两列布局,当插入到开头时,它不会出现。

有办法解决吗?

以下是示例

\documentclass[10pt, a4paper, twocolumn]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage[russian, english]{babel}
\usepackage{graphicx}
\usepackage[bookmarks]{hyperref}
\usepackage{imakeidx}
\makeindex

\graphicspath{{images/}}

\usepackage{lipsum}

\author{Alex Ushakov}
\title{Latex Demo Document}
\date{\today}

\begin{document}

\maketitle
\tableofcontents
% \printbibliography
\listoffigures
\listoftables
% \makeglossaries

\section{demo0}
\lipsum

\begin{figure}[h!]
\centering
\caption{test}
\includegraphics[width=0.8\columnwidth]{demo.jpg}
\end{figure}

\subsection{subdemo0}
\lipsum

\begin{table}[h!]
\centering
\caption{test}
\begin{tabular}{ |c|c|c| }
    \hline
    cell & cell & cell \\
    cell & cell & cell \\
    cell & cell & cell \\
    \hline
\end{tabular}
\end{table}

\subsection{subdemo1}
\lipsum
This is index test\index{test} sentence\index{sentence}.

\section{demo1}
\lipsum

\subsection{subdemo0}
\lipsum

\subsection{subdemo1}
\lipsum

\printindex
\end{document}

相关内容