   (setq TeX-PDF-mode t)
   (setq TeX-electric-sub-and-superscript t)
   (setq TeX-insert-braces nil)
+  (setq TeX-electric-math '("$" . "$"))
   (add-hook 'LaTeX-mode-hook 'emacs-fast/latex-mode-hook))
 
 ;;;; ---------------- Other packages to manage LaTeX related stuff -----------------------

(use-package latex
  :ensure auctex
  :commands (TeX-mode LaTeX-mode LaTeX-mode-hook math-minor-mode)
  :mode     ("\\.[tT]e[xX]\\'" . LaTeX-mode)
  :bind (:map LaTeX-mode-map
              ("`e" . LaTeX-environment)
              ("`s" . LaTeX-section)


(defun emacs-fast/latex-mode-hook ()
  "Settings for LaTeX mode."
  (defvar whitespace-line-column)
  (setq fill-column 90)
  (setq whitespace-line-column 90)
  (setq-local company-backends emacs-fast/tex-mode-backends)
