# Change reftex-cite-format based on file type

I'm currently trying to transition my personal research writing from straight LaTeX to Rmarkdown to allow me to do better reproducible research, and I've run into one little snag.

Currently I have this in my init.el:

(eval-after-load 'reftex-vars
'(progn
;; (also some other reftex-related customizations)
(setq reftex-cite-format
'((?\C-m . "\\cite[]{%l}")
(?f . "\\footcite[][]{%l}")
(?a . "\\autocite[]{%l}")
(?t . "\\textcite[]{%l}")
(?p . "\\parencite[]{%l}")
(?o . "\\citepr[]{%l}")
(?n . "\\nocite{%l}")))))


I know I can add lines for Rmd-style citations ([@%l]), but I would like to be able to have the list of potential citation types be context-sensitive. Is there a way to customize reftex-cite-format based on the buffer I'm currently editing, so that I can see the LaTeX-style cites in .tex files, and the Rmd-style cites in .Rmd files?

(add-hook 'org-mode-hook (lambda ()