           (?f . "\\footcite[]{%l}")
           (?n . "\\nocite{%l}")
           (?b . "\\blockcquote[]{%l}{}")))
+  (unless (string-empty-p +latex-bibtex-file)
+    (setq reftex-default-bibliography (list (expand-file-name +latex-bibtex-file))))
   (map! :map reftex-mode-map
         :localleader :n ";" 'reftex-toc)
   (add-hook! 'reftex-toc-mode-hook

  ;; master, so we just have to wait.
  :init
  (setq-default preview-scale 1.4
                preview-scale-function '(lambda () (* (/ 10.0 (preview-document-pt)) preview-scale)))
  (add-hook! LaTeX-mode #'LaTeX-preview-setup))

(def-package! reftex
  :commands turn-on-reftex
  :init
  (setq reftex-plug-into-AUCTeX t
        reftex-toc-split-windows-fraction 0.3)
  (unless (string-empty-p +latex-bibtex-file)
    (setq reftex-default-bibliography (list (expand-file-name +latex-bibtex-file))))
  (add-hook! (latex-mode LaTeX-mode) #'turn-on-reftex)
  :config
  ;; Get ReTeX working with biblatex

            LaTeX-section-label)
          LaTeX-fill-break-at-separators nil
          LaTeX-item-indent 0) ; item indentation.

    (map! :map LaTeX-mode-map "C-j" nil)

    ;; Do not prompt for Master files, this allows auto-insert to add templates
    ;; to .tex files
    (add-hook! '(LaTeX-mode TeX-mode)
      (remove-hook 'find-file-hook (car find-file-hook) 'local))
    ;; Adding useful things for latex
    (add-hook! 'LaTeX-mode-hook
      #'(LaTeX-math-mode
         TeX-source-correlate-mode
         TeX-global-PDF-mode
         TeX-PDF-mode
         visual-line-mode))
    ;; Enable rainbow mode after applying styles to the buffer
    (add-hook 'TeX-update-style-hook #'rainbow-delimiters-mode)
    (when (featurep! :feature spellcheck)
