             ;; 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"

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

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

            ;; ox-latex patches

                (progn
                  (setq org-latex-listings 'minted) ; default nil
                  ;; The default value of the `minted' package option `cachedir'
                  ;; is "_minted-\jobname". That clutters the working dirs with
                  ;; _minted* dirs. So instead create them in temp folders.
                  (defvar latex-minted-cachedir (concat temporary-file-directory
                                                        (getenv "USER")
                                                        "/.minted/\\jobname"))
                  ;; 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
                               `(,(concat "cachedir=" ; options
                                          latex-minted-cachedir)
                                 "minted" ; package
                                 ,(not (eq org-latex-create-formula-image-program 'dvipng)))) ; snippet-flag

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