#115 Auto-Closing of Braces and Environments


A user suggested:

TeXnicCenter automatically inserts:
- } when you type {;
- ) when you type (;
- [ when you type ];
- $ when you type $.

This could even be thought further by closing
LaTeX-Environments like:



But I think, that it should only be done, if the user
presses a certain key, lets say Ctrl-Enter for example.


  • Tino Weinkauf

    Tino Weinkauf - 2005-01-26

    Logged In: YES

    Another user wrote in TXC-Users:

    When I write a LaTeX-document I find that it is 'boring' or
    'tedeaus' to write every \end{...} command.

    So, I'd like a funktion that could 'close' the last
    'non-closed' \begin{...} command.

    The function would search backwards for anny occurence of
    \begin{...} and insert a matching \end{...} if it is not
    already 'closed'. If it is 'closed' the function would
    continue its serach up through the document.

    (Perhaps it could be instructed to NOT insert an
    \end{document} command, and 'beep' instead, since there's
    only one such command in each document)

  • Tino Weinkauf

    Tino Weinkauf - 2005-01-26

    Logged In: YES

    Another user wrote:

    This function is 'present' in 'Kile' --- LaTeX 'editor' for
    Linux. In Kile this function not search all document looking
    for not closed \begin{...} but it close every \begin{...}
    when you put [ENTER button] after \begin{...}. But in Kile
    is one problem: When you put \begin{...} and some text in
    the same line you don't have automatic \end{...}; for
    example \begin{tabular}{lll} isn't automatic closed by
    \end{tabular} (it isn't close).

  • Tino Weinkauf

    Tino Weinkauf - 2005-06-29

    Logged In: YES

    Another user wrote:

    t would be REALLY nice if TXC would support auto
    bracketing for

    [ ]
    { }
    ( )
    $ $
    $$ $$
    \{ \}
    \left \right

    (i got used to this feature in kile and it saves lots
    of TIME and ERRORS...)

  • rockstar1707

    rockstar1707 - 2005-11-25

    Logged In: YES

    Personally I think that the best solution to this feature is
    in implemented WinEDT. And this is one of the things that I
    use all the time.

    For example, you start latex environment with


    and for closing you just type:


    So, you type \END and double opening bracket, and the
    program automatically changes that {{ to corresponding command.

    That kind of implementation is really fast, because your
    fingers are already on the key for "bracket". If you
    implement that by combination of CRTL + ENTER you have to
    move your fingers on the keyboard. Which takes some time,
    doesn't it.



Cancel  Add attachments