3

Anyone know how to limit number of section titles, for example to 3 or 4, in one line minitoc using titletoc? So, in example bellow, sections starting with "Kolyvagin Classes" should be in the second line.

Thanks a lot!

\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}
3

You can use \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}

enter image description here

Notice also that I changed \space\textbullet\space to \space\textbullet~ to guarantee that a bullet and its entry won't be separated by a line break.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.