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