emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: Mathematics in Muse


From: Na Li
Subject: [emacs-wiki-discuss] Re: Mathematics in Muse
Date: Tue, 18 Oct 2005 10:28:20 -0500
User-agent: Emacs Gnus

On 16 Oct 2005, Chris Lowis wrote:

> I modified the latex2png-move2pubdir function to this (with an extra
> line to move the png file to the output-dir ) . Sorry, I am still
> learning how to contribute to the project, and am not sure how to
> submit a "patch".
> 
> (defun latex2png-move2pubdir (file prefix pubdir)
> "Move FILE to the PUBDIR folder.
> 
> This is done so that the resulting images do not clutter your
> main publishing directory.
> 
> Old files with PREFIX in the name are deleted."
> (if (and (file-exists-p file)
> (file-directory-p pubdir))
> (progn
> (let ((files (file-expand-wildcards (concat pubdir prefix "_*") t)))
> (copy-file file (concat pubdir (file-name-nondirectory file)) t)
> (copy-file file (concat output-dir "/latex/"
> (file-name-nondirectory file)) t)
> (delete-file file)
> (concat "./latex/" (file-name-nondirectory file))))
> (message "The latex folder does not exist!")))

Thanks, that works.  I didn't know that `output-dir' is defined to be the
proper output directory.  Here is the diff against patch-251 right now.

--- orig/contrib/muse-latex2png.el
+++ mod/contrib/muse-latex2png.el
@@ -56,6 +56,8 @@
       (progn
         (let ((files (file-expand-wildcards (concat pubdir prefix "_*") t)))
           (copy-file file (concat pubdir (file-name-nondirectory file)) t)
+          (copy-file file (concat output-dir "/latex/"
+                                  (file-name-nondirectory file)) t)
           (delete-file file)
           (concat "./latex/" (file-name-nondirectory file))))
     (message "The latex folder does not exist!")))
@@ -64,7 +66,7 @@
   (let ((end-marker (set-marker (make-marker) (1+ end)))
         (pubdir (concat (file-name-directory
                          muse-publishing-current-file)
-                        "/latex")))
+                        "/latex/")))
     (save-restriction
       (narrow-to-region beg end)


Michael





reply via email to

[Prev in Thread] Current Thread [Next in Thread]