2

I want to know how can I change the ToC entry of sections when using the titlesec package?

I am using the command \section[short title]{long title}, but the short title does not appear in the Table of Contents and it appears only in the header.

I have noticed that when I comment the line \usepackage{titlesec}, this problem does not exist!

  • 1
    And i want to know what the question is. Sorry, what is it you are asking for? Can you show us an example? – Johannes_B Jan 17 '15 at 15:04
  • You have to use the \titlecontents command from titletoc. What would you like to have exactly? – Bernard Jan 17 '15 at 15:05
  • I have already edited the original question. – Muhammad Jan 17 '15 at 15:12
  • 2
    Please click on the word »example« in my first comment. – Johannes_B Jan 17 '15 at 15:13
  • 2
    Are you using the [toctitles] option for titlesec? That will cause the behaviour you are describing. Remove that option and perhaps that will solve your problem. – Alan Munn Jan 17 '15 at 15:52
4

The titlesec package has an option [toctitles] which changes the behaviour of the optional argument of the sectioning commands so that the optional argument text appears only in the headers, but not in the table of contents. Since this is the behaviour you don't want, remove that option from the \usepackage{titlesec} command.

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.