有人知道如何使用 titletoc 将一行 minitoc 中的章节标题数量限制为 3 或 4 个吗?因此,在下面的示例中,以“Kolyvagin Classes”开头的章节应位于第二行。
多谢!
\documentclass{scrreprt}
\usepackage[dvipsnames]{xcolor}
\usepackage{titletoc}
\titlecontents*{csection}[0pt]
{\centering\small\itshape}{}{}
{}[\space\textbullet\space]
\begin{document}
\chapter{A chapter}
\startcontents[chapters]
\printcontents[chapters]{c}{1}{}
\section{Large Degree Isogenies}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{Cassels Pairing}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{The Hidden Root Problem}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{Kolyvagin Classes}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{Pairing-Friendly Groups}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\end{document}
答案1
您可以使用\parshape
:
\documentclass{scrreprt}
\usepackage[dvipsnames]{xcolor}
\usepackage{titletoc}
\titlecontents*{csection}[0pt]
{\centering\small\itshape\parshape 1 0cm \dimexpr\linewidth-6em\relax}{}{}
{}[\space\textbullet~]
\begin{document}
\chapter{A chapter}
\startcontents[chapters]
\printcontents[chapters]{c}{1}{}
\section{Large Degree Isogenies}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{Cassels Pairing}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{The Hidden Root Problem}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{Kolyvagin Classes}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\section{Pairing-Friendly Groups}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\end{document}
还请注意,我将其改为\space\textbullet\space
保证\space\textbullet~
项目符号和其条目不会被换行符分隔。