# tocloft recipe to simulate the titlecontents* behaviour of titletoc [closed]

I can't use titletoc, since there are incompatibilities between this package and others that I am using. However, tocloft works fine. I would like to simulate the \titlecontents* effect using tocloft. How can I do this (main problem, of course, being having all the entries on the same line)?

\documentclass{report}
\usepackage{lipsum}
\usepackage{titletoc}
\titlecontents*{section}
[1.5em]
{\small}
{\thecontentslabel. }
{}
{, \thecontentspage} [\ \textbullet\ ][.]
\begin{document}
\tableofcontents
\chapter{A chapter}
\section{A section}
\lipsum
\section{Another section}
\lipsum
\section{Yet another section}
\lipsum
\section{And another section}
\end{document}


EDIT: When I try to run titletoc on my file (without providing the class, which is quite long to analyse, it is meaningless to put a MWE), I get an error code like this one:

\GenericError  ...
\endgroup  \addpenalty ...kipb \fi \fi \fi \else \@noitemerr
\fi  \l@chapterifnoframe ...ddpenalty {-\@highpenalty }
\vskip 1.0em \@plus \p@ \s... l.14 ...ine {chapter}{\numberline {B}Chapter 2}{5}


It is of course highly unspecific, and the l.14 in my code is a line not linked to any kind of title or table of content matter... That is why I leaned toward finding a way with tocloft...

EDIT 2 : here is a link to the class (which is book-derived): http://www.loria.fr/~roegel/TeX/TL.tar.gz. I warn you, this might not be easy to see where it fails...

EDIT 3 : The problem only appears when I am using this on subsection or subsubsection... It works fine with section. Any idea why?

-

## closed as too localized by Marco Daniel, Joseph Wright♦Jan 7 '12 at 21:54

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Can you add a minimal working example please? –  Marco Daniel Nov 6 '11 at 15:30
@Marco I think Martigan is assuming some familiarity with titletoc. I've added a MWE to make the question clearer. –  Alan Munn Nov 6 '11 at 22:52
I don't think this is very easy to do with tocloft at all. Perhaps you could explain the problems you encountered with titletoc? Maybe there are ways around them? –  Alan Munn Nov 7 '11 at 1:31
Thank you Alan for the clarification. It is exactly the effect I am aiming to. The problem with titletoc is a very tricky one to analyse, since I am using a special class (book-based) with many special custom macro, and that I did not make. I had been trying to find the issue, but to no avail for now. Since tocloft is working perfectly, I wanted to try it. I will try to post something about the issue encountered with titletoc, for it might give advanced users an inkling of what could be the cause, but I am not very confident. –  Martigan Nov 7 '11 at 11:57
@Martigan when I compile the example above using the thloria class, it compiles without error. So the error you are getting isn't caused directly by the class+titletoc. To solve this problem you'll need to gradually add packages to this example to see when things break. –  Alan Munn Nov 8 '11 at 12:49