Книга: Learning GNU Emacs, 3rd Edition

8.5.3 Command Pairs

8.5.3 Command Pairs

LaTeX mode provides support for inserting command pairs. To insert a command pair, type C-c C-o (for latex-insert-block). Emacs prompts for the block name, and then for associated options. For example, type C-c C-o Enter document Enter Enter (the second Enter indicates no options). Emacs inserts the command pair and positions the cursor between them:

begin{document}

  _

end{document}

You can use this command to mark up a text file after you write it. If you mark a region, you can type C-c C-o to wrap a command pair around that region.

A related command is C-c C-e (for latex-close-block). In this case, you type an opening command, press C-c C-e, and Emacs inserts the corresponding closing command.

These commands work with any keyword, regardless of what it is. Emacs can't check to make sure that it's a valid LATEX keyword or even that it's been defined. For example, if you type begin{eating} C-c C-e, Emacs inserts end{eating}. It's up to you to make sure you use valid keywords.

Оглавление книги


Генерация: 2.504. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз