From: Peng Li Date: Sun, 25 Sep 2016 03:02:46 +0000 (+0800) Subject: emacs - ob-racket support and export html color highlighting X-Git-Url: http://47.100.26.94:8080/?a=commitdiff_plain;h=bba687983b20faadef0fb2524a319f2e4794c3be;p=dotfiles.git emacs - ob-racket support and export html color highlighting --- diff --git a/emacs.d/config.org b/emacs.d/config.org index ef4ca58..45182c7 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -721,8 +721,12 @@ Always indents header, and hide header leading starts so that no need type =#+ST (setq org-use-speed-commands t) (setq org-completion-use-ido t) (setq org-startup-with-inline-images t) + ;; latex preview (setq org-startup-with-latex-preview t) - (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))) + (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.2))) + + (el-get-bundle hasu/emacs-ob-racket + :features ob-racket) (org-babel-do-load-languages 'org-babel-load-languages @@ -736,6 +740,7 @@ Always indents header, and hide header leading starts so that no need type =#+ST (lua . t) (lisp . t) (scheme . t) + (racket . t) (sh . t) (sqlite . t) (js . t) @@ -1041,19 +1046,29 @@ Install MacTex-basic [[http://www.tug.org/mactex/morepackages.html][MacTex-basic #+END_SRC +** Export Html +Color higlight the source code block in exported html, [[http://stackoverflow.com/questions/24082430/org-mode-no-syntax-highlighting-in-exported-html-page][org-mode-no-syntax-highlighting-in-exported-html-page]] +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (use-package htmlize + :ensure t) +#+END_SRC ** Org structure template extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-emacs/#orgheadline94][Extend org-modes' esay templates]] #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (add-to-list 'org-structure-template-alist - '("E" "#+BEGIN_SRC emacs-lisp :tangle yes :results silent\n?\n#+END_SRC")) - (add-to-list 'org-structure-template-alist - '("S" "#+BEGIN_SRC sh :results output replace\n?\n#+END_SRC")) - (add-to-list 'org-structure-template-alist - '("p" "#+BEGIN_SRC plantuml :file uml.png \n?\n#+END_SRC")) - (add-to-list 'org-structure-template-alist - '("P" "#+BEGIN_SRC perl \n?\n#+END_SRC")) - (add-to-list 'org-structure-template-alist - '("f" "#+BEGIN_SRC fundamental :tangle ?\n\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("E" "#+BEGIN_SRC emacs-lisp :tangle yes :results silent\n?\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("R" "#+BEGIN_SRC racket :tangle no :results output replace\n?\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("S" "#+BEGIN_SRC sh :results output replace\n?\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("p" "#+BEGIN_SRC plantuml :file uml.png \n?\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("P" "#+BEGIN_SRC perl \n?\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("f" "#+BEGIN_SRC fundamental :tangle ?\n\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("C" "#+BEGIN_SRC c :tangle ?\n\n#+END_SRC")) #+END_SRC * Magit