Another file that I've had lying virtually finished for a long time.

For some reason, I get "Symbol's function definition is void:
TeX-arg-key-val", and I'm not sure why?
-- 
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
My brain is my second favorite organ.
      -- Woody Allen
;;; pdfpages.el --- AUCTeX style for `pdfpages.sty'

;; Copyright (C) 2012 Free Software Foundation, Inc.

;; Author: Mads Jensen <[email protected]
;; Maintainer: [email protected]
;; Created: 2011-03-04
;; Keywords: tex

;; This file is part of AUCTeX.

;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.

;; AUCTeX is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with AUCTeX; see the file COPYING.  If not, write to the Free
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
;; 02110-1301, USA.

;;; Commentary:

;; This file adds support for `pdfpages.sty'.

;;; Code:

(defvar LaTeX-pdfpages-key-val-options
  '(("pages")
    ("nup")
    ("landscape" ("true" "false"))
    ("delta")
    ("offset")
    ("frame")
    ("column")
    ("columnstrict" ("true" "false"))
    ("openright" ("true" "false"))
    ("turn" ("true" "false"))
    ("noautoscale" ("true" "false"))
    ("fitpaper" ("true" "false"))
    ("reflect" ("true" "false"))
    ("signature")
    ("signature*")
    ("picturecommand")
    ("picturecommand*")
    ("pagetemplate")
    ("templatesize")
    ("rotateoversize" ("true" "false"))
    ("doublepages" ("true" "false"))
    ("doublepagestwist" ("true" "false"))
    ("doublepagestwistodd" ("true" "false"))
    ("doublepagestwist*" ("true" "false"))
    ("doublepagestwistodd*" ("true" "false"))
    ("lastpage")
    ("link" ("true" "false"))
    ("linkname")
    ("thread")
    ("threadname")
    ("linktotoc")
    ;; Additional hypertext options:
    ("linkfit" '("Fit" "FitH" "top" "FitV" "left" "FitB"
                 "FitBH" "top" "FitBV" "left" "Region"))
    ;; XXX I looked through a pdf specification, but the whole
    ;; specification (the actual ISO standard 32000) costs money, so I
    ;; didn't bother buying and browsing through it
    ("linktodocfit"
     '("/Fit" "/FitH" "/FitV" "/FitB" "/FitBV" "/FitR" "/Fit"))
    ("newwindow" ("true" "false"))
    ("linkfilename")
    ;; Experimental options:
    ("addtotoc")
    ("addtolist")
    ("survey")
    ("survey-nolink")
    ("xr-prefix")))

(TeX-add-style-hook
 "pdfpages"
 (lambda ()
   (TeX-add-symbols
    '("includepdf"
      [ TeX-arg-key-val LaTeX-pdfpages-key-val-options ] TeX-arg-file)
    ;; the `pages' option is not used in this command, so am removing it
    '("includepdfmerge"
      [ TeX-arg-key-val (remove '("pages") LaTeX-pdfpages-key-val-options) ]
      t)
    '("includepdfset" (TeX-arg-key-val LaTeX-pdfpages-key-val-options))
    "threadinfodict"
    "AddToSurvey"
    '("externaldocument" TeX-arg-file))

   (TeX-run-style-hooks "graphicx")

   ;; Fontification
   (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
     (font-latex-add-keywords '(("includepdf" "[{")
        			("includepdfmerge" "[{")
        			("includepdfset" "{"))
                                'function)
     ;; For syntactic fontification, e.g. verbatim constructs.
     (font-latex-set-syntactic-keywords)
     ;; Tell font-lock about the update.
     (setq font-lock-set-defaults nil)
     (font-lock-set-defaults))))

(defvar LaTeX-pdfpages-package-options '("final" "draft" "enable-survey")
  "Package options for the pdfpages packages.")

;;; pdfpages.el ends here

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to