 (dolist (path '("/Library/TeX/texbin/" "/usr/local/bin"))
   (add-to-list 'exec-path path))
 
-(setenv "PKG_CONFIG_PATH"
-        "/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
-(setenv "PATH"
-        (s-join ":" exec-path))
+(with-eval-after-load 's
+  (setenv "PKG_CONFIG_PATH"
+          "/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
+  (setenv "PATH"
+          (s-join ":" exec-path)))
 
 ;;;; Code
 

            (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
                       ":PROPERTIES:\n:NOTER_DOCUMENT: %F\n:END:\n#+title: ${title}\n#+STARTUP: latexpreview showeverything")
            :unnarrowed t)))
  :bind
  ("C-c n r f" . #'org-roam-node-find)
  ("C-c n r i" . #'org-roam-node-insert)
  ("C-c n r I" . #'org-id-get-create)
  ("C-c n r n" . #'org-roam-capture)
  ("C-c n r r" . #'org-roam-buffer-toggle)
  :config
  (org-roam-db-autosync-mode))

;; browser page for viewing/navigating org-roam notes
(use-package org-roam-ui

(use-package org-ref
  :straight t
  :defer t
  :config
  (setq org-ref-completion-library 'org-ref-ivy-cite
        org-export-latex-format-toc-function 'org-export-latex-no-toc
        org-ref-get-pdf-filename-function
