解决涉及 minitoc、twocolumns 和 abstract 的神秘错误

解决涉及 minitoc、twocolumns 和 abstract 的神秘错误

在以下 MWE 中,第 1 节的迷你目录出现在第 2 节中,而第 2 节缺少其迷你目录。

两个组件的结合会产生以下问题:

  1. 环境abstract
  2. twocolumn课程选择article

如果其中一个被注释掉,输出就会正确。

\documentclass[twocolumn]{article}
%\documentclass{article}
\usepackage{minitoc}
\dosecttoc
\begin{document}

 % Comment out to get minitoc do the right thing
\begin{abstract}and god said let there be light and there was light\end{abstract}
    \tableofcontents
\section{Pentateuch}
\secttoc

\subsection{Genesis}
In the beginning God created the heaven and the earth.
\subsection{Exodus}
Now these are the names of the children of Israel, which came into Egypt; every man and his household came with Jacob.
\subsection{Leviticus}
And the Lord called unto Moses, and spake unto him out of the tabernacle of the congregation, saying,
\subsection{Numbers}
And the Lord spake unto Moses in the wilderness of Sinai, in the tabernacle of the congregation, on the first day of the second month, in the second year after they were come out of the land of Egypt, saying,
\subsection{Deuteronomy}
These be the words which Moses spake unto all Israel on this side Jordan in the wilderness, in the plain over against the Red sea, between Paran, and Tophel, and Laban, and Hazeroth, and Dizahab.

\section{Gospels}
    \secttoc

\subsection{Matthew}
The book of the generation of Jesus Christ, the son of David, the son of Abraham.
\subsection{Mark}
The beginning of the gospel of Jesus Christ, the Son of God;
\subsection{Luke}
 Forasmuch as many have taken in hand to set forth in order a declaration of those things which are most surely believed among us,
\subsection{John}
In the beginning was the Word, and the Word was with God, and the Word was God.

\end{document}

输出显示了需要解决的错误 上述输出

abstract注释掉 该行的输出注释掉 <code>abstract</code> 行后的输出

单列版本: 单列版本

答案1

在双列模式下abstract插入一个\section*{abstractname},这会扰乱计数器minitoc。您可以减少计数器:

\begin{abstract}
\decrementstc
and god said let there be light and there was light
\end{abstract}

(在我看来这似乎是一个错误,但是 minitoc 文档中关于带星号部分的描述相当令人困惑。)

相关内容