3

Inside my document I have my chapters and sections declared like this:

\chapter{User Application - General}
    The sections in this chapter are not specific to either \puser{}s and \suser{} and apply to both.
    \section{Startup Screen}\input{userapp/startup}
    \section{Welcome Screen}\input{userapp/welcome}

This results in TeXstudio's structure pane displaying this hierarchy:

TeXstudio hierarchy

Note that the second and third sections are listed at the same hierarchy level as the chapter. Additionally, I have found that the first section is only displayed under the chapter, enabling the collapsible caret, if and only if the \chapter is immediately followed by some text - in this example The sections in this chapter....

Organising the document like this results in many chapters and many more sections all existing directly off the root node, destroying any hierarchy and making navigation throughout the document difficult as I need to scan the entire list, rather than rely on scanning hierarchy levels to find a section I'm looking for.

Is a way to make all the sections be displayed a level down under the chapter? Or, is there a better way I should be organising my document?

8

You can enable the advanced option:

Advanced Editor -> Structure Panel -> Keep Indentation of includes in structure tree

structure

However, personally, I would follow Stafford Willams suggestion to put the sections into the associated files. Subsections will be there anyway.

  • Nice, I used your answer too - navigation much easier now. – Stafford Williams Oct 13 '15 at 23:54
2

One option is to declare the sections in their associated files.

This immediately makes both the root file more simple, and simplifies the structure pane. The sections are no longer listed, but the files listed represent them.

\chapter{User Application - General}
    The sections in this chapter are not specific to either \puser{}s and \suser{} and apply to both.
    \input{userapp/startup}
    \input{userapp/welcome}
    \input{userapp/home}

enter image description here

Then you can apply Tim Hoffman's answer to push the files into child level hierarchy.

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.