1 ;;; hologo.el --- AUCTeX style for `hologo.sty' (v1.10)
3 ;; Copyright (C) 2015 Free Software Foundation, Inc.
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
10 ;; This file is part of AUCTeX.
12 ;; AUCTeX is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
17 ;; AUCTeX is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
24 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
29 ;; This file adds support for `hologo.sty' (v1.10) from 2012/04/26.
30 ;; `hologo.sty' is part of TeXLive.
34 (defvar LaTeX-hologo-logo-names
86 "List of logos provided by \"hologo.sty\".")
88 (defvar LaTeX-hologo-key-val-options-global
89 '(("break" ("true" "false"))
90 ("hyphenbreak" ("true" "false"))
91 ("spacebreak" ("true" "false"))
92 ("discretionarybreak" ("true" "false")))
93 "Global key=value options for hologo macros.")
95 (defvar LaTeX-hologo-key-val-options-local
96 '(("variant" ("sf" "sc" ; BibTeX
98 "narrow" "simple" ; SliTeX, ConTeXt
99 "space" "hyphen" "runtogether"))) ; plainTeX
100 "Local key=value options for hologo macros.")
107 ;; Insert logo macros
108 '("hologo" (TeX-arg-eval completing-read
109 "Logo name: " LaTeX-hologo-logo-names))
111 '("Hologo" (TeX-arg-eval completing-read
112 "Logo name: " LaTeX-hologo-logo-names))
115 '("hologoSetup" (TeX-arg-key-val LaTeX-hologo-key-val-options-global))
120 (let* ((logo (completing-read "Logo name: " LaTeX-hologo-logo-names))
121 (keyval (TeX-read-key-val
123 (cond ((string= logo "BibTeX")
124 (append '(("variant" ("sf" "sc")))
125 LaTeX-hologo-key-val-options-global))
126 ((string= logo "ConTeXt")
127 (append '(("variant" ("narrow" "simple")))
128 LaTeX-hologo-key-val-options-global))
129 ((string= logo "plainTeX")
130 (append '(("variant" ("space" "hyphen" "runtogether")))
131 LaTeX-hologo-key-val-options-global))
132 ((or (string= logo "SLiTeX")
133 (string= logo "SliTeX"))
134 (append '(("variant" ("lift" "narrow" "lift")))
135 LaTeX-hologo-key-val-options-global))
137 LaTeX-hologo-key-val-options-global)))))
138 (TeX-argument-insert logo optional)
139 (format "%s" keyval)))))
141 '("hologoDriverSetup" (TeX-arg-eval completing-read
145 "dvips" "dvipsone" "xdvi"
146 "xetex" "vtex" "driverfallback")))
149 (TeX-arg-key-val (("general") ("bibsf")
150 ("rm") ("sc") ("sf") ("sy") ("logo"))))
152 '("hologoLogoFontSetup"
155 (let* ((logo (completing-read "Logo name: "
164 (keyval (TeX-read-key-val
166 (cond ((string= logo "BibTeX")
168 ((string= logo "ExTeX")
170 ((string= logo "SliTeX")
172 ((or (string= logo "AmS")
173 (string= logo "NTS"))
175 ((string= logo "KOMAScript")
177 ((or (string= logo "METAFONT")
178 (string= logo "METAPOST"))
182 (TeX-argument-insert logo optional)
183 (format "%s" keyval)))))
185 ;; Additional user macros
187 (TeX-arg-eval completing-read
188 "Logo name: " LaTeX-hologo-logo-names)
191 (let ((setup (TeX-read-key-val
193 (append LaTeX-hologo-key-val-options-local
194 LaTeX-hologo-key-val-options-global))))
195 (format "%s" setup)))))
198 (TeX-arg-eval completing-read
199 "Logo name: " LaTeX-hologo-logo-names)
202 (let ((setup (TeX-read-key-val
204 (append LaTeX-hologo-key-val-options-local
205 LaTeX-hologo-key-val-options-global))))
206 (format "%s" setup)))))
210 '("hologoEntry" "Logo name" "Variant" "Since"))
213 (when (and (featurep 'font-latex)
214 (eq TeX-install-font-lock 'font-latex-setup))
215 (font-latex-add-keywords '(("hologo" "{")
218 (font-latex-add-keywords '(("hologoSetup" "{")
219 ("hologoLogoSetup" "{{")
220 ("hologoDriverSetup" "{")
221 ("hologoFontSetup" "{")
222 ("hologoLogoFontSetup" "{{")
223 ("hologoVariant" "{{")
224 ("HologoVariant" "{{")
226 ("hologoEntry" "{{{"))
230 (defvar LaTeX-hologo-package-options nil
231 "Package options for the hologo package.")
233 ;;; hologo.el ends here