Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Structure view breaks at \begingroup in...

TXS - Help
  • elwood151

    I recently noticed a problem with the structure (tree) view, where from a
    certain point in the document all subsubsections where inserted at the highest
    level in the document tree (like chapters).

    I finally found that this seems to be caused by a \begingroup .... \endgroup
    command used in the source code.

    Does anyone else have the same problem or can reproduce it?
    I'm using texstudio SVN2.2 (provided here:
    ) on MacOS X 10.6.

  • elwood151

    can nobody help?
    could somebody test, if the problem is the same on other platforms?

  • can you provide a tex-file which causes this error ?

  • elwood151

    Thank you very much for your reply!
    I'm sorry - I wonder how I could be sure that the begingroup command was the
    culprit as I was not able to reproduce the behavior (at first).

    It seems to be due to an "outsourced" tex file which is integrated via
    \input{} or \include{},
    this seems to move all following headings in the structure view (until the
    next chapter) to chapter level.

    When you remove the lines \input{...} one by one (beginning with the first
    one), you can should the structure view change successively

        \documentclass[11pt, a4paper]{scrbook}
    %   \usepackage{ifthen, paralist, tabularx, enumitem}
    \chapter{Chap 1}
    \section{Sec 1.1}
    \section{Sec 1.2}
    \subsection{Sec 1.2.1}
    \subsection{Sec 1.2.2}
    \subsection{Sec 1.2.3}
    \subsection{Sec 1.2.4}
    \section{Sec 1.3}
    \section{Sec 1.4}
    \chapter{Chap 2}
    \section{Sec 2.1}
    \section{Sec 2.2}
    \section{Sec 2.3}
    \chapter{Chap 3}
    \section{Sec 3.1}
  • the behavior that you notice is intentional, as the \input should be placed at
    top level (it can contain \section-commnads after all)

  • elwood151

    hm - does that really make sense?
    Maybe my usage is an exceptional case, but as I have very large tables (also
    containing the code) and want to access them easily for search/replace etc., I
    have "outsourced" the code for them to external files.
    (So if I want to change formatting in those tables etc. I just have to edit
    the files and do not spoil anything in the rest of the document.)

    Would it be possible to create an option which disables this behavior?
    I have a large document with dozens of sections and sub(sub)sections and the
    structure view is quite useless for everything after the first such \input{}

    BTW, the structure view even "breaks" if the \input or \include command is in
    a comment!

  • t.schreiter

    Same problem here,

    Some of my figures are .pgf, which work only with \input.

    BTW \include works only at the top level, \input works at all levels.

    So, I would favor such an option as elwood151 suggests.