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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't want subsections to appear in the table of contents of my Lyx document. How do I turn them off? I went to Tools -> Settings -> Numbering & TOC, but it won't let me modify anything.

What should I do?

share|improve this question

migrated from stackoverflow.com Aug 30 '12 at 18:23

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Torbjørn T. Aug 30 '12 at 18:31
I guess you mean Document -> Settings… -> Numbering & TOC, right? What do you mean by “It won't let you modify anything”? You can't move the slide (is that the right word?) above the window? – clemens Aug 30 '12 at 19:08
up vote 4 down vote accepted

Can you use \setcounter{tocdepth}{2}? You would need to insert this as a LaTeX command via the Insert-> TeX menu, and I'm not entirely sure about the number, it might also be 1 or 3.

There is more information about document structure in LaTeX here.

share|improve this answer
I'd put it in the preamble (Document --> Settings --> LaTeX preamble). – Torbjørn T. Aug 30 '12 at 18:31
@TorbjørnT. Yes, that is a better idea. – Jonatan Aug 31 '12 at 19:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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