X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=.emacs;h=cf2269e0c4e87d546debc6295d3c45b9c6b41937;hb=685079fb2d45eabbe375037b84564e5723e82412;hp=350375cf61d01d4697e385535893b15447f62ae3;hpb=92847f2b2a6a083695ebfad994170fab8f7f8d72;p=emacs.git diff --git a/.emacs b/.emacs index 350375c..cf2269e 100644 --- a/.emacs +++ b/.emacs @@ -114,6 +114,8 @@ "* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t) ("n" "note" entry (file "~/projects/notes/refile.org") "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t) + ("s" "schedule" entry (file "~/projects/notes/refile.org") + "* %? \n%^{scheduled:}t\n%U\n%a\n" :clock-in t :clock-resume t) ("j" "Journal" entry (file+datetree "~/projects/notes/diary.org") "* %?\n%U\n" :clock-in t :clock-resume t) ("w" "org-protocol" entry (file "~/projects/notes/refile.org") @@ -631,7 +633,7 @@ Argument DESCRIPTION MIME description." ;; default listings package instead, use ;; (setq org-latex-listings t) ;; and change references to "minted" below to "listings" -(setq org-latex-listings 'minted) +; (setq org-latex-listings 'minted) ;; default settings for minted code blocks (setq org-latex-minted-options @@ -675,42 +677,36 @@ Argument DESCRIPTION MIME description." ;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432 ;; but adapted to use latexmk 4.22 or higher. -(defun my-auto-tex-cmd () - "When exporting from .org with latex, automatically run latex, - pdflatex, or xelatex as appropriate, using latexmk." - (let ((texcmd))) - ;; default command: pdflatex - (setq texcmd "latexmk -pdflatex='pdflatex -synctex=1 --shell-escape --' -pdf %f") - ;; pdflatex -> .pdf - (if (string-match "LATEX_CMD: pdflatex" (buffer-string)) - (setq texcmd "latexmk -pdflatex='pdflatex -synctex=1 --shell-escape' -pdf %f")) - ;; xelatex -> .pdf - (if (string-match "LATEX_CMD: xelatex" (buffer-string)) - (setq texcmd "latexmk -pdflatex='xelatex -syntex=1 --shell-escape' -bibtex -use-make -pdf %f")) - ;; LaTeX compilation command - (setq org-latex-to-pdf-process (list texcmd))) - -(add-hook 'org-latex-after-initial-vars-hook 'my-auto-tex-cmd) +(setq org-latex-pdf-process '("latexmk -pdflatex=xelatex -bibtex -use-make -pdf %f")) ;; Default packages included in /every/ tex file, latex, pdflatex or xelatex +(setq org-latex-default-packages-alist + '()) (setq org-latex-packages-alist '(("" "graphicx" t) + ("" "fontspec" t) + ("" "xunicode" t) + ("" "hyperref" t) + ("" "url" t) + ("" "rotating" t) ("" "longtable" nil) ("" "float" ))) -;; Custom packages -(defun my-auto-tex-parameters () - "Automatically select the tex packages to include. See https://github.com/kjhealy/latex-custom-kjh for the support files included here." - ;; default packages for ordinary latex or pdflatex export - (setq org-latex-default-packages-alist - '(("AUTO" "inputenc" t) - ("minted,minion" "org-preamble-pdflatex" t))) - ;; Packages to include when xelatex is used - (if (string-match "LATEX_CMD: xelatex" (buffer-string)) - (setq org-latex-default-packages-alist - '(("minted" "org-preamble-xelatex" t) )))) - -(add-hook 'org-latex-after-initial-vars-hook 'my-auto-tex-parameters) +(defun org-create-formula--latex-header () + "Return LaTeX header appropriate for previewing a LaTeX snippet." + (let ((info (org-combine-plists (org-export--get-global-options + (org-export-get-backend 'latex)) + (org-export--get-inbuffer-options + (org-export-get-backend 'latex))))) + (org-latex-guess-babel-language + (org-latex-guess-inputenc + (org-splice-latex-header + org-format-latex-header + org-latex-default-packages-alist + nil t + (plist-get info :latex-header))) + info))) + ; support ignoring headers in org mode export to latex ; from http://article.gmane.org/gmane.emacs.orgmode/67692