 
 (defface danylo/latex-equation-face-main
   '((t (:foreground "orange"
-		    :weight bold
+		    :weight normal
 		    :inherit default)))
   "Face for org-mode equation delimiters."
   :group 'danylo)

			 (require 'helm-mode)
			 (add-to-list 'helm-completing-read-handlers-alist
				      '(LaTeX-environment
					. helm-completing-read-default-handler))))
	 ;; Face remaps
	 (LaTeX-mode . (lambda ()
			 (setq-local face-remapping-alist
				     '((font-latex-math-face
					. danylo/latex-equation-face-main))))))
  :init (setq TeX-source-correlate-method 'synctex
	      TeX-source-correlate-start-server t
	      TeX-auto-save t

(define-minor-mode danylo/latex-font-lock-mode
  "LaTeX equation font locking."
  :lighter " latex-highlight"
  ;; Highlight $...$ and $$...$$
  (font-lock-add-keywords
   nil `((,(concat "\\(?:\\$\\$?\\)"
		   "\\(\\(?:[^$]*\n\\)*?[^$]*\\)"
		   "\\(?:\\$?\\$\\)")
	  (0 'danylo/latex-equation-face-main t))
	 (,(format "\\(\\$\\)" arg)
	  (0 'danylo/latex-equation-face-faded t))))
  ;; Highlight \begin{...}...\end{...}
  (mapcar
   (lambda (arg)
     (font-lock-add-keywords
      nil `((,(concat "\\(?:\\\\begin{" arg "[\\*]?}\\)"
		      "\\(\\(?:.*\n\\)*?.*\\)"
		      "\\(?:\\\\end{" arg "[\\*]?}\\)")
	     (0 'danylo/latex-equation-face-main t))
	    (,(format "\\(\\\\begin{%s[\\*]?}\\)" arg)
	     (0 'danylo/latex-equation-face-faded t))
	    (,(format "\\(\\\\end{%s[\\*]?}\\)" arg)
	     (0 'danylo/latex-equation-face-faded t)))))
   '("equation" "align" "alignat" "gather"
     "subequations" "multline" "optimization"))
  ;; Enable multiline fontification
  (set (make-local-variable 'font-lock-multiline) t))

;;; ..:: Syntax checking ::..

