#682 Structure parsing resets on \input{}

None
closed
nobody
None
1
2013-02-09
2013-01-26
Etienne
No
0 up votes | 0 down votes | 0%
5 comments

TexStudio 2.5.2, WinXP SP3 x32

In my Tex project, I would like to input a file containing the caption with each image like this:

\begin{figure}[htb]
    \centering
    \includegraphics{images/Moses-TOF.png}
    \input{images/Moses-TOF.tex}
    \label{fig-TOF}
\end{figure}

Doing this in my tex file totally breaks the parsing algorithm. After the first \input{}, %todo are no longer registered, the hierarchy in the structure tabs restart to the left.

I understand that the inputed file is not parsed while doing the structure but it could probably be included in the hierarchical structure tree without resetting it and maybe add a summary section on top of the structure (like the TODO and LABEL section) to find then easilly. In any case, it should not break the todos.

Discussion

  • Jan  Sundermeyer
    Jan Sundermeyer
    2013-01-27

    i don't see any breaking of the structure view, only point is that %todo (lower case) has never been added in the todo-list. That has been fixed in the svn version.

     
  • Etienne
    Etienne
    2013-01-31

    Thanks, I fixed my todos.
    I made some screenshots of my structure view breaking.

     
    Attachments
  • Jan  Sundermeyer
    Jan Sundermeyer
    2013-01-31

    the "breaking" is an intended design decision as input/included code can contain further sections etc.

     
  • Etienne
    Etienne
    2013-01-31

    I totally understand that one could include anything in the input, even a new chapter. Although, from my point of view, in a well organized document, the \input should include a complete section or subsection or anything else that is self-contained and lower in the document hierarchy while not breaking the hierarchy of the original document.

    Although I could easily see this as an advanced option, it is an editorial decision that I leave to you. Thanks for answering me.

     
  • Added an option for keeping the includes indented in r3755

     
    • status: open --> closed
    • milestone: -->