Function: LaTeX-mode

LaTeX-mode is an autoloaded, interactive and byte-compiled function defined in latex.el.

Signature

(LaTeX-mode)

Documentation

Major mode in AUCTeX for editing LaTeX files.

See info under AUCTeX for full documentation.

Entering LaTeX mode calls the value of text-mode-hook, then the value of TeX-mode-hook, and then the value of LaTeX-mode-hook.

" TeX-insert-quote
$ TeX-insert-dollar
( LaTeX-insert-left-brace
- LaTeX-babel-insert-hyphen
C-M-i TeX-complete-symbol
C-c " TeX-uncomment
C-c # TeX-normal-mode
C-c % TeX-comment-or-uncomment-paragraph
C-c ' TeX-comment-or-uncomment-paragraph
C-c * LaTeX-mark-section
C-c . LaTeX-mark-environment
C-c : comment-or-uncomment-region
C-c ; comment-or-uncomment-region
C-c ? TeX-documentation-texdoc
C-c C-a TeX-command-run-all
C-c C-b TeX-command-buffer(var)/TeX-command-buffer(fun)
C-c C-c TeX-command-master
C-c C-d TeX-save-document
C-c C-e LaTeX-environment
C-c C-f TeX-font
C-c C-j LaTeX-insert-item
C-c C-k TeX-kill-job
C-c C-l TeX-recenter-output-buffer
C-c C-n TeX-normal-mode
C-c C-o C-f TeX-fold-mode(var)/TeX-fold-mode(fun)
C-c C-q C-e LaTeX-fill-environment
C-c C-q C-p LaTeX-fill-paragraph
C-c C-q C-r LaTeX-fill-region
C-c C-q C-s LaTeX-fill-section
C-c C-r TeX-command-region
C-c C-s LaTeX-section
C-c C-t C-b TeX-toggle-debug-bad-boxes
C-c C-t C-p TeX-PDF-mode(var)/TeX-PDF-mode(fun)
C-c C-t C-r TeX-pin-region
C-c C-t C-s TeX-source-correlate-mode(var)/TeX-source-correlate-mode(fun)
C-c C-t C-w TeX-toggle-debug-warnings
C-c C-t C-x TeX-toggle-suppress-ignored-warnings
C-c C-t TAB TeX-interactive-mode(var)/TeX-interactive-mode(fun)
C-c C-v TeX-view
C-c C-w TeX-toggle-debug-bad-boxes
C-c C-z LaTeX-command-section
C-c M-z LaTeX-command-section-change-level
C-c RET TeX-insert-macro
C-c TAB TeX-goto-info-page
C-c ] LaTeX-close-environment
C-c ^ TeX-home-buffer
C-c _ TeX-master-file-ask
C-c ` TeX-next-error
C-c { TeX-insert-braces(var)/TeX-insert-braces(fun)
C-c } up-list
C-c ~ LaTeX-math-mode(var)/LaTeX-math-mode(fun)
C-j reindent-then-newline-and-indent
C-x ` TeX-next-error
C-x n e LaTeX-narrow-to-environment
C-x n g TeX-narrow-to-group
M-RET LaTeX-insert-item
M-g p TeX-previous-error
RET TeX-newline
[ LaTeX-insert-left-brace
\ TeX-insert-backslash
^ TeX-insert-sub-or-superscript
_ TeX-insert-sub-or-superscript
{ LaTeX-insert-left-brace

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
;; Delete alias predefined in tex-mode.el so that AUCTeX autoload
;; takes precedence.
;;;###autoload (if (eq (symbol-function 'LaTeX-mode) 'latex-mode)
;;;###autoload     (defalias 'LaTeX-mode nil))
;;;###autoload
(define-derived-mode LaTeX-mode TeX-mode "LaTeX"
  "Major mode in AUCTeX for editing LaTeX files.
See info under AUCTeX for full documentation.

Entering LaTeX mode calls the value of `text-mode-hook',
then the value of `TeX-mode-hook', and then the value
of `LaTeX-mode-hook'."
  :after-hook (LaTeX-mode-cleanup)

  (LaTeX-common-initialization)
  (setq TeX-base-mode-name mode-name)
  (setq TeX-command-default "LaTeX")
  (setq TeX-sentinel-default-function #'TeX-LaTeX-sentinel)
  (add-hook 'tool-bar-mode-hook #'LaTeX-maybe-install-toolbar nil t)
  (LaTeX-maybe-install-toolbar)
  ;; Set the value of `LaTeX-using-Biber' based on the local value of
  ;; `LaTeX-biblatex-use-Biber'.  This should be run within
  ;; `TeX-update-style-hook' before toolbarx-refresh, otherwise the bibliography
  ;; button could be wrongly set.
  (add-hook 'TeX-update-style-hook
            (lambda ()
              (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
                  (setq LaTeX-using-Biber LaTeX-biblatex-use-Biber)))
            nil t)

  ;; Run style hooks associated with class options.
  (add-hook 'TeX-update-style-hook
            (lambda ()
              (let ((TeX-style-hook-dialect :classopt)
                    ;; Don't record class option names in
                    ;; `TeX-active-styles'.
                    (TeX-active-styles nil))
                (apply #'TeX-run-style-hooks
                       (apply #'append
                              (mapcar #'cdr LaTeX-provided-class-options)))))
            nil t)

  (when (fboundp 'LaTeX-preview-setup)
    (LaTeX-preview-setup))
  ;; Set up flymake backend, see latex-flymake.el
  (add-hook 'flymake-diagnostic-functions #'LaTeX-flymake nil t))