"Fossies" - the Fresh Open Source Software Archive

Member "auctex-12.3/tex-style.el" (18 Oct 2020, 13837 Bytes) of package /linux/misc/auctex-12.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lisp source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "tex-style.el": 12.2_vs_12.3.

    1 ;;; tex-style.el --- Customizable variables for AUCTeX style files
    2 
    3 ;; Copyright (C) 2005, 2007, 2009, 2012-2020 Free Software Foundation, Inc.
    4 
    5 ;; Author: Reiner Steib <Reiner.Steib@gmx.de>
    6 ;; Keywords: tex, wp, convenience
    7 
    8 ;; This file is free software; you can redistribute it and/or modify
    9 ;; it under the terms of the GNU General Public License as published by
   10 ;; the Free Software Foundation; either version 3, or (at your option)
   11 ;; any later version.
   12 
   13 ;; This file is distributed in the hope that it will be useful,
   14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
   15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16 ;; GNU General Public License for more details.
   17 
   18 ;; You should have received a copy of the GNU General Public License
   19 ;; along with GNU Emacs; see the file COPYING.  If not, write to
   20 ;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
   21 ;; Boston, MA 02110-1301, USA.
   22 
   23 ;;; Commentary:
   24 
   25 ;; This file provides customizable variables for AUCTeX style files.
   26 
   27 ;;; Code:
   28 
   29 (defgroup LaTeX-style nil
   30   "Support for special LaTeX style files in AUCTeX."
   31   :group 'LaTeX-macro)
   32 
   33 ;; Note: We don't have any defcustom in plain TeX style files yet.  Else we
   34 ;; should also create a TeX-style group.
   35 
   36 ;; Common
   37 
   38 (defcustom LaTeX-reftex-ref-style-auto-activate t
   39   "Whether to activate automatically RefTeX reference styles."
   40   :type 'boolean
   41   :group 'LaTeX-style)
   42 
   43 (defcustom LaTeX-reftex-cite-format-auto-activate t
   44   "Whether to activate automatically RefTeX citation format."
   45   :type 'boolean
   46   :group 'LaTeX-style)
   47 
   48 ;; style/amsmath.el
   49 
   50 (defcustom LaTeX-amsmath-label nil
   51   "Default prefix to amsmath equation labels.
   52 
   53 Amsmath equations include \"align\", \"alignat\", \"xalignat\",
   54 \"multline\", \"flalign\" and \"gather\".  If it is nil,
   55 `LaTeX-equation-label' is used."
   56   :group 'LaTeX-label
   57   :type '(choice (const :tag "Use `LaTeX-equation-label'" nil)
   58          (string)))
   59 
   60 ;; style/beamer.el
   61 
   62 (defcustom LaTeX-beamer-section-labels-flag nil
   63   "If non-nil section labels are added"
   64   :type 'boolean
   65   :group 'LaTeX-style)
   66 
   67 (defcustom LaTeX-beamer-item-overlay-flag t
   68   "If non-nil do prompt for an overlay in itemize-like environments."
   69   :type 'boolean
   70   :group 'LaTeX-style)
   71 
   72 (defcustom LaTeX-beamer-themes 'local
   73   "Presentation themes for the LaTeX beamer package.
   74 It can be a list of themes or a function.  If it is the symbol
   75 `local', search only once per buffer."
   76   :group 'LaTeX-style
   77   :type
   78   '(choice
   79     (const :tag "TeX search" LaTeX-beamer-search-themes)
   80     (const :tag "Search once per buffer" local)
   81     (function :tag "Other function")
   82     (list
   83      :value
   84      ;; Work around (bug in customize?), see
   85      ;; <news:v9is48jrj1.fsf@marauder.physik.uni-ulm.de>
   86      ("Antibes" "Bergen" "Berkeley" "Berlin" "Boadilla" "Copenhagen"
   87       "Darmstadt" "Dresden" "Frankfurt" "Goettingen" "Hannover"
   88       "Ilmenau" "JuanLesPins" "Luebeck" "Madrid" "Malmoe" "Marburg"
   89       "Montpellier" "PaloAlto" "Pittsburgh" "Rochester" "Singapore"
   90       "Szeged" "Warsaw")
   91      (set :inline t
   92       (const "Antibes")
   93       (const "Bergen")
   94       (const "Berkeley")
   95       (const "Berlin")
   96       (const "Boadilla")
   97       (const "Copenhagen")
   98       (const "Darmstadt")
   99       (const "Dresden")
  100       (const "Frankfurt")
  101       (const "Goettingen")
  102       (const "Hannover")
  103       (const "Ilmenau")
  104       (const "JuanLesPins")
  105       (const "Luebeck")
  106       (const "Madrid")
  107       (const "Malmoe")
  108       (const "Marburg")
  109       (const "Montpellier")
  110       (const "PaloAlto")
  111       (const "Pittsburgh")
  112       (const "Rochester")
  113       (const "Singapore")
  114       (const "Szeged")
  115       (const "Warsaw"))
  116      (repeat :inline t
  117          :tag "Other"
  118          (string)))))
  119 
  120 (defcustom LaTeX-beamer-inner-themes 'local
  121   "Presentation inner themes for the LaTeX beamer package.
  122 It can be a list of themes or a function.  If it is the symbol
  123 `local', search only once per buffer."
  124   :group 'LaTeX-style
  125   :type '(choice
  126     (const :tag "TeX search" LaTeX-beamer-search-inner-themes)
  127     (const :tag "Search once per buffer" local)
  128     (function :tag "Other function")
  129     (list
  130      :value ("circles" "default" "inmargin" "rectangles" "rounded")
  131      (set :inline t
  132       (const "circles")
  133       (const "default")
  134       (const "inmargin")
  135       (const "rectangles")
  136       (const "rounded"))
  137      (repeat :inline t
  138          :tag "Other"
  139          (string)))))
  140 
  141 (defcustom LaTeX-beamer-outer-themes 'local
  142   "Presentation outer themes for the LaTeX beamer package.
  143 It can be a list of themes or a function.  If it is the symbol
  144 `local', search only once per buffer."
  145   :group 'LaTeX-style
  146   :type
  147   '(choice
  148     (const :tag "TeX search" LaTeX-beamer-search-outer-themes)
  149     (const :tag "Search once per buffer" local)
  150     (function :tag "Other function")
  151     (list
  152      :value
  153      ("default" "infolines" "miniframes" "shadow" "sidebar" "smoothbars"
  154       "smoothtree" "split" "tree")
  155      (set :inline t
  156       (const "default")
  157       (const "infolines")
  158       (const "miniframes")
  159       (const "shadow")
  160       (const "sidebar")
  161       (const "smoothbars")
  162       (const "smoothtree")
  163       (const "split")
  164       (const "tree"))
  165      (repeat :inline t
  166          :tag "Other"
  167          (string)))))
  168 
  169 (defcustom LaTeX-beamer-color-themes 'local
  170   "Presentation color themes for the LaTeX beamer package.
  171 It can be a list of themes or a function.  If it is the symbol
  172 `local', search only once per buffer."
  173   :group 'LaTeX-style
  174   :type
  175   '(choice
  176     (const :tag "TeX search" LaTeX-beamer-search-color-themes)
  177     (const :tag "Search once per buffer" local)
  178     (function :tag "Other function")
  179     (list
  180      :value
  181      ("albatross" "beetle" "crane" "default" "dolphin" "dove" "fly" "lily"
  182       "orchid" "rose" "seagull" "seahorse" "sidebartab" "structure" "whale")
  183      (set :inline t
  184       (const "albatross")
  185       (const "beetle")
  186       (const "crane")
  187       (const "default")
  188       (const "dolphin")
  189       (const "dove")
  190       (const "fly")
  191       (const "lily")
  192       (const "orchid")
  193       (const "rose")
  194       (const "seagull")
  195       (const "seahorse")
  196       (const "sidebartab")
  197       (const "structure")
  198       (const "whale"))
  199      (repeat :inline t
  200          :tag "Other"
  201          (string)))))
  202 
  203 (defcustom LaTeX-beamer-font-themes 'local
  204   "Presentation font themes for the LaTeX beamer package.
  205 It can be a list of themes or a function.  If it is the symbol
  206 `local', search only once per buffer."
  207   :group 'LaTeX-style
  208   :type
  209   '(choice
  210     (const :tag "TeX search" LaTeX-beamer-search-font-themes)
  211     (const :tag "Search once per buffer" local)
  212     (function :tag "Other function")
  213     (list
  214      :value
  215      ("default" "professionalfonts" "serif" "structurebold"
  216       "structureitalicserif" "structuresmallcapsserif")
  217      (set :inline t
  218       (const "default")
  219       (const "professionalfonts")
  220       (const "serif")
  221       (const "structurebold")
  222       (const "structureitalicserif")
  223       (const "structuresmallcapsserif"))
  224      (repeat :inline t
  225          :tag "Other"
  226          (string)))))
  227 
  228 ;; style/biblatex.el
  229 
  230 (defvar LaTeX-biblatex-use-Biber t
  231   "Whether to use Biber with biblatex.
  232 
  233 This variable is intended to be used as a file local variable to
  234 override the autodetection of the biblatex backend.")
  235 (make-variable-buffer-local 'LaTeX-biblatex-use-Biber)
  236 (put 'LaTeX-biblatex-use-Biber 'safe-local-variable #'booleanp)
  237 
  238 ;; style/comment.el
  239 
  240 (defcustom LaTeX-comment-env-list '("comment")
  241   "List of environment names defined with comment.sty.
  242 Setting this variable does not take effect unless you
  243 reinitialize affected buffers."
  244   :type '(repeat string)
  245   :group 'LaTeX-style)
  246 
  247 ;; style/csquotes.el
  248 
  249 (defcustom LaTeX-csquotes-quote-after-quote nil
  250   "Initial value of `TeX-quote-after-quote' for `csquotes.el'"
  251   :type 'boolean
  252   :group 'LaTeX-style)
  253 
  254 (defcustom LaTeX-csquotes-open-quote ""
  255   "Opening quotation mark to be used with the csquotes package.
  256 The specified string will be used for `TeX-open-quote' (and override
  257 any language-specific setting) only if both `LaTeX-csquotes-open-quote'
  258 and `LaTeX-csquotes-close-quote' are non-empty strings."
  259   :type 'string
  260   :group 'LaTeX-style)
  261 
  262 (defcustom LaTeX-csquotes-close-quote ""
  263   "Closing quotation mark to be used with the csquotes package.
  264 The specified string will be used for `TeX-close-quote' (and override
  265 any language-specific setting) only if both `LaTeX-csquotes-open-quote'
  266 and `LaTeX-csquotes-close-quote' are non-empty strings."
  267   :type 'string
  268   :group 'LaTeX-style)
  269 
  270 ;; style/emp.el
  271 
  272 (defcustom LaTeX-write18-enabled-p t
  273   "If non-nil, insert automatically the \\write18 calling metapost.
  274 When disabled, you have to use mpost on the mp files automatically
  275 produced by emp.sty and then re-LaTeX the document."
  276   :type 'boolean
  277   :group 'LaTeX-style)
  278 
  279 ;; style/exam.el
  280 
  281 (defcustom LaTeX-exam-reftex-quick-id-key ?x
  282   "Unique letter identifying exam class macros in RefTeX.
  283 
  284 A character argument for quick identification when RefTeX inserts
  285 new references with `reftex-reference'.  It must be unique.  It
  286 is initialized to ?x."
  287   :group 'LaTeX-style
  288   :type 'character)
  289 
  290 (defcustom LaTeX-exam-label "exm:"
  291   "Default prefix to labels in environments of exam class."
  292   :group 'LaTeX-style
  293   :type 'string)
  294 
  295 ;; style/fontspec.el
  296 
  297 (defcustom LaTeX-fontspec-arg-font-search t
  298   "If `LaTeX-fontspec-arg-font' should search for fonts.
  299 If the value is t, fonts are retrieved automatically and provided
  300 for completion.  If the value is nil,
  301 `LaTeX-fontspec-font-list-default' is used for completion.  If
  302 the value is `ask', you are asked for the method to use every
  303 time `LaTeX-fontspec-arg-font' is called.
  304 
  305 `LaTeX-fontspec-arg-font' calls `luaotf-load --list=basename' to
  306 automatically get the list of fonts.  This requires
  307 `luaotfload-tool' version 2.3 or higher in order to work."
  308   :group 'LaTeX-style
  309   :type '(choice
  310       (const :tag "Search automatically" t)
  311       (const :tag "Use default font list" nil)
  312       (const :tag "Ask what to do" ask)))
  313 
  314 (defcustom LaTeX-fontspec-font-list-default nil
  315   "List of default fonts to be used as completion for
  316 `LaTeX-fontspec-arg-font'."
  317   :group 'LaTeX-style
  318   :type '(repeat (string :tag "Font")))
  319 
  320 ;; style/graphicx.el
  321 
  322 (defcustom LaTeX-includegraphics-extensions
  323   '("eps" "jpe?g" "pdf" "png")
  324   "Extensions for images files used by \\includegraphics."
  325   :group 'LaTeX-style
  326   :type '(list (set :inline t
  327             (const "eps")
  328             (const "jpe?g")
  329             (const "pdf")
  330             (const "png"))
  331            (repeat :inline t
  332                :tag "Other"
  333                (string))))
  334 
  335 (defcustom LaTeX-includegraphics-strip-extension-flag t
  336   "Non-nil means to strip known extensions from image file name."
  337   :group 'LaTeX-style
  338   :type 'boolean)
  339 
  340 (defcustom LaTeX-includegraphics-read-file
  341   'LaTeX-includegraphics-read-file-TeX
  342   "Function for reading \\includegraphics files.
  343 
  344 `LaTeX-includegraphics-read-file-TeX' lists all graphic files
  345 found in the TeX search path.
  346 
  347 `LaTeX-includegraphics-read-file-relative' lists all graphic files
  348 in the master directory and its subdirectories and inserts the
  349 relative file name.
  350 
  351 The custom option `simple' works as
  352 `LaTeX-includegraphics-read-file-relative' but it lists all kind of
  353 files.
  354 
  355 Inserting the subdirectory in the filename (as
  356 `LaTeX-includegraphics-read-file-relative') is discouraged by
  357 `epslatex.ps'."
  358   ;; ,----[ epslatex.ps; Section 12; (page 26) ]
  359   ;; | Instead of embedding the subdirectory in the filename, there are two
  360   ;; | other options
  361   ;; |   1. The best method is to modify the TeX search path [...]
  362   ;; |   2. Another method is to specify sub/ in a \graphicspath command
  363   ;; |      [...].  However this is much less efficient than modifying the
  364   ;; |      TeX search path
  365   ;; `----
  366   ;; See "Inefficiency" and "Unportability" in the same section for more
  367   ;; information.
  368   :group 'LaTeX-style
  369   :type '(choice (const :tag "TeX" LaTeX-includegraphics-read-file-TeX)
  370          (const :tag "relative"
  371             LaTeX-includegraphics-read-file-relative)
  372          (const :tag "simple" (lambda ()
  373                     (file-relative-name
  374                      (read-file-name "Image file: ")
  375                      (TeX-master-directory))))
  376          (function :tag "other")))
  377 
  378 ;; style/revtex4-2.el
  379 
  380 (defcustom LaTeX-revtex4-2-video-label "vid:"
  381   "Default prefix to labels in video environments of REVTeX4-2 class."
  382   :group 'LaTeX-label
  383   :type 'string)
  384 
  385 (defcustom LaTeX-revtex4-2-video-reftex-quick-id-key ?v
  386   "Unique letter identifying \"video\" environment in RefTeX.
  387 
  388 A character argument for quick identification when RefTeX inserts
  389 new references with `reftex-reference'.  It must be unique.  It
  390 is initialized to ?v."
  391   :group 'LaTeX-style
  392   :type 'character)
  393 
  394 ;; style/shortvrb.el
  395 
  396 (defcustom LaTeX-shortvrb-chars nil
  397   "List of characters toggling verbatim mode.
  398 When your document uses the shortvrb style and you have a
  399 \\MakeShortVrb{\\|} in your file to write verbatim text as
  400 |text|, then set this variable to the list (?|).  Then AUCTeX
  401 fontifies |text| as verbatim.
  402 
  403 Preferably, you should do this buffer-locally using a file
  404 variable near the end of your document like so:
  405 
  406   %% Local Variables:
  407   %% LaTeX-shortvrb-chars: (?|)
  408   %% End:
  409 
  410 When you customize this variable to a non-nil value, then it
  411 becomes the default value meaning that verbatim fontification is
  412 always performed for the characters in the list, no matter if
  413 your document actually defines shortvrb chars using
  414 \\MakeShortVrb."
  415   :group 'LaTeX-style
  416   :type '(repeat character))
  417 (put 'LaTeX-shortvrb-chars 'safe-local-variable 'listp)
  418 
  419 ;; style/splitidx.el
  420 
  421 (defcustom LaTeX-splitidx-sindex-reftex-quick-id-key ?s
  422   "Unique letter identifying \"\\sindex\" macro in RefTeX.
  423 
  424 A character argument for quick identification of \"\\sindex\"
  425 when RefTeX inserts new index entries with `reftex-index'.  It
  426 must be unique.  It is initialized to ?s when added to
  427 `reftex-index-macros'."
  428   :group 'LaTeX-style
  429   :type 'character)
  430 
  431 ;; Don't look for file-local variables before this line, so that the
  432 ;; example in the docstring of `LaTeX-shortvrb-chars' isn't picked up.
  433 
  434 
  435 (provide 'tex-style)
  436 
  437 ;;; tex-style.el ends here