#1777 Collapsing a subsection under a chapter also collapses everything to the next chapter

open
nobody
None
1
2016-06-11
2016-05-25
Anonymous
No

TeXstudio 2.10.8

\chapter{C}
\subsection{CollapseMe}
blabla
\section{Will vanish}
\chapter{C2}
\section{title}

Discussion

  • Tim Hoffmann

    Tim Hoffmann - 2016-05-26

    This does only happen if the subsection is not contained in a section, which IMO is an invalid structure. Not sure, we're gonna fix that.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2016-06-10

    so, won't fix ?

     
  • Tim Hoffmann

    Tim Hoffmann - 2016-06-11

    Cause: Structure elements can be interpreted as brackets that are only closed by a structure element of the same type or if an surrounding element is closed.

    In a regular case this would look like this:

    (chapter
      (section
        (subsection
    )(chapter
    

    section and subsection being implicitly closed by the closing of the chapter.

    Since this concept does not know about priorities among the different types of brackets, it behaves formally the same in the original example.

    (chapter
      (subsection
        (section
    )(chapter
    

    For internal reference: To fix this, one would at least have to take into account parentheses weights of non-matching brackets in QFoldedLineIterator::incrementUntilBlockEnd() and QNFADefinition::fold(), maybe in more places.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks