 	"settings for markdown mode"
 	(interactive)
 	(setq-default tab-width 4)
-	(setq-default indent-tabs-mode t))
+	(setq-default indent-tabs-mode t)
+	(setq markdown-enable-math t))
 (add-hook 'markdown-mode 'my-markdown-mode-config)
+(setq markdown-enable-math t)
 
 ;; adds support of the windows powershell
 (require 'powershell)

;; flyspell
(setq ispell-program-name "C:\\Program Files (x86)\\Aspell\\bin\\aspell.exe")
(global-set-key (kbd "<f6>") 'flyspell-buffer)
(dolist (hook '(text-mode-hook LaTeX-mode-hook))
	(add-hook hook (lambda () (flyspell-mode 1))))
;; cycle through dictionaries
(let ((langs '("english" "american" "deutsch" )))
	(setq lang-ring (make-ring (length langs)))
	(dolist (elem langs) (ring-insert lang-ring elem)))
(defun cycle-ispell-languages ()
	(interactive)
	(let ((lang (ring-ref lang-ring -1)))
		(ring-insert lang-ring lang)
		(ispell-change-dictionary lang)))
(global-set-key (kbd "C-<f6>") 'cycle-ispell-languages)

;; smartparens
(require 'smartparens-config)


;; commenting
(global-set-key (kbd "C-;") 'comment-or-uncomment-region-or-line)
(eval-after-load "LaTeX-mode"
	'(define-key LaTeX-mode-map (kbd "C-;") 'comment-or-uncomment-region-or-line))
(defun comment-or-uncomment-region-or-line ()
  "Comments or uncomments the region or the current line if there's no active region."
  (interactive)
