Variable: TeX-fold-macro-spec-list

TeX-fold-macro-spec-list is a customizable variable defined in tex-fold.el.

Value

Large value
((("[f]" 1 . 1)
  ("footnote" "marginpar"))
 ((TeX-fold-cite-display 2 . 1)
  ("cite" "Cite"))
 ((TeX-fold-textcite-display 2 . 1)
  ("textcite" "Textcite"))
 ((TeX-fold-parencite-display 2 . 1)
  ("parencite" "Parencite"))
 ((TeX-fold-footcite-display 2 . 1)
  ("footcite" "footcitetext"))
 (("[l]" . TeX-fold-stop-after-first-mandatory)
  ("label"))
 (("[r]" . 1)
  ("ref" "pageref" "eqref" "footref"))
 (("[i]" 1 . 1)
  ("index" "glossary"))
 (("[1]:||*" 1 . 0)
  ("item"))
 (("..." . 0)
  ("dots"))
 (("(C)" . 0)
  ("copyright"))
 (("(R)" . 0)
  ("textregistered"))
 (("TM" . 0)
  ("texttrademark"))
 ((TeX-fold-alert-display . 1)
  ("alert"))
 ((TeX-fold-textcolor-display 1 . 2)
  ("textcolor"))
 (TeX-fold-begin-display
  ("begin"))
 ((TeX-fold-end-display . 1)
  ("end"))
 (1
  ("part" "chapter" "section" "subsection" "subsubsection" "paragraph" "subparagraph" "part*" "chapter*" "section*" "subsection*" "subsubsection*" "paragraph*" "subparagraph*"))
 ((1 0 . 1)
  ("emph" "textit" "textsl" "textmd" "textrm" "textsf" "texttt" "textbf" "textsc" "textup")))

Documentation

List of replacement specifiers and macros to fold.

The first element is of the form SPEC or (SPEC . SIG), where SPEC can be a string, an integer or a function symbol and SIG is described below. The second element is a list of macros to fold without the leading backslash.

If SPEC is a string, it will be used as a display replacement for the whole macro. Numbers in braces, brackets, parens or angle brackets will be replaced by the respective macro argument. For example "{1}" will be replaced by the first mandatory argument of the macro. One can also define alternatives within the specifier which are used if an argument is not found. Alternatives are separated by "||". They are most useful with optional arguments. As an example, the default specifier for \item is "[1]:||*" which means that if there is an optional argument, its value is shown followed by a colon. If there is no optional argument, only an asterisk is used as the display string.

If SPEC is an integer, the macro will be replaced by the respective macro argument.

If SPEC is a function symbol, the function will be called with all mandatory arguments of the macro and the result of the function call will be used as a replacement for the macro. Such functions typically return a string, but may also return the symbol abort to indicate that the macro should not be folded.

SIG optionally restricts how many macro arguments are consumed. It should be of the form required by the SIGNATURE argument of TeX-find-macro-boundaries. For example, if SIGNATURE is an integer n, then at most n total arguments are consumed, while if it is a cons cell (p . q), then at most p optional and q mandatory arguments are allowed.

Setting this variable does not take effect immediately. Use Customize or reset the mode.

This variable was added, or its default value changed, in auctex version 14.1.1.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex-fold.el
(defcustom TeX-fold-macro-spec-list
  '((("[f]" . (1 . 1)) ("footnote" "marginpar"))
    ((TeX-fold-cite-display . (2 . 1)) ("cite" "Cite"))
    ((TeX-fold-textcite-display . (2 . 1)) ("textcite" "Textcite"))
    ((TeX-fold-parencite-display . (2 . 1)) ("parencite" "Parencite"))
    ((TeX-fold-footcite-display . (2 . 1)) ("footcite" "footcitetext"))
    (("[l]" . TeX-fold-stop-after-first-mandatory) ("label"))
    (("[r]" . 1) ("ref" "pageref" "eqref" "footref"))
    (("[i]" . (1 . 1)) ("index" "glossary"))
    (("[1]:||*" . (1 . 0)) ("item"))
    (("..." . 0) ("dots"))
    (("(C)" . 0) ("copyright"))
    (("(R)" . 0) ("textregistered"))
    (("TM" . 0)  ("texttrademark"))
    ((TeX-fold-alert-display . 1) ("alert"))
    ((TeX-fold-textcolor-display . (1 . 2)) ("textcolor"))
    (TeX-fold-begin-display ("begin"))
    ((TeX-fold-end-display . 1) ("end"))
    (1 ("part" "chapter" "section" "subsection" "subsubsection"
        "paragraph" "subparagraph"
        "part*" "chapter*" "section*" "subsection*" "subsubsection*"
        "paragraph*" "subparagraph*"))
    ((1 . (0 . 1)) ("emph" "textit" "textsl" "textmd" "textrm" "textsf" "texttt"
                    "textbf" "textsc" "textup")))
  "List of replacement specifiers and macros to fold.

The first element is of the form SPEC or (SPEC . SIG), where SPEC can be
a string, an integer or a function symbol and SIG is described below.
The second element is a list of macros to fold without the leading
backslash.

If SPEC is a string, it will be used as a display replacement for the
whole macro.  Numbers in braces, brackets, parens or angle brackets will
be replaced by the respective macro argument.  For example \"{1}\" will
be replaced by the first mandatory argument of the macro.  One can also
define alternatives within the specifier which are used if an argument
is not found.  Alternatives are separated by \"||\".  They are most
useful with optional arguments.  As an example, the default specifier
for \\item is \"[1]:||*\" which means that if there is an optional
argument, its value is shown followed by a colon.  If there is no
optional argument, only an asterisk is used as the display string.

If SPEC is an integer, the macro will be replaced by the respective
macro argument.

If SPEC is a function symbol, the function will be called with all
mandatory arguments of the macro and the result of the function call
will be used as a replacement for the macro.  Such functions typically
return a string, but may also return the symbol `abort' to indicate that
the macro should not be folded.

SIG optionally restricts how many macro arguments are consumed.  It
should be of the form required by the SIGNATURE argument of
`TeX-find-macro-boundaries'.  For example, if SIGNATURE is an integer n,
then at most n total arguments are consumed, while if it is a cons
cell (p . q), then at most p optional and q mandatory arguments are
allowed.

Setting this variable does not take effect immediately.  Use Customize
or reset the mode."
  :type `(repeat (group ,TeX-fold--spec-type
                        (repeat :tag "Macros" (string))))
  :package-version '(auctex . "14.1.1"))