From 9eb8c7f1ce6c0bb239a2ff4ce41f14607b73f8ec Mon Sep 17 00:00:00 2001 From: Shinsuke OTA Date: Sun, 16 Sep 2018 13:39:49 +0900 Subject: [PATCH] [mod] updates for minted, latexmk and yatemplate --- init.el | 16 +++++++++++++++- inits/00_common.el | 3 --- inits/30_auctex.el | 12 ++++++++++++ inits/71_yaml.el | 2 +- inits/99_last.el | 34 ++++++++++++++++++++++++++++++++++ templates/10:Manual.*.tex | 5 +++++ templates/auto/10:Manual.*.el | 11 +++++++++++ 7 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 inits/99_last.el create mode 100644 templates/10:Manual.*.tex create mode 100644 templates/auto/10:Manual.*.el diff --git a/init.el b/init.el index 2adf343..b659812 100644 --- a/init.el +++ b/init.el @@ -39,6 +39,20 @@ (provide 'init) ;;; init.el ends here +;; (custom-set-variables +;; ;; custom-set-variables was added by Custom. +;; ;; If you edit it by hand, you could mess it up, so be careful. +;; ;; Your init file should contain only one such instance. +;; ;; If there is more than one, they won't work right. +;; '(package-selected-packages +;; (quote +;; (auctex helm magit zenburn-theme color-theme smart-mode-line company flycheck-popup-tip flycheck))) +;; (custom-set-faces +;; ;; custom-set-faces was added by Custom. +;; ;; If you edit it by hand, you could mess it up, so be careful. +;; ;; Your init file should contain only one such instance. +;; ;; If there is more than one, they won't work right. +;; ) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -46,7 +60,7 @@ ;; If there is more than one, they won't work right. '(package-selected-packages (quote - (auctex helm magit zenburn-theme color-theme smart-mode-line company flycheck-popup-tip flycheck))) + (yatemplate yasnippet zenburn-theme yaml-mode smart-mode-line powerline markdown-mode magit madhat2r-theme helm flycheck-popup-tip company color-theme auctex-latexmk atom-one-dark-theme)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/inits/00_common.el b/inits/00_common.el index d8b0ee0..b081bf4 100644 --- a/inits/00_common.el +++ b/inits/00_common.el @@ -5,8 +5,5 @@ ;; auto revert on (global-auto-revert-mode t) - -(add-hook 'find-file-hooks 'auto-insert) - (provide '00_common) ;;; 00_common.el ends here diff --git a/inits/30_auctex.el b/inits/30_auctex.el index 05f9732..a8e10ac 100644 --- a/inits/30_auctex.el +++ b/inits/30_auctex.el @@ -11,3 +11,15 @@ (setq LaTeX-indent-level 2) (setq LaTeX-item-indent 0) (setq LaTeX-brace-indent-level 2) + +(auctex-latexmk-setup) +(setq TeX-command-default "LatexMk") +(setq auctex-latexmk-inherit-TeX-PDF-mode t) + +;; find file in the present directory +(setq LaTeX-includegraphics-read-file 'LaTeX-includegraphics-read-file-relative) + +(add-hook 'LaTeX-mode-hook + (lambda () + (setq TeX-command-extra-options "-shell-escape") + )) diff --git a/inits/71_yaml.el b/inits/71_yaml.el index 823c44c..d6f2df6 100644 --- a/inits/71_yaml.el +++ b/inits/71_yaml.el @@ -1,3 +1,3 @@ -;;; (require 'yaml-mode) +(require 'yaml-mode) (add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode)) (define-key yaml-mode-map "\C-m" 'newline-and-indent) diff --git a/inits/99_last.el b/inits/99_last.el new file mode 100644 index 0000000..49eca6f --- /dev/null +++ b/inits/99_last.el @@ -0,0 +1,34 @@ +;;; 99_last.el --- last initialization -*- lexical-binding: t; -*- + +;; Copyright (C) 2018 Shinsuke OTA + +;; Author: Shinsuke OTA +;; Keywords: + +;; This program 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 of the License, or +;; (at your option) any later version. + +;; This program 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 this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(yas-global-mode 1) +(yatemplate-fill-alist) +(add-hook 'find-file-hooks 'auto-insert) + +(electric-pair-mode t) + +(provide '99_last) +;;; 99_last.el ends here diff --git a/templates/10:Manual.*.tex b/templates/10:Manual.*.tex new file mode 100644 index 0000000..c217b9f --- /dev/null +++ b/templates/10:Manual.*.tex @@ -0,0 +1,5 @@ +\documentclass[$0]{article} + +\begin{document} +$1 +\end{document} \ No newline at end of file diff --git a/templates/auto/10:Manual.*.el b/templates/auto/10:Manual.*.el new file mode 100644 index 0000000..4dc8e2b --- /dev/null +++ b/templates/auto/10:Manual.*.el @@ -0,0 +1,11 @@ +(TeX-add-style-hook + "10:Manual.*" + (lambda () + (TeX-add-to-alist 'LaTeX-provided-class-options + '(("article" "$0"))) + (TeX-run-style-hooks + "latex2e" + "article" + "art10")) + :latex) + -- GitLab