Variable: TeX-expand-list-builtin

TeX-expand-list-builtin is a variable defined in tex.el.

Value

Large value
(("%q"
  (lambda nil
    (TeX-printer-query t)))
 ("%V"
  (lambda nil
    (TeX-source-correlate-start-server-maybe)
    (TeX-view-command-raw)))
 ("%r"
  (lambda nil
    (TeX-style-check TeX-print-style)))
 ("%l"
  (lambda nil
    (TeX-style-check LaTeX-command-style)))
 ("%(PDF)"
  (lambda nil
    (if
	(and
	 (eq TeX-engine 'default)
	 (if TeX-PDF-mode
	     (not
	      (TeX-PDF-from-DVI))
	   TeX-DVI-via-PDFTeX))
	"pdf" "")))
 ("%(PDFout)"
  (lambda nil
    (cond
     ((eq major-mode 'AmSTeX-mode)
      (if TeX-PDF-mode " -output-format=pdf" " -output-format=dvi"))
     ((and
       (eq TeX-engine 'xetex)
       (not TeX-PDF-mode))
      " -no-pdf")
     ((and
       (eq TeX-engine 'luatex)
       (not TeX-PDF-mode))
      " --output-format=dvi")
     ((and
       (eq TeX-engine 'default)
       (not TeX-PDF-mode)
       TeX-DVI-via-PDFTeX)
      " \"\\pdfoutput=0 \"")
     (t ""))))
 ("%(mode)"
  (lambda nil
    (if TeX-interactive-mode "" " -interaction=nonstopmode")))
 ("%(file-line-error)"
  (lambda nil
    (if TeX-file-line-error " -file-line-error" "")))
 ("%(o?)"
  (lambda nil
    (if
	(eq TeX-engine 'omega)
	"o" "")))
 ("%(tex)"
  (lambda nil
    (eval
     (nth 2
	  (TeX-engine-in-engine-alist TeX-engine)))))
 ("%(latex)"
  (lambda nil
    (eval
     (nth 3
	  (TeX-engine-in-engine-alist TeX-engine)))))
 ("%(cntxcom)" ConTeXt-expand-command)
 ("%(execopts)" ConTeXt-expand-options)
 ("%(extraopts)"
  (lambda nil TeX-command-extra-options))
 ("%(output-dir)" TeX--output-dir-arg "--output-directory=")
 ("%(o-dir)" TeX--output-dir-arg "-o ")
 ("%(d-dir)" TeX--output-dir-arg "-d ")
 ("%S" TeX-source-correlate-expand-options)
 ("%dS" TeX-source-specials-view-expand-options)
 ("%cS" TeX-source-specials-view-expand-client)
 ("%(outpage)"
  (lambda nil
    (and TeX-source-correlate-mode
	 (null TeX-source-correlate-output-page-function)
	 (eq
	  (TeX-source-correlate-method-active)
	  'synctex)
	 (setq TeX-source-correlate-output-page-function #'TeX-synctex-output-page))
    (or
     (if TeX-source-correlate-output-page-function
	 (funcall TeX-source-correlate-output-page-function))
     "1")))
 ("%s" TeX-active-master-with-quotes nil t)
 ("%t" TeX-active-master-with-quotes t t)
 ("%(s-filename-only)" TeX-active-master-with-quotes nil t nil nil file-name-nondirectory)
 ("%(t-filename-only)" TeX-active-master-with-quotes t t nil nil file-name-nondirectory)
 ("%`"
  (lambda nil
    (setq TeX-command-pos t TeX-command-text nil)
    ""))
 (" \"\\"
  (lambda nil
    (if
	(eq TeX-command-pos t)
	(setq TeX-command-pos TeX-expand-pos TeX-expand-pos
	      (+ 3 TeX-expand-pos))
      (setq TeX-expand-pos
	    (1+ TeX-expand-pos)))))
 ("\""
  (lambda nil
    (if
	(numberp TeX-command-pos)
	(setq TeX-command-text
	      (concat TeX-command-text
		      (substring TeX-expand-command TeX-command-pos
				 (1+ TeX-expand-pos)))
	      TeX-expand-command
	      (concat
	       (substring TeX-expand-command 0 TeX-command-pos)
	       (substring TeX-expand-command
			  (1+ TeX-expand-pos)))
	      TeX-expand-pos TeX-command-pos TeX-command-pos t)
      (setq TeX-expand-pos
	    (1+ TeX-expand-pos)))))
 ("%'"
  (lambda nil
    (setq TeX-command-pos nil)
    (if
	(stringp TeX-command-text)
	(progn
	  (setq TeX-expand-pos
		(+ TeX-expand-pos
		   (length TeX-command-text)
		   9))
	  (concat TeX-command-text " \"\\input\""))
      "")))
 ("%T" TeX-active-master-with-quotes t t nil t)
 ("%n" TeX-current-line)
 ("%d" TeX-active-master-with-quotes "dvi" t)
 ("%f" TeX-active-master-with-quotes "ps" t)
 ("%(O?aux)" TeX-active-master-with-quotes "aux" t)
 ("%(O?idx)" TeX-active-master-with-quotes "idx" t)
 ("%(O?pdf)" TeX-active-master-with-quotes "pdf" t)
 ("%o"
  (lambda nil
    (TeX-active-master-with-quotes
     (TeX-output-extension)
     t)))
 ("%b" TeX-current-file-name-master-relative)
 ("%a"
  (lambda nil
    (prin1-to-string
     (expand-file-name
      (TeX-buffer-file-name)))))
 ("%m" preview-create-subdirectory)
 ("%(latexmk-out)"
  (lambda nil
    (cond
     ((eq TeX-engine 'xetex)
      " -pdf -pdflatex=xelatex")
     ((eq TeX-engine 'luatex)
      (cond
       ((and TeX-PDF-mode
	     (TeX-PDF-from-DVI))
	" -dvilua -pdfdvi")
       ((and
	 (not TeX-PDF-mode)
	 TeX-DVI-via-PDFTeX)
	" -dvilua -ps")
       (t " -pdflua")))
     (t
      (cond
       ((and TeX-PDF-mode
	     (not
	      (TeX-PDF-from-DVI)))
	" -pdf")
       ((and TeX-PDF-mode
	     (string=
	      (TeX-PDF-from-DVI)
	      "Dvips"))
	" -pdfps")
       ((and TeX-PDF-mode
	     (string=
	      (TeX-PDF-from-DVI)
	      "Dvipdfmx"))
	" -pdfdvi")
       ((and
	 (not TeX-PDF-mode)
	 TeX-DVI-via-PDFTeX)
	" -pdflatex -dvi -ps")
       (t " -dvi -ps"))))))
 ("%(kanjiopt)"
  (lambda nil
    (if japanese-TeX-use-kanji-opt-flag
	(let
	    ((str
	      (japanese-TeX-get-encoding-string)))
	  (if str
	      (format " -kanji=%s " str)
	    ""))
      "")))
 ("%(bibtex)"
  (lambda nil
    (cond
     ((eq TeX-engine 'ptex)
      (if
	  (executable-find "pbibtex")
	  "pbibtex %(kanjiopt)" "jbibtex"))
     ((eq TeX-engine 'jtex)
      "jbibtex")
     ((eq TeX-engine 'uptex)
      "upbibtex")
     (t "bibtex"))))
 ("%(makeindex)"
  (lambda nil
    (cond
     ((and
       (memq TeX-engine
	     '(uptex xetex luatex))
       (executable-find "upmendex"))
      "upmendex %(dic)")
     ((memq TeX-engine
	    '(ptex uptex))
      "mendex %(mendexkopt) %(dic)")
     (t "makeindex"))))
 ("%(mendexkopt)"
  (lambda nil
    (if japanese-TeX-use-kanji-opt-flag
	(let
	    ((str
	      (japanese-TeX-get-encoding-string)))
	  (if str
	      (format " -%c "
		      (upcase
		       (aref str 0)))
	    ""))
      "")))
 ("%(dic)"
  (lambda nil
    (let
	((dicname
	  (TeX-master-file "dic" t)))
      (if
	  (file-exists-p
	   (expand-file-name dicname
			     (TeX-master-directory)))
	  (let
	      ((result
		(format "-d %s" dicname)))
	    (setq TeX-expand-pos
		  (+ TeX-expand-pos
		     (length result)))
	    result)
	""))))
 ("%(xdvi)"
  (lambda nil
    (if
	(and japanese-TeX-mode
	     (executable-find "pxdvi"))
	"pxdvi" "%(o?)xdvi"))))

Documentation

List of built-in expansion strings for TeX command names.

This should not be changed by the user who can use TeX-expand-list(var)/TeX-expand-list(fun) variable. The latter variable also contains a description of the data format.

Programs should not use these variables directly but the function TeX-expand-list(var)/TeX-expand-list(fun).

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
;; This is the list of expansion for the commands in
;; TeX-command-list.  Not likely to be changed, but you may e.g. want
;; to handle .ps files.

(defvar TeX-expand-list-builtin
  '(("%q" (lambda ()
            (TeX-printer-query t)))
    ("%V" (lambda ()
            (TeX-source-correlate-start-server-maybe)
            (TeX-view-command-raw)))
    ("%r" (lambda ()
            (TeX-style-check TeX-print-style)))
    ("%l" (lambda ()
            (TeX-style-check LaTeX-command-style)))
    ("%(PDF)" (lambda ()
                (if (and (eq TeX-engine 'default)
                         (if TeX-PDF-mode
                             (not (TeX-PDF-from-DVI))
                           TeX-DVI-via-PDFTeX))
                    "pdf"
                  "")))
    ("%(PDFout)" (lambda ()
                   (cond ((eq major-mode 'AmSTeX-mode)
                          (if TeX-PDF-mode
                              " -output-format=pdf"
                            " -output-format=dvi"))
                         ((and (eq TeX-engine 'xetex)
                               (not TeX-PDF-mode))
                          " -no-pdf")
                         ((and (eq TeX-engine 'luatex)
                               (not TeX-PDF-mode))
                          " --output-format=dvi")
                         ((and (eq TeX-engine 'default)
                               (not TeX-PDF-mode)
                               TeX-DVI-via-PDFTeX)
                          " \"\\pdfoutput=0 \"")
                         (t ""))))
    ("%(mode)" (lambda ()
                 (if TeX-interactive-mode
                     ""
                   " -interaction=nonstopmode")))
    ("%(file-line-error)"
     (lambda () (if TeX-file-line-error " -file-line-error" "")))
    ("%(o?)" (lambda () (if (eq TeX-engine 'omega) "o" "")))
    ("%(tex)" (lambda () (eval (nth 2 (TeX-engine-in-engine-alist TeX-engine)))))
    ("%(latex)" (lambda () (eval (nth 3 (TeX-engine-in-engine-alist TeX-engine)))))
    ("%(cntxcom)" ConTeXt-expand-command)
    ("%(execopts)" ConTeXt-expand-options)
    ("%(extraopts)" (lambda () TeX-command-extra-options))
    ("%(output-dir)" TeX--output-dir-arg "--output-directory=")
    ("%(o-dir)" TeX--output-dir-arg "-o ")
    ("%(d-dir)" TeX--output-dir-arg "-d ")
    ("%S" TeX-source-correlate-expand-options)
    ("%dS" TeX-source-specials-view-expand-options)
    ("%cS" TeX-source-specials-view-expand-client)
    ("%(outpage)" (lambda ()
                    ;; When `TeX-source-correlate-output-page-function' is nil
                    ;; and we are using synctex, fallback on
                    ;; `TeX-synctex-output-page'.
                    (and TeX-source-correlate-mode
                         (null TeX-source-correlate-output-page-function)
                         (eq (TeX-source-correlate-method-active) 'synctex)
                         (setq TeX-source-correlate-output-page-function
                               #'TeX-synctex-output-page))
                    (or (if TeX-source-correlate-output-page-function
                            (funcall TeX-source-correlate-output-page-function))
                        "1")))
    ;; `TeX-active-master-with-quotes' calls either `TeX-master-file'
    ;; or `TeX-region-file' returning the master or region file, and
    ;; adds suitable quotes for use in shell command line.
    ("%s" TeX-active-master-with-quotes nil t)
    ("%t" TeX-active-master-with-quotes t t)
    ("%(s-filename-only)" TeX-active-master-with-quotes nil t nil nil file-name-nondirectory)
    ("%(t-filename-only)" TeX-active-master-with-quotes t t nil nil file-name-nondirectory)
    ;; If any TeX codes appear in the interval between %` and %', move
    ;; all of them after the interval and supplement " \input".  The
    ;; appearance is marked by leaving the bind to `TeX-command-text'
    ;; with the TeX codes.
    ;; Rule:
    ;; 1. %` and %' must appear in pair.
    ;; 2. %` and %' must not appear more than once in one command
    ;;    line string (including the results of %-expansion).
    ;; 3. Each TeX codes between %` and %' must be enclosed in
    ;;    double quotes and preceded by a space.
    ("%`" (lambda nil
            (setq TeX-command-pos t TeX-command-text nil)
            ""))
    (" \"\\" (lambda nil
               (if (eq TeX-command-pos t)
                   (setq TeX-command-pos TeX-expand-pos
                         TeX-expand-pos (+ 3 TeX-expand-pos))
                 (setq TeX-expand-pos (1+ TeX-expand-pos)))))
    ("\"" (lambda nil (if (numberp TeX-command-pos)
                          (setq TeX-command-text
                                (concat
                                 TeX-command-text
                                 (substring TeX-expand-command
                                            TeX-command-pos
                                            (1+ TeX-expand-pos)))
                                TeX-expand-command
                                (concat
                                 (substring TeX-expand-command
                                            0
                                            TeX-command-pos)
                                 (substring TeX-expand-command
                                            (1+ TeX-expand-pos)))
                                TeX-expand-pos TeX-command-pos
                                TeX-command-pos t)
                        (setq TeX-expand-pos (1+ TeX-expand-pos)))))
    ("%'" (lambda nil
            (setq TeX-command-pos nil)
            (if (stringp TeX-command-text)
                (progn
                  (setq TeX-expand-pos (+ TeX-expand-pos (length TeX-command-text) 9))
                  (concat TeX-command-text " \"\\input\""))
              "")))
    ;; The fourth argument of t directs to supply "\detokenize{}" when
    ;; necessary.  See doc string and comment of
    ;; `TeX-active-master-with-quotes'.
    ("%T" TeX-active-master-with-quotes t t nil t)
    ("%n" TeX-current-line)
    ("%d" TeX-active-master-with-quotes "dvi" t)
    ("%f" TeX-active-master-with-quotes "ps" t)
    ("%(O?aux)" TeX-active-master-with-quotes "aux" t)
    ("%(O?idx)" TeX-active-master-with-quotes "idx" t)
    ("%(O?pdf)" TeX-active-master-with-quotes "pdf" t)
    ("%o" (lambda nil (TeX-active-master-with-quotes (TeX-output-extension) t)))
    ;; for source specials the file name generated for the xdvi
    ;; command needs to be relative to the master file, just in
    ;; case the file is in a different subdirectory
    ("%b" TeX-current-file-name-master-relative)
    ;; Okular forward PDF search requires absolute path.
    ("%a" (lambda nil (prin1-to-string (expand-file-name (TeX-buffer-file-name)))))
    ;; the following is for preview-latex.
    ("%m" preview-create-subdirectory)
    ;; LaTeXMk support
    ("%(latexmk-out)"
     (lambda ()
       (cond ((eq TeX-engine 'xetex)
              " -pdf -pdflatex=xelatex")
             ((eq TeX-engine 'luatex)
              (cond ((and TeX-PDF-mode
                          (TeX-PDF-from-DVI))
                     " -dvilua -pdfdvi")
                    ((and (not TeX-PDF-mode)
                          TeX-DVI-via-PDFTeX)
                     " -dvilua -ps")
                    ;; This covers the case:
                    ;; (and TeX-PDF-mode (not (TeX-PDF-from-DVI)))
                    (t
                     " -pdflua")))
             ;; This covers everything else since we ignore 'omega:
             (t
              (cond ((and TeX-PDF-mode
                          (not (TeX-PDF-from-DVI)))
                     " -pdf")
                    ((and TeX-PDF-mode
                          (string= (TeX-PDF-from-DVI) "Dvips"))
                     " -pdfps")
                    ;; FIXME: This might be inaccurate:
                    ((and TeX-PDF-mode
                          (string= (TeX-PDF-from-DVI) "Dvipdfmx"))
                     " -pdfdvi")
                    ((and (not TeX-PDF-mode)
                          TeX-DVI-via-PDFTeX)
                     " -pdflatex -dvi -ps")
                    (t
                     " -dvi -ps")))))))
  "List of built-in expansion strings for TeX command names.

This should not be changed by the user who can use
`TeX-expand-list' variable.  The latter variable also contains a
description of the data format.

Programs should not use these variables directly but the function
`TeX-expand-list'.")