"Fossies" - the Fresh Open Source Software Archive

Member "auctex-12.3/style/ltugboat.el" (18 Oct 2020, 6578 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 "ltugboat.el": 12.2_vs_12.3.

    1 ;;; ltugboat.el --- AUCTeX style for `ltugboat.cls' (v2.22)
    2 
    3 ;; Copyright (C) 2019 Free Software Foundation, Inc.
    4 
    5 ;; Author: Arash Esbati <arash@gnu.org>
    6 ;; Maintainer: auctex-devel@gnu.org
    7 ;; Created: 2019-05-11
    8 ;; Keywords: tex
    9 
   10 ;; This file is part of AUCTeX.
   11 
   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)
   15 ;; any later version.
   16 
   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.
   21 
   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
   25 ;; 02110-1301, USA.
   26 
   27 ;;; Commentary:
   28 
   29 ;; This file adds support for `ltugboat.cls' (v2.22) from 2019/11/09.
   30 ;; `ltugboat.cls' is part of TeXLive.
   31 
   32 ;;; Code:
   33 
   34 ;; Silence the compiler:
   35 (declare-function font-latex-add-keywords
   36           "font-latex"
   37           (keywords class))
   38 
   39 (defun LaTeX-env-ltugboat-verbatim (environment)
   40   "Insert verbatim environment with an optional argument."
   41   (let* ((crm-separator (regexp-quote TeX-esc))
   42      (opts (mapconcat #'identity
   43               (TeX-completing-read-multiple
   44                (TeX-argument-prompt t nil "command(s)")
   45                '("\\tiny"  "\\scriptsize" "\\footnotesize"
   46                  "\\small" "\\normalsize" "\\large"
   47                  "\\Large" "\\LARGE"      "\\huge"
   48                  "\\Huge"  "\\makevmeta"  "\\ruled")
   49                nil nil TeX-esc)
   50               TeX-esc)))
   51     (LaTeX-insert-environment environment
   52                   (when (and opts
   53                      (not (string= opts "")))
   54                 (concat LaTeX-optop opts LaTeX-optcl)))))
   55 
   56 (TeX-add-style-hook
   57  "ltugboat"
   58  (lambda ()
   59 
   60    ;; Run the style hook for mflogo in order to define the macros \MF
   61    ;; and \MP:
   62    (TeX-run-style-hooks "mflogo")
   63 
   64    ;; Preliminaries: ltugboat.cls suppresses \part & \subparagraph
   65    (LaTeX-largest-level-set "section")
   66    (LaTeX-add-counters "section" "subsection" "subsubsection" "paragraph"
   67                "figure" "table")
   68 
   69    ;; 6 Divisions of the paper
   70    (TeX-add-symbols
   71     '("nameref" TeX-arg-ref))
   72 
   73    (setq TeX-complete-list
   74      (append
   75       '(("\\\\nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
   76       TeX-complete-list))
   77 
   78    ;; 6.1 Abstracts
   79    (LaTeX-add-environments '("abstract")
   80                '("longabstract"))
   81 
   82    ;; 6.2 Appendices: Cater for appendix environment and don't indent
   83    ;; the content
   84    (LaTeX-add-environments '("appendix"))
   85 
   86    (unless (string-match-p "appendix" LaTeX-document-regexp)
   87      (set (make-local-variable 'LaTeX-document-regexp)
   88       (concat LaTeX-document-regexp "\\|" "appendix")))
   89 
   90    (TeX-add-symbols
   91     ;; 7 Titles, addresses and so on
   92     '("shortTitle"  "Short title")
   93     '("shortAuthor" LaTeX-arg-author)
   94     '("address"     "Address")
   95     '("netaddress"  "Email address")
   96     '("personalURL" "Web page")
   97     '("ORCID"       "Digital identifier")
   98 
   99     ;; 7.1 Compilation articles
  100     '("contributor" "Contributor")
  101     '("makesignature" 0))
  102 
  103    ;; 8 Verbatim text
  104    (LaTeX-add-environments
  105     '("verbatim" LaTeX-env-ltugboat-verbatim))
  106 
  107    ;; 10.1 Acronyms and logos
  108    (TeX-add-symbols
  109     '("acro" "Acronym")
  110     "AMS"
  111     "AmS"
  112     "AmSLaTeX"
  113     "AmSTeX"
  114     "ANSI"
  115     "API"
  116     "ASCII"
  117     "aw"
  118     "AW"
  119     "BibLaTeX"
  120     "BibTeX"
  121     "BSD"
  122     "CandT"
  123     "ConTeXt"
  124     "CMkIV"
  125     "Cplusplus"
  126     "CPU"
  127     "CSczabbr"
  128     "CSS"
  129     "CSTUG"
  130     "CSV"
  131     "CTAN"
  132     "DTD"
  133     "DTK"
  134     "DVD"
  135     "DVI"
  136     "DVIPDFMx"
  137     "DVItoVDU"
  138     "ECMS"
  139     "EPS"
  140     "eTeX"
  141     "ExTeX"
  142     "FAQ"
  143     "FTP"
  144     "Ghostscript"
  145     "GNU"
  146     "GUI"
  147     "Hawaii"
  148     "HTML"
  149     "HTTP"
  150     "iOS"
  151     "IDE"
  152     "IEEE"
  153     "ISBN"
  154     "ISO"
  155     "ISSN"
  156     "JPEG"
  157     "JTeX"
  158     "JoT"
  159     "KOMAScript"
  160     "LAMSTeX"
  161     "LuaHBTeX"
  162     "LuaHBLaTeX"
  163     "LuaLaTeX"
  164     "LuaTeX"
  165     "LyX"
  166     "macOS"
  167     "MacOSX"
  168     "MathML"
  169     "mf"
  170     "MFB"
  171     "MkIV"
  172     "mp"
  173     "NTG"
  174     "NTS"
  175     "OMEGA"
  176     "OCP"
  177     "OOXML"
  178     "OTF"
  179     "OTP"
  180     "mtex"
  181     "Pas"
  182     "pcMF"
  183     "PCteX"
  184     "pcTeX"
  185     "pdflatex"
  186     "pdftex"
  187     "PDF"
  188     "PGF"
  189     "PHP"
  190     "PiCTeX"
  191     "plain"
  192     "PNG"
  193     "POBox"
  194     "PS"
  195     "PSTricks"
  196     "RTF"
  197     "SC"
  198     "SGML"
  199     "SliTeX"
  200     "SQL"
  201     "stTeX"
  202     "STIX"
  203     "SVG"
  204     "TANGLE"
  205     "TB"
  206     "TIFF"
  207     "TP"
  208     "TeXhax"
  209     "TeXMaG"
  210     "TeXtures"
  211     "Textures"
  212     "TeXworks"
  213     "TeXXeT"
  214     "TFM"
  215     "Thanh"
  216     "TikZ"
  217     "ttn"
  218     "TTN"
  219     "TUB"
  220     "TUG"
  221     "tug"
  222     "UG"
  223     "UNIX"
  224     "VAX"
  225     "VnTeX"
  226     "VorTeX"
  227     "XML"
  228     "WEB"
  229     "WEAVE"
  230     "WYSIWYG"
  231     "XeTeX"
  232     "XeLaTeX"
  233     "XHTML"
  234     "XSL"
  235     "XSLFO"
  236     "XSLT"
  237 
  238     ;; 10.2 Other special typesetting
  239     '("Dash" 0)
  240     '("cs" (TeX-arg-eval let ((macro (completing-read
  241                       (TeX-argument-prompt optional nil
  242                                "Command")
  243                       (TeX-symbol-list))))
  244              (format "%s" macro)))
  245     '("env" (TeX-arg-eval let ((env (completing-read
  246                      (TeX-argument-prompt optional nil
  247                               "Environment")
  248                      (LaTeX-environment-list))))
  249               (format "%s" env)))
  250     '("meta"      "Text")
  251     '("tubbraced" "Text")
  252     '("nth"       "Number")
  253 
  254     ;; 12 Bibliography
  255     '("SetBibJustification"
  256       (TeX-arg-eval completing-read
  257             (TeX-argument-prompt optional nil "Justification")
  258             '("\\raggedright"  "\\sloppy"))))
  259 
  260    ;; Fontification
  261    (when (and (featurep 'font-latex)
  262           (eq TeX-install-font-lock 'font-latex-setup))
  263      (font-latex-add-keywords '(("shortTitle"   "{")
  264                 ("shortAuthor"  "{")
  265                 ("netaddress"   "{")
  266                 ("personalURL"  "{")
  267                 ("ORCID"        "{")
  268                 ("contributor"  "{")
  269                 ("acro"         "{")
  270                 ("cs"           "{")
  271                 ("env"          "{")
  272                 ("meta"         "{")
  273                 ("tubbraced"    "{")
  274                 ("nth"          "{"))
  275                   'textual)
  276      (font-latex-add-keywords '(("makesignature"   "")
  277                 ("SetBibJustification"  "{"))
  278                   'function)
  279      (font-latex-add-keywords '(("nameref" "{"))
  280                   'reference)))
  281  LaTeX-dialect)
  282 
  283 (defvar LaTeX-ltugboat-class-options
  284   '("draft" "final" "preprint"
  285     "extralabel" "harvardcite" "noextralabel" "nonumber" "numbersec"
  286     "onecolumn" "rawcite" "runningfull" "runningminimal" "runningoff"
  287     "a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper"
  288     "titlepage" "notitlepage" "twocolumn" "leqno" "fleqn" "openbib")
  289   "Package options for the ltugboat class.")
  290 
  291 ;;; ltugboat.el ends here