~ubuntu-branches/ubuntu/raring/muse-el/raring

« back to all changes in this revision

Viewing changes to lisp/muse-latex2png.el

  • Committer: Bazaar Package Importer
  • Author(s): Michael W. Olson (GNU address)
  • Date: 2008-01-09 15:51:46 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080109155146-0wwzermvvzs9rqzo
Tags: 3.11-3ubuntu1
* Merge with with Debian unstable (LP: #137284). Remaining Ubuntu changes:
  - Keep manual.
  - Set Ubuntu MOTU to be Maintainer

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
;; Emacs Muse is free software; you can redistribute it and/or modify
11
11
;; it under the terms of the GNU General Public License as published
12
 
;; by the Free Software Foundation; either version 2, or (at your
 
12
;; by the Free Software Foundation; either version 3, or (at your
13
13
;; option) any later version.
14
14
 
15
15
;; Emacs Muse is distributed in the hope that it will be useful, but
205
205
    (setq attrs (cons (cons "prefix"
206
206
                            (concat "latex2png-" (muse-page-name)))
207
207
                      attrs)))
208
 
  (if (muse-style-derived-p "latex")
 
208
  (if (or (muse-style-derived-p "latex") (muse-style-derived-p "context"))
209
209
      (muse-publish-mark-read-only beg end)
210
210
    (muse-latex2png-region beg end attrs)))
211
211
 
222
222
                         nil t)
223
223
                        (prog1 t
224
224
                          (replace-match "")
225
 
                          (when (and (muse-style-derived-p "latex")
 
225
                          (when (and (or (muse-style-derived-p "latex")
 
226
                                         (muse-style-derived-p "context"))
226
227
                                     (not (bobp)))
227
228
                            (backward-char 1)
228
229
                            (if (bolp)
230
231
                              (forward-char 1)))
231
232
                          (setq beg (point)))))
232
233
         (tag-beg (if centered
233
 
                      (if (muse-style-derived-p "contex")
234
 
                          "$$" "\\[ ")
 
234
                      (if (muse-style-derived-p "context")
 
235
                          "\\startformula " "\\[ ")
235
236
                    "$"))
236
237
         (tag-end (if centered
237
 
                      (if (muse-style-derived-p "contex")
238
 
                          "$$" " \\]")
 
238
                      (if (muse-style-derived-p "context")
 
239
                          " \\stopformula" " \\]")
239
240
                    "$"))
240
241
         (attrs (nconc (list (cons "prefix"
241
242
                                   (concat "latex2png-" (muse-page-name))))
244
245
    (muse-insert-markup tag-beg)
245
246
    (goto-char end)
246
247
    (muse-insert-markup tag-end)
247
 
    (if (muse-style-derived-p "latex")
 
248
    (if (or (muse-style-derived-p "latex") (muse-style-derived-p "context"))
248
249
        (muse-publish-mark-read-only beg (point))
249
250
      (muse-latex2png-region beg (point) attrs))))
250
251