Saturday 14 February 2009

lyx brackets

When working with lyx it is sometimes annoying to get all the brackets right. The following setup makes it a breeze. If you would like square brackets simply type ctrl-[ and that's all. Moreover, you can mark a sequence and place ctrl-[ and get brackets around it. To get standard brackets, any of ctrl-( ctrl-) ctrl-9 ctrol-0 ctrl-shift-9 and ctrl-shift-0 will work. The same applies to other types of brackets and similar objects. To get it done, add the following section to your binding file (on windows it will be in \Documents and settings\\Application Data\lyx<#>\bind

\bind "C-9" "math-delim ( )"
\bind "S-C-parenleft" "math-delim ( )"
\bind "S-C-9" "math-delim ( )"
\bind "C-0" "math-delim ( )"
\bind "S-C-parenright" "math-delim ( )"
\bind "S-C-0" "math-delim ( )"

\bind "C-bracketleft" "math-delim [ ]"
\bind "C-bracketright" "math-delim { }"
\bind "C-S-less" "math-delim langle rangle"
\bind "C-S-greater" "math-delim langle rangle"

\bind "C-S-bar" "math-delim | |"
\bind "C-S-brokenbar" "math-delim | |"
\bind "C-M-bar" "math-delim | |"
\bind "C-S-backslash" "math-delim | |"

\bind "S-C-braceleft" "math-delim { }"
\bind "S-C-braceright" "math-delim { }"
\bind "C-S-bracketleft" "math-delim { }"
\bind "C-S-bracketright" "math-delim { }"

\bind "C-slash" "math-delim Vert Vert"

3 comments:

  1. FYI, on mac it's already bound as
    Option-M (

    and the like.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Just use alt-M then the bracket you want to insert.

    ReplyDelete