home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

writing.el (913B)


      1 ;;; writing.el --- -*- lexical-binding: t -*-
      2 ;;; Commentary:
      3 ;;; Writing modes configuration
      4 ;;; Code:
      5 
      6 (use-package markdown-mode
      7   :mode ("\\.md\\'" . markdown-mode)
      8   :config
      9   (setq markdown-fontify-code-blocks-natively t)
     10 
     11   ;; Don't change font in code blocks
     12   (set-face-attribute 'markdown-code-face nil
     13                       :inherit nil)
     14 
     15   ;; Process Markdown with Pandoc, using a custom stylesheet for nice output
     16   (let ((stylesheet (expand-file-name
     17                      (locate-user-emacs-file "etc/pandoc.css"))))
     18     (setq markdown-command
     19           (mapconcat #'shell-quote-argument
     20                      `("pandoc" "--toc" "--section-divs"
     21                        "--css" ,(concat "file://" stylesheet)
     22                        "--standalone" "-f" "markdown" "-t" "html5")
     23                      " ")))
     24   (add-hook 'markdown-mode-hook #'auto-fill-mode))
     25 
     26 (provide 'writing)
     27 ;;; writing.el ends here