The Latex toc is structured by default on several lines: each line of text represents the single chapter, or section, or subsection, while the paragraph indents distinguish the various levels of the parts of the document.
However, for my next paper I need to write a toc in a single paragraph (with the omission of the page numbers of the individual parts mentioned). If I write an [article], I would need in this toc the section to distinguish itself from the subsections because it is written in bold type. I enclose the photo of the result that I would like to obtain.
Naturally, the entries of this index in a single paragraph should be linkable, in the same way as those of the toc by default, with the hyperref package.
Moreover, such an index model would also be perfect for [books], within each chapter, compared to individual minitocs.
Obviously, the decorations (like the two lines in the image) I can easily make them myself. What I need is the code to set the toc in a single paragraph, with section in bold and subsection in normal text.
\usepackage{titletoc} \titlecontents*{section}[0cm]{}{\bfseries\thecontentslabel\ }{}{}[A][][] \titlecontents*{subsection}[0cm]{}{\thecontentslabel\ \itshape}{}{}[:\ ][;\ ][.\ ]