MuseMode
はまってきました.
あとは TeX への変換を設定すれば, 全部これでも良いかも.
そんな訳でとりあえずな設定集
- ~/work/muse/ 以下に Project を並べる.
- 今んとこ cc-env だけ.
- ~/public_html/ 以下に出力
init-muse.el はこんな感じ↓
;;; muse-mode の設定 ;; (require 'muse-mode) (require 'muse-html) (require 'muse-project) ;; Project の設定 (setq muse-project-alist '(("cc-env" ("~/work/muse/cc-env" :default "index") (:base "xhtml" :path "~/public_html/cc-env") ))) ;; 拡張子(.muse) を付けるか場合はコメントを外す. ;(setq muse-file-extension nil ; muse-mode-auto-p t) ;; 文字コード (setq muse-xhtml-charset-default "euc-jp") (setq muse-html-encoding-default (quote euc-jp)) (setq muse-html-meta-content-encoding (quote euc-jp)) ;; footer の読み込み. (setq muse-xhtml-footer "~/.emacs.d/template/muse-footer.html") ;; header の読み込み. (setq muse-xhtml-header "~/.emacs.d/template/muse-header.html") ;; CSS の読み込み (setq muse-xhtml-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" charset=\"euc-jp\" media=\"all\" href=\"../css/muse.css\" />") ;; header に出力する日付の形式を YYYY-MM-DD に. (setq muse-footer-date-format "%Y-%m-%d") ;; \C-x n で project-find-file を起動 (define-key ctl-x-map "n" 'muse-project-find-file)
template は muse-header.html が
<?xml version="1.0" encoding="<lisp>(muse-html-encoding)</lisp>"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> <head> <meta http-equiv="<lisp>muse-html-meta-http-equiv</lisp>" content="<lisp>muse-html-meta-content-type</lisp>" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="author" content="<lisp>user-full-name</lisp>" /> <meta name="generator" content="Muse" /> <link rev="made" href="mailto:<lisp>user-mail-address</lisp>" /> <link rel="start" href="./index.html" /> <lisp>muse-xhtml-style-sheet </lisp> <title> <lisp> (let ((current-project (car (muse-project-of-file muse-publishing-current-file)))) (concat (when current-project (concat current-project " - ")) (muse-publishing-directive "title"))) </lisp> </title> </head> <body> <h1 id="top"> <lisp> (concat (muse-publishing-directive "title") (let ((author (muse-publishing-directive "author"))) (if (not (string= author (user-full-name))) (concat " (by " author ")")))) </lisp> </h1> <div class="navhead"> <table width="100%" border="0" summary="navigation header"> <tr> <td align="left"> </td> <td align="right"> Lastupdated: <lisp> (if (muse-current-file) (format-time-string muse-footer-date-format (nth 5 (file-attributes (muse-current-file))))) </lisp> </td> </tr> </table> </div> <!-- Page published by Emacs Muse begins here -->
で muse-footer.html が
<!-- Page published by Emacs Muse ends here --> <hr /> <div class="navfoot"> <table width="100%" border="0" summary="navifoot"> <tr> <td align="left"> [<a href="../index.html">Top</a> | <a href="./index.html"> <lisp> (let ((current-project (car (muse-project-of-file muse-publishing-current-file)))) (concat current-project)) </lisp> </a> ] </td> <td align="right"> <a href="../index.html"> <lisp>user-full-name</lisp></a> </td> </tr> </table> </div> </body> </html>
みたいに.
lisp ってそういや真面目に弄った事ないな. /usr/share/doc 以下に展開された設定例が凄いんで, ちょっとクラクラしました.
天気
帰ろうか, とか思ったら吹雪いてます. いきなり冷えたな. うー.