             ;; automatically to resolve the cross-references.
             ;; (setq org-latex-pdf-process '("latexmk -xelatex -quiet -shell-escape -f %f"))
 
-            ;; `org-latex-compiler' variable was introduced in org 9.0
-            ;; (setq org-latex-compiler "xelatex")
+            ;; Below value of `org-latex-pdf-process' with %latex will work in org 9.0+
             ;; (setq org-latex-pdf-process
             ;;       ;; `-shell-escape' is required when using the `minted' package
             ;;       '("%latex -interaction nonstopmode -shell-escape -output-directory %o %f"

                (progn
                  (setq org-latex-listings 'minted) ; default nil
                  ;; The default value of the `minted' package option `cachedir'
                  ;; is "cachedir=_minted-\jobname". That clutters the working
                  ;; directories with _minted* dirs. Instead create those cache
                  ;; dirs in temp folders.
                  (defvar latex-minted-cachedir (concat "cachedir="
                                                        temporary-file-directory
                                                        (getenv "USER")
                                                        "/.minted/\\jobname"))
                  (if (eq org-latex-create-formula-image-program 'dvipng)
                      ;; If `org-latex-create-formula-image-program' is set to
                      ;; `'dvipng', minted package cannot be used to show latex
                      ;; previews.
                      (add-to-list 'org-latex-packages-alist `(,latex-minted-cachedir "minted" nil))
                    (add-to-list 'org-latex-packages-alist `(,latex-minted-cachedir "minted")))

                  ;; minted package options (applied to embedded source codes)
                  (setq org-latex-minted-options

            (defvar modi/ox-latex-use-minted t
              "Use `minted' package for listings.")

            (setq org-latex-compiler "xelatex") ; introduced in org 9.0

            (setq org-latex-prefer-user-labels t) ; org-mode version 8.3+

            ;; ox-latex patches
