Search:   Help



LyX documentation


Shared groups



Categories: Tips, Keyboard shortcut
<< | Page list | >>

Tips about frequently used shortcuts in LyX to edit math and text

Feel free to add your own tips of nice shortcuts.

1.  Changing the paragraph environment

Steering the mouse pointer to the paragraph environment drop-down menu in order to get out of an enumerate or itemize environment was starting to annoy me, especially on the road without a mouse. Fortunately, there is a solution (which apparently is undocumented, at least I couldn't find it):

Quoting Paul from the mailing list: "M-p (alt-p) followed by a space opens the environment list. From there, repeatedly typing the same letter cycles through all environment names starting with that letter."

Works great for me; once your in the menu list, arrow keys also work, of course.


Note: With version 1.6 typing letters work as a filter. So you have to write the starting letters of the desired environment until it gets unambiguous.

To change the nesting level (for instance, in Itemize or Enumerate environments), one can use Alt-Shift-Right or Tab to increase the depth and Alt-Shift-Left or Shift-Tab to decrease the depth.

2.  Math shortcuts

2.1  Christian often writes lots of expressions with vector algebra. Here are some of his most frequently used math shortcuts:

Ctrl-m or Alt-m mStart math mode (inline), or create mbox within math mode
Shift-Ctrl-mStart math mode (display), or toggle inline/display
Ctrl-Alt-nStart math mode (display) with numbering
Ctrl-EnterAdd new line to multi-line equation environment, if necessary creating multi-line (eqnarray) environment
TabMove to next element of multi-element structure or multi-line environment
Alt-Up/DownRearrange displayed formulas
^Write superscript
_Write subscript
Ctrl-bWrite next character in bold
Shift-Ctrl-pWrite next character in monospaced font
Alt-m bWrite the following text under a bar
Alt-m hWrite the following text under a hat (^)
Alt-m .Write the following text under a dot
Alt-m 'Write a "prime" symbol
Alt-m (, Alt-m [, Alt-m {, Alt-m |Write within ()'s, []'s, {}'s, or ||'s, whose size size depends on content
Alt-m fCreate a fraction
Alt-m sCreate a square root radical
Alt-m rCreate an nth root radical
BackspaceUsed for instance within ()'s or fraction. It will remove the ()'s or other component of fraction
Alt-m g <letter>Write corresponding greek letter (a = alpha, A = Alpha, etc.)
Alt-xShow command buffer
Alt-x math-matrix n mCreate an m-by-n matrix
Alt-c SpaceCreate text within math mode (\textrm)
Ctrl-Space [Space [Space ...]]Create space [larger space [even larger space ...]] within math mode

2.2  Example of rewriting a/(b+c) into a fraction

Someone wrote: Within math mode transformations are opaque. Several times already I have found myself starting an expression


then decided afterward to rewrite it as

   b + c 

I don't know of a way to automatically rewrite it, but this key seqence is pretty quick:

       a /
       M-m (

and you've created your expression: a/(b+c) and the cursor is ust to the right of the c. Now, the following sequence of keys can change this into what you want:

       M-m f    

What you have now is:

       (b+c)  =] 

with the cursor to the right of the brace. To get rid of the braces, do:

       Backspace =] 

and voila:


3.  Text editing shortcuts

Under Tools / preferences / Editing / Shortcuts, the following text editing functions can be mapped to shortcuts. Enter the function name in the search box "show key-binding containing". Click on the function name and click on modify. Then press the shortcut keys to map the new shortcut to that function.

ShortcutLyX function name
Ctrl+Kh ref-insert

Tips Keyboard shortcut

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2018-08-02 19:26 UTC