Menu

#965 Indent content in environment

None
closed
nobody
None
1
2017-08-11
2016-01-05
Anonymous
No

In order to enhance readability, I indent conent within an environment.

Since \begin{$environment} auto-completes \end{$environment}, it would be helpful to auto-indent the next line. For most environments, this is not a big deal. However, for itemize, the next line, \item, auto-completes wiht the wrong indention level. Fixing this requires many keystrokes.

Discussion

  • Tim Hoffmann

    Tim Hoffmann - 2016-01-08

    I do not fully understand the request. Please describe excatly what you do, what happens and what you would like to happen instead.

     
  • Tim Hoffmann

    Tim Hoffmann - 2016-02-06

    no feedback

     
  • Tim Hoffmann

    Tim Hoffmann - 2016-02-06
    • status: open --> closed
    • Group: -->
     
  • Klaus

    Klaus - 2017-08-11

    I think I know what was intended here. Please reopen the issue.

    In the manual I couldn't find any indication, that this issue was reported based on a misunderstanding of available features.

    My preferred behavior

    Environments define a nesting-level, and are indented (as usual in programming languages). Start and end of each environment are instantly visible from the indentation structure.

    \begin{align}
      \begin{pmatrix}{cc}
        a_{11} & a_{12} \\
        a_{21} & a_{22} 
      \end{pmatrix}
      \begin{pmatrix}
        b_{11} & b_{12} \\
        b_{21} & b_{22}
      \end{pmatrix}
    \end{align}
    

    Current behavior of TeXstudio

    Flat style. Quickly becomes near-impossible to read for complex real-world equations.

    \begin{align}
    \begin{pmatrix}{cc}
    a_{11} & a_{12} \\
    a_{21} & a_{22} 
    \end{pmatrix}
    \begin{pmatrix}
    b_{11} & b_{12} \\
    b_{21} & b_{22}
    \end{pmatrix}
    \end{align}
    

    Should be optional

    Depending on the field of work, such nested environments don't occur and it may be more desirable to keep all text at the same indentation level – or even required, e.g. for verbatim or lstlisting.

     

Anonymous
Anonymous

Add attachments
Cancel