From 6a3ca953dd8e795464d3a70de9bb53af356df7de Mon Sep 17 00:00:00 2001
From: Chizi123 <joelgrun@gmail.com>
Date: Sun, 03 Feb 2019 10:31:05 +0000
Subject: [PATCH] Added gnuplot and word counting for latex

---
 config.org |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/config.org b/config.org
index d48288a..407396b 100644
--- a/config.org
+++ b/config.org
@@ -6,6 +6,8 @@
     ;; (add-to-list 'exec-path "C:/msys64/usr/bin")
     (add-to-list 'exec-path "C:/msys64/mingw64/bin")
     (add-to-list 'exec-path "c:/Program Files/Racket")
+    (add-to-list 'exec-path "c:/Users/joelg/TeXcount_3_1_1")
+    (add-to-list 'exec-path "c:/Program Files/gnuplot")
     (setenv "PATH" (mapconcat #'identity exec-path path-separator)))
 #+END_SRC
 
@@ -647,6 +649,31 @@
   :config
   (latex-preview-pane-enable))
 #+END_SRC
+**** TeXcount
+     Word counts in latex
+     #+BEGIN_SRC emacs-lisp
+       (defun texcount ()
+	 (interactive)
+	 (let*
+	     ( (this-file (buffer-file-name))
+	       (enc-str (symbol-name buffer-file-coding-system))
+	       (enc-opt
+		(cond
+		 ((string-match "utf-8" enc-str) "-utf8")
+		 ((string-match "latin" enc-str) "-latin1")
+		 ("-encoding=guess")
+		 ) )
+	       (word-count
+		(with-output-to-string
+		  (with-current-buffer standard-output
+		    (call-process "texcount" nil t nil "-0" enc-opt this-file)
+		    ) ) ) )
+	   (message word-count)
+	   ) )
+       (add-hook 'LaTeX-mode-hook (lambda () (define-key LaTeX-mode-map (kbd "C-c c") 'texcount)))
+       (add-hook 'latex-mode-hook (lambda () (define-key latex-mode-map (kbd "C-c c") 'texcount)))
+     #+END_SRC
+
 *** PlantUML
 #+BEGIN_SRC emacs-lisp
 (use-package plantuml-mode

--
Gitblit v1.9.3