2017-02-19 18:57:16 -05:00
|
|
|
;; -*- no-byte-compile: t; -*-
|
|
|
|
;;; lang/latex/packages.el
|
|
|
|
|
2022-03-31 06:22:00 -07:00
|
|
|
(package! auctex
|
|
|
|
:recipe (:files ("*.el" "*.info" "dir"
|
2024-07-09 00:24:27 -04:00
|
|
|
"doc" "etc" "images" "latex" "style")
|
|
|
|
;; HACK: Auctex has a post-install step that generates tex-site.el
|
|
|
|
;; and *.texi documentation files, which largely assumes the user
|
|
|
|
;; is on a Linux system with various shell tools like sed, gnu
|
|
|
|
;; make, tex, etc. -- an assumption I can't safely make about
|
|
|
|
;; Doom's users, so reinvent its 'make tex-site.el' task in elisp:
|
|
|
|
:pre-build
|
|
|
|
(with-temp-file "tex-site.el"
|
|
|
|
(insert-file-contents "tex-site.el.in")
|
|
|
|
(while (re-search-forward "@\\(\\(?:AUCTEX\\|lisp\\)[^@]+\\)@" nil t)
|
|
|
|
(pcase (match-string 1)
|
|
|
|
("AUCTEXVERSION"
|
|
|
|
(replace-match (with-temp-buffer
|
|
|
|
(insert-file-contents "auctex.el" nil 0 1024)
|
|
|
|
(save-match-data
|
|
|
|
(if (re-search-forward "^;; Version: \\([^\n-]+\\)" nil t)
|
|
|
|
(match-string-no-properties 1)
|
|
|
|
"Unknown")))
|
|
|
|
t t))
|
|
|
|
("AUCTEXDATE"
|
|
|
|
(when-let* ((time (cdr (doom-call-process "git" "log" "-n1" "--pretty=tformat:%ct")))
|
|
|
|
(time (string-to-number time)))
|
|
|
|
(replace-match (format-time-string "%Y-%m-%d %T" time) t t)))
|
|
|
|
("lispautodir"
|
|
|
|
(replace-match
|
|
|
|
(prin1-to-string
|
|
|
|
`(if (file-writable-p "/usr/local/var/auctex")
|
|
|
|
"/usr/local/var/auctex"
|
|
|
|
,(file-name-concat doom-data-dir "auctex")))
|
|
|
|
t t))
|
|
|
|
((or "lisppackagedatadir" "lisppackagelispdir")
|
|
|
|
(replace-match "(directory-file-name (file-name-directory load-file-name))" t t))
|
|
|
|
(it (error "Unknown substitution variable in tex-site.el.in: %s" it))))))
|
2024-07-07 21:49:53 -04:00
|
|
|
:pin "764a53c8e93150f0edd169593a4d453810792abe")
|
|
|
|
(package! adaptive-wrap :pin "dea4e32c18d285a6ca9f72b1eadd61e27a555ed3")
|
2020-05-28 03:02:24 -04:00
|
|
|
(package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e")
|
2022-08-12 20:29:19 +02:00
|
|
|
(when (modulep! :editor evil +everywhere)
|
2024-02-05 16:36:41 -05:00
|
|
|
(package! evil-tex :pin "2a3177c818f106e6c11032ac261f8691f5e11f74"))
|
2018-01-01 20:48:23 +01:00
|
|
|
|
2021-11-24 13:08:34 +01:00
|
|
|
;; Optional module features.
|
2018-01-01 20:48:23 +01:00
|
|
|
|
2022-08-12 20:29:19 +02:00
|
|
|
(when (modulep! +cdlatex)
|
2024-02-05 16:36:41 -05:00
|
|
|
(package! cdlatex :pin "33770dec73138909714711b05a63e79da5a19ccd"))
|
2020-02-07 12:36:07 +02:00
|
|
|
|
2021-11-24 13:08:34 +01:00
|
|
|
;; Features according to other user selected options.
|
2017-02-19 18:57:16 -05:00
|
|
|
|
2022-08-12 20:29:19 +02:00
|
|
|
(when (modulep! :completion company)
|
2020-06-03 01:32:26 -04:00
|
|
|
(package! company-auctex :pin "9400a2ec7459dde8cbf1a5d50dfee4e300ed7e18")
|
2021-07-11 12:24:42 -04:00
|
|
|
(package! company-reftex :pin "42eb98c6504e65989635d95ab81b65b9d5798e76")
|
2023-02-21 19:32:39 -05:00
|
|
|
(package! company-math :pin "3eb006874e309ff4076d947fcbd61bb6806aa508"))
|