
muse-modeで
HTML Slidy
を使ったプレゼンHTMLを生成したくて、やってみました。
PDFとかよりだいぶ簡単。
(require 'muse-mode)
(require 'muse-html)
;; for HTML Slidy
(defcustom muse-html-slidy-markup-strings
'(
(section . "</div><div class=\"slide\"><h1>")
(section-end . "</h1>")
(begin-uli . "<ul class=\"incremental\">\n")
(end-uli . "\n</ul>")
(begin-oli . "<ol class=\"incremental\">\n")
(end-oli . "\n</ol>")
"Strings used for marking up text as HTML Slidy."
)
:type '(alist :key-type symbol :value-type string)
:group 'muse-html)
(defcustom muse-html-slidy-header
"
(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\">
<head>
<title><lisp>
(muse-publishing-directive \"title\")</lisp></title>
<meta name=\"copyright\" content=\"<lisp>(progn (copyrigh) nil)</lisp>\">
<meta name=\"generator\" content=\"muse.el\" />
<meta http-equiv=\"<lisp>muse-html-meta-http-equiv</lisp>\"
content=\"<lisp>muse-html-meta-content-type</lisp>\" />
<link rel=\"stylesheet\" type=\"text/css\" media=\"screen, projection, print\"
href=\"http://www.w3.org/Talks/Tools/Slidy/slidy.css\" />
<script src=\"http://www.w3.org/Talks/Tools/Slidy/slidy.js\"
type=\"text/javascript\"></script>
</head>
<body>
<div class=\"slide\">
<h1 style=\"margin-top: 200px;\"><lisp>
(muse-publishing-directive \"title\")</lisp></h1><lisp>
(let ((author (muse-publishing-directive \"author\")))
(if (not (string= author (user-full-name)))
(concat author )))</lisp>
<!-- Page published by Emacs Muse begins here -->\n
"
"Header used for publishing XHTML files. This may be text or a filename."
:type 'string
:group 'muse-html)
(defcustom muse-html-slidy-footer "
<!-- Page published by Emacs Muse ends here -->
</div>
</body>
</html>\n"
"Footer used for publishing XHTML files. This may be text or a filename."
:type 'string
:group 'muse-html)
(muse-derive-style "html-slidy" "html"
:strings 'muse-html-slidy-markup-strings
:header 'muse-html-slidy-header
:footer 'muse-html-slidy-footer)
"html-slidy"って名前でパブリッシュすればおけ。です。
もっと洗練されたやりかたがあるような気もするわけですけど…
気が向いたら修正しまっす。