<< Suggested reading | Page list | mini-buffer >>
About lyx-functions (LFUN:s), a.k.a. user commands
If you press M-x, you activate a small command prompt (the mini-buffer) at the bottom of the LyX window. You can then execute commands by typing their name, or even a sequence of commands by first typing command-sequence (see Tips.CommandSequences).
Q: What is a Lyx-function (a.k.a. LFUN)?
LFUN is short for LyX function and there is an
LFUN for every action (cut, paste, search etc) including showing some
dialogs.
- LFUNS can be bound to keys, menus or toolbars.
- Using the mini-buffer the user can manually execute an LFUN.
- LFUNS can be used to "remote-control" lyx via the lyxserver pipes
The relevant source is:
Note: The list of available LFUNs vary with the version of LyX. This page describes the LFUNs in LyX 1.5.2.
Also note that new project for proper documentation of all LFUNs has been started recently. The work is being done in the forthcoming 1.6 version by means of doxygen. The example of output can be seen for example here. If you are a skilled LyX user consider contributing some lfun documentation. The current state can be seen in trunk/src/LyXAction.cpp file, some additional help with can be found in trunk/src/LyXFunc.cpp file. Additional documentation send in a patch form either in the dev list or directly to me (sanda at lyx dot org).
Pages with lists of lyx-functions:
The list of LFUNs for LyX 1.5.1 is shown below (included from LyxFunctionList1-5-1).
(:sectionedit LyX.LyxFunctionList1-5-1 LyX.LyxFunctions:)
List of LyxFunctions in release lyx-1_5_2
The lists of LFUNs below were derived from from releaes lyx-1_5_2 of
src/LyXAction.cpp.
Some of the commands below take arguments and others don't.
Feel free to add comments about what an LFUN does.
Various LFUNs, sorted alphabetically:
| Command string | Help text | Comment |
| all-changes-accept | |
| all-changes-reject | |
| all-insets-toggle | |
| appendix | Start appendix here |
| apropos | Describe command |
| backward-select | Select backwards |
| bibitem-insert | Insert a bibliography item |
| bibtex-database-add | Add BibTeX database |
| bibtex-database-del | Delete BibTeX database |
| bibtex-insert | Insert BibTeX |
| bibtex-style | | ?? |
| bookmark-clear | Clear bookmark |
| bookmark-goto | Go to bookmark |
| bookmark-save | Save bookmark |
| box-insert | |
| branch-insert | |
| break-line | Insert a new line |
| break-paragraph | |
| break-paragraph-keep-layout | |
| break-paragraph-skip | |
| buffer-auto-save | Autosave |
| buffer-begin | |
| buffer-begin-select | |
| buffer-child-open | |
| buffer-chktex | Start Check TeX |
| buffer-close | Close document |
| buffer-end | |
| buffer-end-select | |
| buffer-export | Export document to |
| buffer-export-custom | |
| buffer-import | Import a document |
| buffer-language | |
| buffer-new | New document |
| buffer-new-template | New document from template |
| buffer-next | |
| buffer-params-apply | |
| buffer-previous | |
| buffer-print | Print the document |
| buffer-reload | |
| buffer-save-as-default | |
| buffer-switch | Switch to another opened document |
| buffer-toggle-compression | Set document compression on/off |
| buffer-toggle-read-only | Make document read only or not |
| buffer-update | Update |
| buffer-view | View |
| buffer-write-all | Save all opened documents |
| buffer-write-as | Save As |
| buffer-write | Save |
| build-program | | ?? |
| cancel | Cancel last action |
| caption-insert | Insert a caption |
| cell-backward | |
| cell-forward | |
| cell-split | |
| change-accept | Accept a change |
| change-next | |
| change-reject | Reject a change |
| changes-merge | |
| changes-output | |
| changes-track | |
| char-backward | Go one character back |
| char-backward-select | Select one character before cursor |
| char-delete-backward | Delete one character before cursor |
| char-delete-forward | Delete one character after cursor |
| char-forward | Go one character forward |
| char-forward-select | Select one character after cursor |
| chars-transpose | |
| charstyle-insert | |
| citation-insert | |
| cleardoublepage-insert | |
| clearpage-insert | |
| clipboard-paste | Paste stuff from the clipboard |
| command-execute | |
| command-prefix | |
| command-sequence | |
| copy | Copy |
| cut | Cut |
| date-insert | Insert current date |
| delete-backward | |
| delete-backward-skip | |
| delete-forward | |
| delete-forward-skip | |
| depth-decrement | |
| depth-increment | |
| dialog-hide | |
| dialog-disconnect-inset | |
| dialog-show | |
| dialog-show-new-inset | |
| dialog-toggle | |
| dialog-update | |
| dots-insert | Insert ... dots |
| down | Go down |
| down-select | |
| drop-layouts-choice | |
| end-of-sentence-period-insert | |
| environment-insert | |
| error-next | |
| ert-insert | Insert an ERT-inset |
| escape | |
| external-edit | |
| file-insert | Insert a file |
| file-insert-plaintext | Insert file a plain text |
| file-insert-plaintext-para | Insert file a plain text in several paragraphs |
| file-new | Create new file |
| file-open | Open a file |
| find-replace | Find & Replace |
| float-insert | Insert a float |
| float-list | Insert the list of floats |
| float-wide-insert | Insert a float spanning over document columns |
| footnote-insert | Inserts a footnote |
| forward-select | Select next char |
| graphics-edit | |
| help-open | Open a Help file |
| hfill-insert | Insert a hfill |
| html-insert | |
| hyphenation-point-insert | Insert a hyphenation-point |
| index-insert | Insert the index list |
| index-print | |
| inset-apply | |
| inset-dissolve | |
| inset-insert | |
| inset-settings | |
| keymap-off | Turn off keymap |
| keymap-primary | |
| keymap-secondary | |
| keymap-toggle | Toggle keymap |
| label-insert | Insert Label |
| language | Change language |
| layout | |
| layout-character | |
| layout-copy | |
| layout-document | |
| layout-paragraph | |
| layout-paste | |
| layout-preamble | |
| layout-tabular | |
| ligature-break-insert | |
| line-begin | |
| line-begin-select | |
| line-delete | |
| line-end | Go to end of line |
| line-end-select | |
| line-insert | |
| list-insert | |
| listing-insert | |
| lyx-quit | Exit |
| lyxrc-apply | |
| marginalnote-insert | |
| mark-off | |
| mark-on | |
| mark-toggle | |
| master-buffer-update | update view the master document associated with a given child document |
| master-buffer-view | view the master document associated with a given child document |
| math-bigdelim | |
| math-delim | | Used to wrap an expression with pairs of parenthesis-like symbols that grow with the expression (like \left and \right in latex). Takes two arguments: first argument is inserted before expression, second argument is inserted after. Do not put in backslashes. for example, to get double vertical bar, use Vert with no backslash for both arguments |
| math-display | |
| math-extern | |
| math-import-selection | |
| math-insert | |
| math-limits | |
| math-macro | |
| math-matrix | |
| math-mode | Turn on math mode |
| math-mutate | |
| math-nonumber | |
| math-number | |
| math-size | |
| math-space | |
| math-subscript | Add subscript |
| math-superscript | Add superscript |
| menu-open | |
| menu-separator-insert | |
| message | |
| meta-prefix | |
| next-inset-toggle | |
| nomencl-insert | |
| nomencl-print | |
| note-insert | |
| note-next | |
| optional-insert | Insert Optional Argument |
| outline-up | |
| outline-down | |
| outline-in | |
| outline-out | |
| pagebreak-insert | Start a new page |
| paragraph-down | |
| paragraph-down-select | |
| paragraph-goto | |
| paragraph-move-down | |
| paragraph-move-up | |
| paragraph-params | Changes paragraph alignment | modifies the current paragraph, or currently selected paragraphs. This function only modifies, and does not override, existing settings. |
| paragraph-params-apply | Change paragraph settings (e.g. paragraph-params-apply \align right) | Overwrite all nonspecified settings to the default ones. Use paragraph-params lfun if you don't want to overwrite others settings. |
| paragraph-spacing | |
| paragraph-up | |
| paragraph-up-select | |
| paste | Paste |
| preferences-save | |
| primary-selection-paste | |
| quote-insert | Insert quote |
| reconfigure | |
| redo | Redo |
| reference-next | |
| repeat | |
| screen-down | |
| screen-down-select | |
| screen-font-update | |
| screen-recenter | |
| screen-up | |
| screen-up-select | |
| self-insert | |
| space-insert | |
| server-char-after | |
| server-get-font | |
| server-get-layout | |
| server-get-name | |
| server-get-tip | |
| server-get-xy | |
| server-goto-file-row | |
| server-notify | |
| server-set-xy | |
| set-color | |
| tabular-feature | |
| tabular-insert | Insert Table |
| textclass-apply | |
| textclass-load | |
| theorem-insert | |
| thesaurus-entry | Open thesaurus |
| toc-insert | |
| toggle-cursor-follows-scrollbar | |
| toolbar-toggle | |
| undo | Undo |
| unicode-insert | |
| up | |
| up-select | |
| url-insert | Insert a URL |
| vc-check-in | |
| vc-check-out | |
| vc-register | |
| vc-revert | |
| vc-undo-last | |
| window-new | Open new instance of LyX |
| window-close | Close actual instance of LyX |
| word-backward | |
| word-backward-select | |
| word-capitalize | |
| word-delete-backward | |
| word-delete-forward | |
| word-find | |
| word-find-backward | |
| word-find-forward | |
| word-forward | |
| word-forward-select | |
| word-lowcase | |
| word-replace | |
| word-select | |
| word-upcase | |
| words-count | |
LFUNs related to font commands:
| Command string | Help text | Comment |
| font-bold | Toggle bold |
| font-code | Toggle code style |
| font-default | Default font style |
| font-emph | Toggle emphasize |
| font-frak | Toggle fraktur font style |
| font-free-apply | Toggle user defined style |
| font-free-update | Update user defined style |
| font-ital | Toggle italic font style |
| font-noun | Toggle noun style |
| font-roman | Toggle roman font style |
| font-sans | Toggle sans font style |
| font-size | Set font size |
| font-state | Show font state |
| font-underline | Toggle underlining |
Accent LFUNs:
Try for instance, M-x accent-acute a — which should give you the letter a with an acute above it. If you don't give an argument ('a' in the example), the command will be applied to the next letter you type.
| Command string | Help text | Comment |
| accent-acute | á |
| accent-breve | ă |
| accent-caron | ǎ |
| accent-cedilla | ç |
| accent-circle | å |
| accent-circumflex | â |
| accent-dot | ż |
| accent-grave | à |
| accent-hungarian-umlaut | ő |
| accent-macron | ā |
| accent-ogonek | ą |
| accent-special-caron | | is broken |
| accent-tie | a͡ | the following character will finish the tie |
| accent-tilde | ã |
| accent-umlaut | ä |
| accent-underbar | a̠ |
| accent-underdot | ạ |
LFUN
Uncategorized