
[2007-10-23-1]
でうまく行ってなかった設定ですけど、いろいろやってみて、うまいこといくようになりました!
ebb 画像ファイル名
ってやると、
[画像ファイル名].bb
ってファイルが生成されて、これがあればplatexがちゃんと処理できるようになります。おけー。
ってことで、まとめた手順を以下に示します。
1. CarbonEmacsを使います。まだの人はインストール。
2. CarbonEmacsには最初からmuse-modeが入ってるので、特にインストールは不要。別のemacsenの人はインストール。
3. 下記でpTeXをインストール(MacPortsのインストールがまだの人はインストール)。
sudo port install pTeX
4. .emacsに下記を設定
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; muse
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'muse-mode)
(require 'muse-html)
(require 'muse-latex)
;; (require 'muse-book)
;; (require 'muse-texinfo)
;; (require 'muse-docbook)
;; (require 'muse-project)
;; (require 'muse-wiki)
(setq muse-latex-header
"%% -*- mode: japanese-Latex; coding: shift_jis -*-
\\documentclass{jreport}
\\usepackage[dvipdfm]{graphicx}
\\usepackage{url}
\\newcommand{\\comment}[1]{}
\\begin{document}
\\title{<lisp>(muse-publishing-directive \"title\")</lisp>}
\\author{<lisp>(muse-publishing-directive \"author\")</lisp>}
\\date{<lisp>(muse-publishing-directive \"date\")</lisp>}
\\maketitle
<lisp>
(and muse-publish-generate-contents
(not muse-latex-permit-contents-tag)
\"\\\\tableofcontents\n\\\\newpage\")
</lisp>
")
(setq muse-latex-markup-strings (acons 'section "\\chapter{" muse-latex-markup-strings))
(setq muse-latex-markup-strings (acons 'section-end "}" muse-latex-markup-strings))
(setq muse-latex-markup-strings (acons 'subsection '"\\section{" muse-latex-markup-strings))
(setq muse-latex-markup-strings (acons 'subsection-end '"}" muse-latex-markup-strings))
(setq muse-latex-markup-strings (acons 'subsubsection '"\\subsection{" muse-latex-markup-strings))
(setq muse-latex-markup-strings (acons 'subsubsection-end '"}" muse-latex-markup-strings))
(setq muse-latex-markup-strings (acons 'section-other '"\\subsubsection{" muse-latex-markup-strings))
(setq muse-latex-markup-strings (acons 'section-other-end '"}" muse-latex-markup-strings))
(defun muse-latex-pdf-generate2 (file output-path final-target)
(apply
#'muse-publish-transform-output
file output-path final-target "PDF"
(function
(lambda (file output-path)
(let ((command (format "cd \"%s\"; platex-sjis \"%s\";"
(file-name-directory output-path) file))
(times 0)
result)
;; XEmacs can sometimes return a non-number result. We'll err
;; on the side of caution by continuing to attempt to generate
;; the PDF if this happens and treat the final result as
;; successful.
(while (and (< times 2)
(or (not (numberp result))
(not (eq result 0))
;; table of contents takes 2 passes
(file-readable-p
(muse-replace-regexp-in-string
"\\.tex\\'" ".toc" file t t))))
(setq result (shell-command command)
times (1+ times)))
(if (or (not (numberp result))
(eq result 0))
t
nil))
(let ((dvi (muse-replace-regexp-in-string
".tex" "" file t t)))
(shell-command (format "cd \"%s\"; dvipdfmx \"%s\";"
(file-name-directory output-path) dvi)))
))
muse-latex-pdf-cruft))
(muse-derive-style "pdf" "latex"
:final 'muse-latex-pdf-generate2
:browser 'muse-latex-pdf-browse-file
:link-suffix 'muse-latex-pdf-extension
:osuffix 'muse-latex-pdf-extension)