Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my LaTeX template, I define the chapter and section TOC entry with the titletoc package:

\titlecontents{chapter}[0pt]{\vspace{.1\baselineskip}\bfseries}
    {\thecontentslabel\hspace{2.8mm}}{}
    {\hspace{.5em}\titlerule*[5pt]{$\cdot$}\contentspage}

But I don't know how to apply this to the listing environment.

I guess it would be:

\titlecontents{listing}[0pt]{\vspace{.1\baselineskip}\bfseries}
    {\thecontentslabel\hspace{2.8mm}}{}
    {\hspace{.5em}\titlerule*[5pt]{$\cdot$}\contentspage}

But I am wrong. Does anyone know how to do that? I need to ensure that the TOC entry style is consistent.

share|improve this question
    
There is no relation of toc and listings What do you want to achieve? Please provide a minimal working example? –  Marco Daniel Aug 4 '12 at 16:55
    
Just use \contentsuse{lstlisting}{lol} and then \titlecontents{lstlisting}... should work. –  Leo Liu Mar 15 '13 at 17:16
    
There are also some other questions on this topic, e.g. lstlistoflistings font, Customizing the list of listings generated by \lstlistoflistings?. This question can be closed as a duplicate, but not as "too localized". –  Leo Liu Mar 15 '13 at 17:17
add comment

closed as too localized by Joseph Wright Sep 3 '12 at 8:08

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.

Browse other questions tagged or ask your own question.